Use ndo_set_rx_mode instead of ndo_set_multicast_list on Linux 3.2+
[madwifi/.git] / net80211 / ieee80211.c
index 2f2721ad81aaed5ebc4e7f8ce56ba1b7958e3e2a..38313b5eab3b2879db4105b5ac8d7594d986546e 100644 (file)
@@ -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
 }