diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_main.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index b0837255de6f..62e544041d0d 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/vmalloc.h> | 30 | #include <linux/vmalloc.h> |
31 | #include <linux/inetdevice.h> | 31 | #include <linux/inetdevice.h> |
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include "wl1271.h" | 35 | #include "wl1271.h" |
35 | #include "wl12xx_80211.h" | 36 | #include "wl12xx_80211.h" |
@@ -1343,12 +1344,12 @@ struct wl1271_filter_params { | |||
1343 | u8 mc_list[ACX_MC_ADDRESS_GROUP_MAX][ETH_ALEN]; | 1344 | u8 mc_list[ACX_MC_ADDRESS_GROUP_MAX][ETH_ALEN]; |
1344 | }; | 1345 | }; |
1345 | 1346 | ||
1346 | static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, | 1347 | static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, |
1347 | struct dev_addr_list *mc_list) | 1348 | struct netdev_hw_addr_list *mc_list) |
1348 | { | 1349 | { |
1349 | struct wl1271_filter_params *fp; | 1350 | struct wl1271_filter_params *fp; |
1351 | struct netdev_hw_addr *ha; | ||
1350 | struct wl1271 *wl = hw->priv; | 1352 | struct wl1271 *wl = hw->priv; |
1351 | int i; | ||
1352 | 1353 | ||
1353 | if (unlikely(wl->state == WL1271_STATE_OFF)) | 1354 | if (unlikely(wl->state == WL1271_STATE_OFF)) |
1354 | return 0; | 1355 | return 0; |
@@ -1360,21 +1361,16 @@ static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, | |||
1360 | } | 1361 | } |
1361 | 1362 | ||
1362 | /* update multicast filtering parameters */ | 1363 | /* update multicast filtering parameters */ |
1363 | fp->enabled = true; | ||
1364 | if (mc_count > ACX_MC_ADDRESS_GROUP_MAX) { | ||
1365 | mc_count = 0; | ||
1366 | fp->enabled = false; | ||
1367 | } | ||
1368 | |||
1369 | fp->mc_list_length = 0; | 1364 | fp->mc_list_length = 0; |
1370 | for (i = 0; i < mc_count; i++) { | 1365 | if (netdev_hw_addr_list_count(mc_list) > ACX_MC_ADDRESS_GROUP_MAX) { |
1371 | if (mc_list->da_addrlen == ETH_ALEN) { | 1366 | fp->enabled = false; |
1367 | } else { | ||
1368 | fp->enabled = true; | ||
1369 | netdev_hw_addr_list_for_each(ha, mc_list) { | ||
1372 | memcpy(fp->mc_list[fp->mc_list_length], | 1370 | memcpy(fp->mc_list[fp->mc_list_length], |
1373 | mc_list->da_addr, ETH_ALEN); | 1371 | ha->addr, ETH_ALEN); |
1374 | fp->mc_list_length++; | 1372 | fp->mc_list_length++; |
1375 | } else | 1373 | } |
1376 | wl1271_warning("Unknown mc address length."); | ||
1377 | mc_list = mc_list->next; | ||
1378 | } | 1374 | } |
1379 | 1375 | ||
1380 | return (u64)(unsigned long)fp; | 1376 | return (u64)(unsigned long)fp; |