aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas_tf
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas_tf')
-rw-r--r--drivers/net/wireless/libertas_tf/cmd.c2
-rw-r--r--drivers/net/wireless/libertas_tf/if_usb.c1
-rw-r--r--drivers/net/wireless/libertas_tf/main.c16
3 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/wireless/libertas_tf/cmd.c b/drivers/net/wireless/libertas_tf/cmd.c
index 28790e03dc43..b620daf59ef7 100644
--- a/drivers/net/wireless/libertas_tf/cmd.c
+++ b/drivers/net/wireless/libertas_tf/cmd.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 13
12static const struct channel_range channel_ranges[] = { 14static const struct channel_range channel_ranges[] = {
diff --git a/drivers/net/wireless/libertas_tf/if_usb.c b/drivers/net/wireless/libertas_tf/if_usb.c
index 3691c307e674..8cc9db60c14b 100644
--- a/drivers/net/wireless/libertas_tf/if_usb.c
+++ b/drivers/net/wireless/libertas_tf/if_usb.c
@@ -11,6 +11,7 @@
11#include <linux/moduleparam.h> 11#include <linux/moduleparam.h>
12#include <linux/firmware.h> 12#include <linux/firmware.h>
13#include <linux/netdevice.h> 13#include <linux/netdevice.h>
14#include <linux/slab.h>
14#include <linux/usb.h> 15#include <linux/usb.h>
15 16
16#define DRV_NAME "lbtf_usb" 17#define DRV_NAME "lbtf_usb"
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
369static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw, 371static 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}