diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_main.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 25 |
1 files changed, 10 insertions, 15 deletions
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 | ||
1269 | static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, | 1269 | static 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; |