diff options
Diffstat (limited to 'drivers/net/wireless/libertas_tf/main.c')
-rw-r--r-- | drivers/net/wireless/libertas_tf/main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c index 6ab30033c26c..7533a23e0500 100644 --- a/drivers/net/wireless/libertas_tf/main.c +++ b/drivers/net/wireless/libertas_tf/main.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * the Free Software Foundation; either version 2 of the License, or (at | 7 | * the Free Software Foundation; either version 2 of the License, or (at |
8 | * your option) any later version. | 8 | * your option) any later version. |
9 | */ | 9 | */ |
10 | #include <linux/slab.h> | ||
11 | |||
10 | #include "libertas_tf.h" | 12 | #include "libertas_tf.h" |
11 | #include "linux/etherdevice.h" | 13 | #include "linux/etherdevice.h" |
12 | 14 | ||
@@ -367,22 +369,20 @@ static int lbtf_op_config(struct ieee80211_hw *hw, u32 changed) | |||
367 | } | 369 | } |
368 | 370 | ||
369 | static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw, | 371 | static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw, |
370 | int mc_count, struct dev_addr_list *mclist) | 372 | struct netdev_hw_addr_list *mc_list) |
371 | { | 373 | { |
372 | struct lbtf_private *priv = hw->priv; | 374 | struct lbtf_private *priv = hw->priv; |
373 | int i; | 375 | int i; |
376 | struct netdev_hw_addr *ha; | ||
377 | int mc_count = netdev_hw_addr_list_count(mc_list); | ||
374 | 378 | ||
375 | if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE) | 379 | if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE) |
376 | return mc_count; | 380 | return mc_count; |
377 | 381 | ||
378 | priv->nr_of_multicastmacaddr = mc_count; | 382 | priv->nr_of_multicastmacaddr = mc_count; |
379 | for (i = 0; i < mc_count; i++) { | 383 | i = 0; |
380 | if (!mclist) | 384 | netdev_hw_addr_list_for_each(ha, mc_list) |
381 | break; | 385 | 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 | 386 | ||
387 | return mc_count; | 387 | return mc_count; |
388 | } | 388 | } |