[package] madwifi: rename incorrectly named patch file (#7459)
[openwrt/svn-archive/archive.git] / package / madwifi / patches / 465-mc_list-2.6.35.patch
1 --- a/ath/if_ath.c
2 +++ b/ath/if_ath.c
3 @@ -4466,7 +4466,11 @@ ath_merge_mcast(struct ath_softc *sc, u_
4 {
5 struct ieee80211com *ic = &sc->sc_ic;
6 struct ieee80211vap *vap;
7 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
8 + struct netdev_hw_addr *ha;
9 + #else
10 struct dev_mc_list *mc;
11 + #endif
12 u_int32_t val;
13 u_int8_t pos;
14
15 @@ -4474,6 +4478,17 @@ ath_merge_mcast(struct ath_softc *sc, u_
16 /* XXX locking */
17 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
18 struct net_device *dev = vap->iv_dev;
19 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
20 + netdev_for_each_mc_addr(ha, dev) {
21 + /* calculate XOR of eight 6-bit values */
22 + val = LE_READ_4(ha->addr + 0);
23 + pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val;
24 + val = LE_READ_4(ha->addr + 3);
25 + pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val;
26 + pos &= 0x3f;
27 + mfilt[pos / 32] |= (1 << (pos % 32));
28 + }
29 + #else
30 for (mc = dev->mc_list; mc; mc = mc->next) {
31 /* calculate XOR of eight 6-bit values */
32 val = LE_READ_4(mc->dmi_addr + 0);
33 @@ -4483,6 +4498,7 @@ ath_merge_mcast(struct ath_softc *sc, u_
34 pos &= 0x3f;
35 mfilt[pos / 32] |= (1 << (pos % 32));
36 }
37 + #endif
38 }
39 }
40