compat-wirelsss: add carl9170
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 19 Sep 2010 17:49:12 +0000 (10:49 -0700)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 20 Sep 2010 15:29:48 +0000 (08:29 -0700)
This patch adds support for carl9170.

CC: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
config.mk
patches/25-multicast-list_head.patch
scripts/admin-update.sh

index a021172f3332be44626d4a3e40469b46e5cb8402..7f73744fda40e18b136d0dc40f6b2626e6a99781 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -413,6 +413,18 @@ CONFIG_AR9170_USB=m
 CONFIG_AR9170_LEDS=y
 endif #CONFIG_COMPAT_KERNEL_28
 
+ifndef CONFIG_COMPAT_KERNEL_29
+CONFIG_CARL9170=m
+CONFIG_CARL9170_LEDS=y
+# CONFIG_CARL9170_DEBUGFS=y
+# CONFIG_CARL9170_WPC=y
+endif #CONFIG_COMPAT_KERNEL_29
+
+# This activates a threading fix for usb urb.
+# this is mainline commit: b3e670443b7fb8a2d29831b62b44a039c283e351
+# This fix will be included in some stable releases.
+CONFIG_COMPAT_USB_URB_THREAD_FIX=y
+
 CONFIG_ATH9K_HTC=m
 # CONFIG_ATH9K_HTC_DEBUGFS=y
 
index 0f07b5c8eedf49de57749bad9161f75d3fda39f5..5a6bb16838c92367401bda8c7837887179d41580 100644 (file)
@@ -227,6 +227,44 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
        }
  
        return ((u64)(mfilt[1]) << 32) | mfilt[0];
+--- a/drivers/net/wireless/ath/carl9170/main.c
++++ b/drivers/net/wireless/ath/carl9170/main.c
+@@ -810,17 +810,35 @@ out:
+       return err;
+ }
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw,
+                                        struct netdev_hw_addr_list *mc_list)
++#else
++static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count,
++                                       struct dev_addr_list *ha)
++#endif
+ {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+       struct netdev_hw_addr *ha;
++#else
++      int i;
++#endif
+       u64 mchash;
+       /* always get broadcast frames */
+       mchash = 1ULL << (0xff >> 2);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+       netdev_hw_addr_list_for_each(ha, mc_list)
+               mchash |= 1ULL << (ha->addr[5] >> 2);
++#else
++      for (i = 0; i < mc_count; i++) {
++              if (WARN_ON(!ha))
++                      break;
++              mchash |= 1ULL << (ha->dmi_addr[5] >> 2);
++              ha = ha->next;
++      }
++#endif
+       return mchash;
+ }
 --- a/drivers/net/wireless/libertas/main.c
 +++ b/drivers/net/wireless/libertas/main.c
 @@ -242,18 +242,34 @@ static int lbs_add_mcast_addrs(struct cm
index 6ef281d021bb4d3835d0dc7dffe14449ae739c7d..ac9470d1a8b595404ada27034da0882cc768c03c 100755 (executable)
@@ -192,6 +192,7 @@ fi
 
 # Drivers that have their own directory
 DRIVERS="drivers/net/wireless/ath"
+DRIVERS="$DRIVERS drivers/net/wireless/ath/carl9170"
 DRIVERS="$DRIVERS drivers/net/wireless/ath/ar9170"
 DRIVERS="$DRIVERS drivers/net/wireless/ath/ath5k"
 DRIVERS="$DRIVERS drivers/net/wireless/ath/ath9k"