From: proski Date: Tue, 22 Nov 2011 17:22:34 +0000 (+0000) Subject: Use ndo_set_rx_mode instead of ndo_set_multicast_list on Linux 3.2+ X-Git-Url: http://git.ozo.com/?p=madwifi%2F.git;a=commitdiff_plain;h=50d74a9a211b4e6c5f058f7c4c1949e91351f015;hp=311e88720da9ab1a4f6a01d60598eec6450ef8d0 Use ndo_set_rx_mode instead of ndo_set_multicast_list on Linux 3.2+ git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4175 0192ed92-7a03-0410-a25b-9323aeb14dbd --- diff --git a/ath/if_ath.c b/ath/if_ath.c index eb30927..a0d7eb8 100644 --- a/ath/if_ath.c +++ b/ath/if_ath.c @@ -511,7 +511,11 @@ static const struct net_device_ops ath_netdev_ops = { .ndo_stop = ath_stop, .ndo_start_xmit = ath_hardstart, .ndo_tx_timeout = ath_tx_timeout, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) + .ndo_set_rx_mode = ath_mode_init, +#else .ndo_set_multicast_list = ath_mode_init, +#endif .ndo_do_ioctl = ath_ioctl, .ndo_get_stats = ath_getstats, .ndo_set_mac_address = ath_set_mac_address, diff --git a/net80211/ieee80211.c b/net80211/ieee80211.c index 2f2721a..38313b5 100644 --- a/net80211/ieee80211.c +++ b/net80211/ieee80211.c @@ -411,7 +411,11 @@ static const struct net_device_ops ieee80211_netdev_ops = { .ndo_open = ieee80211_open, .ndo_stop = ieee80211_stop, .ndo_start_xmit = ieee80211_hardstart, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) + .ndo_set_rx_mode = ieee80211_set_multicast_list, +#else .ndo_set_multicast_list = ieee80211_set_multicast_list, +#endif .ndo_change_mtu = ieee80211_change_mtu, .ndo_do_ioctl = ieee80211_ioctl, #if IEEE80211_VLAN_TAG_USED @@ -1806,10 +1810,14 @@ ieee80211_set_multicast_list(struct net_device *dev) IEEE80211_UNLOCK_IRQ(ic); /* XXX: Merge multicast list into parent device */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) - parent->set_multicast_list(ic->ic_dev); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) + parent->netdev_ops->ndo_set_rx_mode(ic->ic_dev); #else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29) parent->netdev_ops->ndo_set_multicast_list(ic->ic_dev); +#else + parent->set_multicast_list(ic->ic_dev); +#endif #endif }