Add support for Linux 2.6.35
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Sat, 19 Jun 2010 18:24:35 +0000 (18:24 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Sat, 19 Jun 2010 18:24:35 +0000 (18:24 +0000)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4130 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath/if_ath.c
include/compat.h

index 5adcf0fe0cef070760a0fefc0e588b18c8ce1bc4..b79a2fad25d7020e3f1822b51b544504825b442d 100644 (file)
@@ -4418,7 +4418,7 @@ ath_merge_mcast(struct ath_softc *sc, u_int32_t mfilt[2])
 {
        struct ieee80211com *ic = &sc->sc_ic;
        struct ieee80211vap *vap;
-       struct dev_mc_list *mc;
+       struct ath_netdev_hw_addr *ha;
        u_int32_t val;
        u_int8_t pos;
 
@@ -4426,11 +4426,11 @@ ath_merge_mcast(struct ath_softc *sc, u_int32_t mfilt[2])
        /* XXX locking */
        TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
                struct net_device *dev = vap->iv_dev;
-               for (mc = dev->mc_list; mc; mc = mc->next) {
+               netdev_for_each_mc_addr (ha, dev) {
                        /* calculate XOR of eight 6-bit values */
-                       val = LE_READ_4(mc->dmi_addr + 0);
+                       val = LE_READ_4(ath_ha_addr(ha) + 0);
                        pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val;
-                       val = LE_READ_4(mc->dmi_addr + 3);
+                       val = LE_READ_4(ath_ha_addr(ha) + 3);
                        pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val;
                        pos &= 0x3f;
                        mfilt[pos / 32] |= (1 << (pos % 32));
index 27d92ee87474d4d837187e83df014f8a54f4140f..acace349c8e8bd21b71c5ac183a3f8340825e4ab 100644 (file)
 #define NETDEV_TX_BUSY  1
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)
+#define netdev_for_each_mc_addr(mclist, dev) \
+       for (mclist = dev->mc_list; mclist; mclist = mclist->next)
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)
+#define ath_netdev_hw_addr dev_mc_list
+#define ath_ha_addr(ha) ha->dmi_addr
+#else
+#define ath_netdev_hw_addr netdev_hw_addr
+#define ath_ha_addr(ha) ha->addr
+#endif
+
 /*
  * BSD/Linux compatibility shims.  These are used mainly to
  * minimize differences when importing necesary BSD code.