aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/adm8211.c12
-rw-r--r--drivers/net/wireless/ath/ar9170/main.c14
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c17
-rw-r--r--drivers/net/wireless/libertas/main.c12
-rw-r--r--drivers/net/wireless/libertas_tf/main.c14
-rw-r--r--drivers/net/wireless/mwl8k.c24
-rw-r--r--drivers/net/wireless/orinoco/hw.c6
-rw-r--r--drivers/net/wireless/orinoco/hw.h1
-rw-r--r--drivers/net/wireless/ray_cs.c12
-rw-r--r--drivers/net/wireless/rndis_wlan.c6
-rw-r--r--drivers/net/wireless/rtl818x/rtl8180_dev.c6
-rw-r--r--drivers/net/wireless/rtl818x/rtl8187_dev.c4
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c25
-rw-r--r--drivers/net/wireless/zd1201.c6
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c13
15 files changed, 76 insertions, 96 deletions
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index 547912e6843f..2277998b7264 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1317,21 +1317,19 @@ static void adm8211_bss_info_changed(struct ieee80211_hw *dev,
1317} 1317}
1318 1318
1319static u64 adm8211_prepare_multicast(struct ieee80211_hw *hw, 1319static u64 adm8211_prepare_multicast(struct ieee80211_hw *hw,
1320 int mc_count, struct dev_addr_list *mclist) 1320 struct netdev_hw_addr_list *mc_list)
1321{ 1321{
1322 unsigned int bit_nr, i; 1322 unsigned int bit_nr;
1323 u32 mc_filter[2]; 1323 u32 mc_filter[2];
1324 struct netdev_hw_addr *ha;
1324 1325
1325 mc_filter[1] = mc_filter[0] = 0; 1326 mc_filter[1] = mc_filter[0] = 0;
1326 1327
1327 for (i = 0; i < mc_count; i++) { 1328 netdev_hw_addr_list_for_each(ha, mc_list) {
1328 if (!mclist) 1329 bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26;
1329 break;
1330 bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;
1331 1330
1332 bit_nr &= 0x3F; 1331 bit_nr &= 0x3F;
1333 mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); 1332 mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
1334 mclist = mclist->next;
1335 } 1333 }
1336 1334
1337 return mc_filter[0] | ((u64)(mc_filter[1]) << 32); 1335 return mc_filter[0] | ((u64)(mc_filter[1]) << 32);
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index 257c734733d1..b43d4b006d7e 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -2045,21 +2045,17 @@ out:
2045 return err; 2045 return err;
2046} 2046}
2047 2047
2048static u64 ar9170_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, 2048static u64 ar9170_op_prepare_multicast(struct ieee80211_hw *hw,
2049 struct dev_addr_list *mclist) 2049 struct netdev_hw_addr_list *mc_list)
2050{ 2050{
2051 u64 mchash; 2051 u64 mchash;
2052 int i; 2052 struct netdev_hw_addr *ha;
2053 2053
2054 /* always get broadcast frames */ 2054 /* always get broadcast frames */
2055 mchash = 1ULL << (0xff >> 2); 2055 mchash = 1ULL << (0xff >> 2);
2056 2056
2057 for (i = 0; i < mc_count; i++) { 2057 netdev_hw_addr_list_for_each(ha, mc_list)
2058 if (WARN_ON(!mclist)) 2058 mchash |= 1ULL << (ha->addr[5] >> 2);
2059 break;
2060 mchash |= 1ULL << (mclist->dmi_addr[5] >> 2);
2061 mclist = mclist->next;
2062 }
2063 2059
2064 return mchash; 2060 return mchash;
2065} 2061}
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index b142a78ed1e5..53a2340f52bc 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -230,7 +230,7 @@ static void ath5k_remove_interface(struct ieee80211_hw *hw,
230 struct ieee80211_vif *vif); 230 struct ieee80211_vif *vif);
231static int ath5k_config(struct ieee80211_hw *hw, u32 changed); 231static int ath5k_config(struct ieee80211_hw *hw, u32 changed);
232static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, 232static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw,
233 int mc_count, struct dev_addr_list *mc_list); 233 struct netdev_hw_addr_list *mc_list);
234static void ath5k_configure_filter(struct ieee80211_hw *hw, 234static void ath5k_configure_filter(struct ieee80211_hw *hw,
235 unsigned int changed_flags, 235 unsigned int changed_flags,
236 unsigned int *new_flags, 236 unsigned int *new_flags,
@@ -2999,22 +2999,20 @@ unlock:
2999} 2999}
3000 3000
3001static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, 3001static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw,
3002 int mc_count, struct dev_addr_list *mclist) 3002 struct netdev_hw_addr_list *mc_list)
3003{ 3003{
3004 u32 mfilt[2], val; 3004 u32 mfilt[2], val;
3005 int i;
3006 u8 pos; 3005 u8 pos;
3006 struct netdev_hw_addr *ha;
3007 3007
3008 mfilt[0] = 0; 3008 mfilt[0] = 0;
3009 mfilt[1] = 1; 3009 mfilt[1] = 1;
3010 3010
3011 for (i = 0; i < mc_count; i++) { 3011 netdev_hw_addr_list_for_each(ha, mc_list) {
3012 if (!mclist)
3013 break;
3014 /* calculate XOR of eight 6-bit values */ 3012 /* calculate XOR of eight 6-bit values */
3015 val = get_unaligned_le32(mclist->dmi_addr + 0); 3013 val = get_unaligned_le32(ha->addr + 0);
3016 pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; 3014 pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val;
3017 val = get_unaligned_le32(mclist->dmi_addr + 3); 3015 val = get_unaligned_le32(ha->addr + 3);
3018 pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; 3016 pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val;
3019 pos &= 0x3f; 3017 pos &= 0x3f;
3020 mfilt[pos / 32] |= (1 << (pos % 32)); 3018 mfilt[pos / 32] |= (1 << (pos % 32));
@@ -3022,8 +3020,7 @@ static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw,
3022 * but not sure, needs testing, if we do use this we'd 3020 * but not sure, needs testing, if we do use this we'd
3023 * neet to inform below to not reset the mcast */ 3021 * neet to inform below to not reset the mcast */
3024 /* ath5k_hw_set_mcast_filterindex(ah, 3022 /* ath5k_hw_set_mcast_filterindex(ah,
3025 * mclist->dmi_addr[5]); */ 3023 * ha->addr[5]); */
3026 mclist = mclist->next;
3027 } 3024 }
3028 3025
3029 return ((u64)(mfilt[1]) << 32) | mfilt[0]; 3026 return ((u64)(mfilt[1]) << 32) | mfilt[0];
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 3c889f43d909..ff7b0d0cca56 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -318,7 +318,7 @@ static int lbs_add_mcast_addrs(struct cmd_ds_mac_multicast_adr *cmd,
318 struct net_device *dev, int nr_addrs) 318 struct net_device *dev, int nr_addrs)
319{ 319{
320 int i = nr_addrs; 320 int i = nr_addrs;
321 struct dev_mc_list *mc_list; 321 struct netdev_hw_addr *ha;
322 int cnt; 322 int cnt;
323 323
324 if ((dev->flags & (IFF_UP|IFF_MULTICAST)) != (IFF_UP|IFF_MULTICAST)) 324 if ((dev->flags & (IFF_UP|IFF_MULTICAST)) != (IFF_UP|IFF_MULTICAST))
@@ -326,19 +326,19 @@ static int lbs_add_mcast_addrs(struct cmd_ds_mac_multicast_adr *cmd,
326 326
327 netif_addr_lock_bh(dev); 327 netif_addr_lock_bh(dev);
328 cnt = netdev_mc_count(dev); 328 cnt = netdev_mc_count(dev);
329 netdev_for_each_mc_addr(mc_list, dev) { 329 netdev_for_each_mc_addr(ha, dev) {
330 if (mac_in_list(cmd->maclist, nr_addrs, mc_list->dmi_addr)) { 330 if (mac_in_list(cmd->maclist, nr_addrs, ha->addr)) {
331 lbs_deb_net("mcast address %s:%pM skipped\n", dev->name, 331 lbs_deb_net("mcast address %s:%pM skipped\n", dev->name,
332 mc_list->dmi_addr); 332 ha->addr);
333 cnt--; 333 cnt--;
334 continue; 334 continue;
335 } 335 }
336 336
337 if (i == MRVDRV_MAX_MULTICAST_LIST_SIZE) 337 if (i == MRVDRV_MAX_MULTICAST_LIST_SIZE)
338 break; 338 break;
339 memcpy(&cmd->maclist[6*i], mc_list->dmi_addr, ETH_ALEN); 339 memcpy(&cmd->maclist[6*i], ha->addr, ETH_ALEN);
340 lbs_deb_net("mcast address %s:%pM added to filter\n", dev->name, 340 lbs_deb_net("mcast address %s:%pM added to filter\n", dev->name,
341 mc_list->dmi_addr); 341 ha->addr);
342 i++; 342 i++;
343 cnt--; 343 cnt--;
344 } 344 }
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index 6ab30033c26c..c20eef6b95c2 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -367,22 +367,20 @@ static int lbtf_op_config(struct ieee80211_hw *hw, u32 changed)
367} 367}
368 368
369static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw, 369static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw,
370 int mc_count, struct dev_addr_list *mclist) 370 struct netdev_hw_addr_list *mc_list)
371{ 371{
372 struct lbtf_private *priv = hw->priv; 372 struct lbtf_private *priv = hw->priv;
373 int i; 373 int i;
374 struct netdev_hw_addr *ha;
375 int mc_count = netdev_hw_addr_list_count(mc_list);
374 376
375 if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE) 377 if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE)
376 return mc_count; 378 return mc_count;
377 379
378 priv->nr_of_multicastmacaddr = mc_count; 380 priv->nr_of_multicastmacaddr = mc_count;
379 for (i = 0; i < mc_count; i++) { 381 i = 0;
380 if (!mclist) 382 netdev_hw_addr_list_for_each(ha, mc_list)
381 break; 383 memcpy(&priv->multicastlist[i++], ha->addr, ETH_ALEN);
382 memcpy(&priv->multicastlist[i], mclist->da_addr,
383 ETH_ALEN);
384 mclist = mclist->next;
385 }
386 384
387 return mc_count; 385 return mc_count;
388} 386}
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index ac65e13eb0de..6599fd15e675 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1938,11 +1938,15 @@ struct mwl8k_cmd_mac_multicast_adr {
1938 1938
1939static struct mwl8k_cmd_pkt * 1939static struct mwl8k_cmd_pkt *
1940__mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti, 1940__mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti,
1941 int mc_count, struct dev_addr_list *mclist) 1941 struct netdev_hw_addr_list *mc_list)
1942{ 1942{
1943 struct mwl8k_priv *priv = hw->priv; 1943 struct mwl8k_priv *priv = hw->priv;
1944 struct mwl8k_cmd_mac_multicast_adr *cmd; 1944 struct mwl8k_cmd_mac_multicast_adr *cmd;
1945 int size; 1945 int size;
1946 int mc_count = 0;
1947
1948 if (mc_list)
1949 mc_count = netdev_hw_addr_list_count(mc_list);
1946 1950
1947 if (allmulti || mc_count > priv->num_mcaddrs) { 1951 if (allmulti || mc_count > priv->num_mcaddrs) {
1948 allmulti = 1; 1952 allmulti = 1;
@@ -1963,17 +1967,13 @@ __mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti,
1963 if (allmulti) { 1967 if (allmulti) {
1964 cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_ALL_MULTICAST); 1968 cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_ALL_MULTICAST);
1965 } else if (mc_count) { 1969 } else if (mc_count) {
1966 int i; 1970 struct netdev_hw_addr *ha;
1971 int i = 0;
1967 1972
1968 cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_MULTICAST); 1973 cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_MULTICAST);
1969 cmd->numaddr = cpu_to_le16(mc_count); 1974 cmd->numaddr = cpu_to_le16(mc_count);
1970 for (i = 0; i < mc_count && mclist; i++) { 1975 netdev_hw_addr_list_for_each(ha, mc_list) {
1971 if (mclist->da_addrlen != ETH_ALEN) { 1976 memcpy(cmd->addr[i], ha->addr, ETH_ALEN);
1972 kfree(cmd);
1973 return NULL;
1974 }
1975 memcpy(cmd->addr[i], mclist->da_addr, ETH_ALEN);
1976 mclist = mclist->next;
1977 } 1977 }
1978 } 1978 }
1979 1979
@@ -3552,7 +3552,7 @@ mwl8k_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
3552} 3552}
3553 3553
3554static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw, 3554static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw,
3555 int mc_count, struct dev_addr_list *mclist) 3555 struct netdev_hw_addr_list *mc_list)
3556{ 3556{
3557 struct mwl8k_cmd_pkt *cmd; 3557 struct mwl8k_cmd_pkt *cmd;
3558 3558
@@ -3563,7 +3563,7 @@ static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw,
3563 * we'll end up throwing this packet away and creating a new 3563 * we'll end up throwing this packet away and creating a new
3564 * one in mwl8k_configure_filter(). 3564 * one in mwl8k_configure_filter().
3565 */ 3565 */
3566 cmd = __mwl8k_cmd_mac_multicast_adr(hw, 0, mc_count, mclist); 3566 cmd = __mwl8k_cmd_mac_multicast_adr(hw, 0, mc_list);
3567 3567
3568 return (unsigned long)cmd; 3568 return (unsigned long)cmd;
3569} 3569}
@@ -3686,7 +3686,7 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw,
3686 */ 3686 */
3687 if (*total_flags & FIF_ALLMULTI) { 3687 if (*total_flags & FIF_ALLMULTI) {
3688 kfree(cmd); 3688 kfree(cmd);
3689 cmd = __mwl8k_cmd_mac_multicast_adr(hw, 1, 0, NULL); 3689 cmd = __mwl8k_cmd_mac_multicast_adr(hw, 1, NULL);
3690 } 3690 }
3691 3691
3692 if (cmd != NULL) { 3692 if (cmd != NULL) {
diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c
index 883b8f868626..9f657afaa3e5 100644
--- a/drivers/net/wireless/orinoco/hw.c
+++ b/drivers/net/wireless/orinoco/hw.c
@@ -1056,14 +1056,14 @@ int __orinoco_hw_set_multicast_list(struct orinoco_private *priv,
1056 * group address if either we want to multicast, or if we were 1056 * group address if either we want to multicast, or if we were
1057 * multicasting and want to stop */ 1057 * multicasting and want to stop */
1058 if (!promisc && (mc_count || priv->mc_count)) { 1058 if (!promisc && (mc_count || priv->mc_count)) {
1059 struct dev_mc_list *p; 1059 struct netdev_hw_addr *ha;
1060 struct hermes_multicast mclist; 1060 struct hermes_multicast mclist;
1061 int i = 0; 1061 int i = 0;
1062 1062
1063 netdev_for_each_mc_addr(p, dev) { 1063 netdev_for_each_mc_addr(ha, dev) {
1064 if (i == mc_count) 1064 if (i == mc_count)
1065 break; 1065 break;
1066 memcpy(mclist.addr[i++], p->dmi_addr, ETH_ALEN); 1066 memcpy(mclist.addr[i++], ha->addr, ETH_ALEN);
1067 } 1067 }
1068 1068
1069 err = hermes_write_ltv(hw, USER_BAP, 1069 err = hermes_write_ltv(hw, USER_BAP,
diff --git a/drivers/net/wireless/orinoco/hw.h b/drivers/net/wireless/orinoco/hw.h
index 9799a1d14a63..97af71e79950 100644
--- a/drivers/net/wireless/orinoco/hw.h
+++ b/drivers/net/wireless/orinoco/hw.h
@@ -22,7 +22,6 @@
22 22
23/* Forward declarations */ 23/* Forward declarations */
24struct orinoco_private; 24struct orinoco_private;
25struct dev_addr_list;
26 25
27int determine_fw_capabilities(struct orinoco_private *priv, char *fw_name, 26int determine_fw_capabilities(struct orinoco_private *priv, char *fw_name,
28 size_t fw_name_len, u32 *hw_ver); 27 size_t fw_name_len, u32 *hw_ver);
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 4f5bdb528ef7..54680a3a5acb 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -1875,17 +1875,17 @@ static void ray_update_multi_list(struct net_device *dev, int all)
1875 writeb(0xff, &pccs->var); 1875 writeb(0xff, &pccs->var);
1876 local->num_multi = 0xff; 1876 local->num_multi = 0xff;
1877 } else { 1877 } else {
1878 struct dev_mc_list *dmi; 1878 struct netdev_hw_addr *ha;
1879 int i = 0; 1879 int i = 0;
1880 1880
1881 /* Copy the kernel's list of MC addresses to card */ 1881 /* Copy the kernel's list of MC addresses to card */
1882 netdev_for_each_mc_addr(dmi, dev) { 1882 netdev_for_each_mc_addr(ha, dev) {
1883 memcpy_toio(p, dmi->dmi_addr, ETH_ALEN); 1883 memcpy_toio(p, ha->addr, ETH_ALEN);
1884 dev_dbg(&link->dev, 1884 dev_dbg(&link->dev,
1885 "ray_update_multi add addr %02x%02x%02x%02x%02x%02x\n", 1885 "ray_update_multi add addr %02x%02x%02x%02x%02x%02x\n",
1886 dmi->dmi_addr[0], dmi->dmi_addr[1], 1886 ha->addr[0], ha->addr[1],
1887 dmi->dmi_addr[2], dmi->dmi_addr[3], 1887 ha->addr[2], ha->addr[3],
1888 dmi->dmi_addr[4], dmi->dmi_addr[5]); 1888 ha->addr[4], ha->addr[5]);
1889 p += ETH_ALEN; 1889 p += ETH_ALEN;
1890 i++; 1890 i++;
1891 } 1891 }
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index aceb95ef7274..8ab9f094747b 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -1545,7 +1545,7 @@ static int remove_key(struct usbnet *usbdev, int index, const u8 *bssid)
1545static void set_multicast_list(struct usbnet *usbdev) 1545static void set_multicast_list(struct usbnet *usbdev)
1546{ 1546{
1547 struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); 1547 struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
1548 struct dev_mc_list *mclist; 1548 struct netdev_hw_addr *ha;
1549 __le32 filter, basefilter; 1549 __le32 filter, basefilter;
1550 int ret; 1550 int ret;
1551 char *mc_addrs = NULL; 1551 char *mc_addrs = NULL;
@@ -1584,9 +1584,9 @@ static void set_multicast_list(struct usbnet *usbdev)
1584 return; 1584 return;
1585 } 1585 }
1586 1586
1587 netdev_for_each_mc_addr(mclist, usbdev->net) 1587 netdev_for_each_mc_addr(ha, usbdev->net)
1588 memcpy(mc_addrs + i++ * ETH_ALEN, 1588 memcpy(mc_addrs + i++ * ETH_ALEN,
1589 mclist->dmi_addr, ETH_ALEN); 1589 ha->addr, ETH_ALEN);
1590 } 1590 }
1591 netif_addr_unlock_bh(usbdev->net); 1591 netif_addr_unlock_bh(usbdev->net);
1592 1592
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c
index 2b928ecf47bd..fb8a62f2b9b4 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c
@@ -723,10 +723,10 @@ static void rtl8180_bss_info_changed(struct ieee80211_hw *dev,
723 priv->rf->conf_erp(dev, info); 723 priv->rf->conf_erp(dev, info);
724} 724}
725 725
726static u64 rtl8180_prepare_multicast(struct ieee80211_hw *dev, int mc_count, 726static u64 rtl8180_prepare_multicast(struct ieee80211_hw *dev,
727 struct dev_addr_list *mc_list) 727 struct netdev_hw_addr_list *mc_list)
728{ 728{
729 return mc_count; 729 return netdev_hw_addr_list_count(mc_list);
730} 730}
731 731
732static void rtl8180_configure_filter(struct ieee80211_hw *dev, 732static void rtl8180_configure_filter(struct ieee80211_hw *dev,
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c
index 0fb850e0c656..441d817ed489 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -1193,9 +1193,9 @@ static void rtl8187_bss_info_changed(struct ieee80211_hw *dev,
1193} 1193}
1194 1194
1195static u64 rtl8187_prepare_multicast(struct ieee80211_hw *dev, 1195static u64 rtl8187_prepare_multicast(struct ieee80211_hw *dev,
1196 int mc_count, struct dev_addr_list *mc_list) 1196 struct netdev_hw_addr_list *mc_list)
1197{ 1197{
1198 return mc_count; 1198 return netdev_hw_addr_list_count(mc_list);
1199} 1199}
1200 1200
1201static void rtl8187_configure_filter(struct ieee80211_hw *dev, 1201static void rtl8187_configure_filter(struct ieee80211_hw *dev,
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 3daba6c0c77f..6036d0206fec 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1266,11 +1266,11 @@ struct wl1271_filter_params {
1266 u8 mc_list[ACX_MC_ADDRESS_GROUP_MAX][ETH_ALEN]; 1266 u8 mc_list[ACX_MC_ADDRESS_GROUP_MAX][ETH_ALEN];
1267}; 1267};
1268 1268
1269static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, 1269static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw,
1270 struct dev_addr_list *mc_list) 1270 struct netdev_hw_addr_list *mc_list)
1271{ 1271{
1272 struct wl1271_filter_params *fp; 1272 struct wl1271_filter_params *fp;
1273 int i; 1273 struct netdev_hw_addr *ha;
1274 1274
1275 fp = kzalloc(sizeof(*fp), GFP_ATOMIC); 1275 fp = kzalloc(sizeof(*fp), GFP_ATOMIC);
1276 if (!fp) { 1276 if (!fp) {
@@ -1279,21 +1279,16 @@ static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count,
1279 } 1279 }
1280 1280
1281 /* update multicast filtering parameters */ 1281 /* update multicast filtering parameters */
1282 fp->enabled = true;
1283 if (mc_count > ACX_MC_ADDRESS_GROUP_MAX) {
1284 mc_count = 0;
1285 fp->enabled = false;
1286 }
1287
1288 fp->mc_list_length = 0; 1282 fp->mc_list_length = 0;
1289 for (i = 0; i < mc_count; i++) { 1283 if (netdev_hw_addr_list_count(mc_list) > ACX_MC_ADDRESS_GROUP_MAX) {
1290 if (mc_list->da_addrlen == ETH_ALEN) { 1284 fp->enabled = false;
1285 } else {
1286 fp->enabled = true;
1287 netdev_hw_addr_list_for_each(ha, mc_list) {
1291 memcpy(fp->mc_list[fp->mc_list_length], 1288 memcpy(fp->mc_list[fp->mc_list_length],
1292 mc_list->da_addr, ETH_ALEN); 1289 ha->addr, ETH_ALEN);
1293 fp->mc_list_length++; 1290 fp->mc_list_length++;
1294 } else 1291 }
1295 wl1271_warning("Unknown mc address length.");
1296 mc_list = mc_list->next;
1297 } 1292 }
1298 1293
1299 return (u64)(unsigned long)fp; 1294 return (u64)(unsigned long)fp;
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index 6917286edcae..74530b2d672c 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -875,7 +875,7 @@ static struct iw_statistics *zd1201_get_wireless_stats(struct net_device *dev)
875static void zd1201_set_multicast(struct net_device *dev) 875static void zd1201_set_multicast(struct net_device *dev)
876{ 876{
877 struct zd1201 *zd = netdev_priv(dev); 877 struct zd1201 *zd = netdev_priv(dev);
878 struct dev_mc_list *mc; 878 struct netdev_hw_addr *ha;
879 unsigned char reqbuf[ETH_ALEN*ZD1201_MAXMULTI]; 879 unsigned char reqbuf[ETH_ALEN*ZD1201_MAXMULTI];
880 int i; 880 int i;
881 881
@@ -883,8 +883,8 @@ static void zd1201_set_multicast(struct net_device *dev)
883 return; 883 return;
884 884
885 i = 0; 885 i = 0;
886 netdev_for_each_mc_addr(mc, dev) 886 netdev_for_each_mc_addr(ha, dev)
887 memcpy(reqbuf + i++ * ETH_ALEN, mc->dmi_addr, ETH_ALEN); 887 memcpy(reqbuf + i++ * ETH_ALEN, ha->addr, ETH_ALEN);
888 zd1201_setconfig(zd, ZD1201_RID_CNFGROUPADDRESS, reqbuf, 888 zd1201_setconfig(zd, ZD1201_RID_CNFGROUPADDRESS, reqbuf,
889 netdev_mc_count(dev) * ETH_ALEN, 0); 889 netdev_mc_count(dev) * ETH_ALEN, 0);
890} 890}
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index 00e09e26c826..6d95e4d74d7f 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -947,20 +947,17 @@ static void set_rx_filter_handler(struct work_struct *work)
947} 947}
948 948
949static u64 zd_op_prepare_multicast(struct ieee80211_hw *hw, 949static u64 zd_op_prepare_multicast(struct ieee80211_hw *hw,
950 int mc_count, struct dev_addr_list *mclist) 950 struct netdev_hw_addr_list *mc_list)
951{ 951{
952 struct zd_mac *mac = zd_hw_mac(hw); 952 struct zd_mac *mac = zd_hw_mac(hw);
953 struct zd_mc_hash hash; 953 struct zd_mc_hash hash;
954 int i; 954 struct netdev_hw_addr *ha;
955 955
956 zd_mc_clear(&hash); 956 zd_mc_clear(&hash);
957 957
958 for (i = 0; i < mc_count; i++) { 958 netdev_hw_addr_list_for_each(ha, mc_list) {
959 if (!mclist) 959 dev_dbg_f(zd_mac_dev(mac), "mc addr %pM\n", ha->addr);
960 break; 960 zd_mc_add_addr(&hash, ha->addr);
961 dev_dbg_f(zd_mac_dev(mac), "mc addr %pM\n", mclist->dmi_addr);
962 zd_mc_add_addr(&hash, mclist->dmi_addr);
963 mclist = mclist->next;
964 } 961 }
965 962
966 return hash.low | ((u64)hash.high << 32); 963 return hash.low | ((u64)hash.high << 32);