From 02a147de0c298c612049409fd4d64b12dc3d9ba1 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 11 Jul 2010 19:00:23 +0000 Subject: kernel: fix build problems with recent kernel versions SVN-Revision: 22137 --- package/carl9170/patches/120-2.6.35-compat.patch | 53 ++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 package/carl9170/patches/120-2.6.35-compat.patch (limited to 'package/carl9170') diff --git a/package/carl9170/patches/120-2.6.35-compat.patch b/package/carl9170/patches/120-2.6.35-compat.patch new file mode 100644 index 0000000..e413edf --- /dev/null +++ b/package/carl9170/patches/120-2.6.35-compat.patch @@ -0,0 +1,53 @@ +--- a/drivers/net/wireless/ath/carl9170/main.c ++++ b/drivers/net/wireless/ath/carl9170/main.c +@@ -591,21 +591,36 @@ out: + return err; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) ++static u64 ar9170_op_prepare_multicast(struct ieee80211_hw *hw, ++ struct netdev_hw_addr_list *mclist) ++#else + static u64 ar9170_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, + struct dev_addr_list *mclist) ++#endif + { + u64 mchash; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) ++ struct netdev_hw_addr *ha; ++#else + int i; ++#endif + + /* always get broadcast frames */ + mchash = 1ULL << (0xff >> 2); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) ++ netdev_hw_addr_list_for_each(ha, mclist) { ++ mchash |= 1ULL << (ha->addr[5] >> 2); ++ } ++#else + for (i = 0; i < mc_count; i++) { + if (WARN_ON(!mclist)) + break; + mchash |= 1ULL << (mclist->dmi_addr[5] >> 2); + mclist = mclist->next; + } ++#endif + + return mchash; + } +--- a/drivers/net/wireless/ath/carl9170/usb.c ++++ b/drivers/net/wireless/ath/carl9170/usb.c +@@ -48,6 +48,11 @@ + #include "fwcmd.h" + #include "usb.h" + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) ++#define usb_buffer_alloc(dev, size, mem_flags, dma) usb_alloc_coherent(dev, size, mem_flags, dma) ++#define usb_buffer_free(dev, size, addr, dma) usb_free_coherent(dev, size, addr, dma) ++#endif ++ + MODULE_AUTHOR("Johannes Berg "); + MODULE_AUTHOR("Christian Lamparter "); + MODULE_LICENSE("GPL"); -- cgit v1.1