madwifi: fix compile issues with linux 3.1/3.2
[openwrt.git] / package / madwifi / patches / 477-3.2_fixes.patch
1 --- a/ath/if_ath.c
2 +++ b/ath/if_ath.c
3 @@ -569,7 +569,11 @@ static const struct net_device_ops ath_n
4 .ndo_stop = ath_stop,
5 .ndo_start_xmit = ath_hardstart,
6 .ndo_tx_timeout = ath_tx_timeout,
7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
8 + .ndo_set_rx_mode = ath_mode_init,
9 +#else
10 .ndo_set_multicast_list = ath_mode_init,
11 +#endif
12 .ndo_do_ioctl = ath_ioctl,
13 .ndo_get_stats = ath_getstats,
14 .ndo_set_mac_address = ath_set_mac_address,
15 --- a/net80211/ieee80211.c
16 +++ b/net80211/ieee80211.c
17 @@ -461,7 +461,11 @@ static const struct net_device_ops ieee8
18 .ndo_open = ieee80211_open,
19 .ndo_stop = ieee80211_stop,
20 .ndo_start_xmit = ieee80211_hardstart,
21 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
22 + .ndo_set_rx_mode = ieee80211_set_multicast_list,
23 +#else
24 .ndo_set_multicast_list = ieee80211_set_multicast_list,
25 +#endif
26 .ndo_change_mtu = ieee80211_change_mtu,
27 .ndo_do_ioctl = ieee80211_ioctl,
28 .ndo_validate_addr = eth_validate_addr,
29 @@ -1847,10 +1851,14 @@ ieee80211_set_multicast_list(struct net_
30 IEEE80211_UNLOCK_IRQ(ic);
31
32 /* XXX: Merge multicast list into parent device */
33 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
34 - parent->set_multicast_list(ic->ic_dev);
35 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
36 + parent->netdev_ops->ndo_set_rx_mode(ic->ic_dev);
37 #else
38 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)
39 parent->netdev_ops->ndo_set_multicast_list(ic->ic_dev);
40 +#else
41 + parent->set_multicast_list(ic->ic_dev);
42 +#endif
43 #endif
44 }
45
This page took 0.104064 seconds and 5 git commands to generate.