diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-01-14 10:39:07 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-18 15:20:34 -0500 |
commit | 0f19b41e223d787251c59137e61fc5145c13d1c4 (patch) | |
tree | 32715057d43ecb8a35b36f97320225f12094de70 /net/mac80211/main.c | |
parent | de5fad815703b5b24bc4726cd71422929537d259 (diff) |
mac80211: remove ARP filter enable/disable logic
Depending on the driver, having ARP filtering for
some addresses may be possible. Remove the logic
that tracks whether ARP filter is enabled or not
and give the driver the total number of addresses
instead of the length of the list so it can make
its own decision.
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 39cfe8f10ad2..baf9720c1876 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -349,27 +349,19 @@ static int ieee80211_ifa_changed(struct notifier_block *nb, | |||
349 | 349 | ||
350 | /* Copy the addresses to the bss_conf list */ | 350 | /* Copy the addresses to the bss_conf list */ |
351 | ifa = idev->ifa_list; | 351 | ifa = idev->ifa_list; |
352 | while (c < IEEE80211_BSS_ARP_ADDR_LIST_LEN && ifa) { | 352 | while (ifa) { |
353 | bss_conf->arp_addr_list[c] = ifa->ifa_address; | 353 | if (c < IEEE80211_BSS_ARP_ADDR_LIST_LEN) |
354 | bss_conf->arp_addr_list[c] = ifa->ifa_address; | ||
354 | ifa = ifa->ifa_next; | 355 | ifa = ifa->ifa_next; |
355 | c++; | 356 | c++; |
356 | } | 357 | } |
357 | 358 | ||
358 | /* If not all addresses fit the list, disable filtering */ | ||
359 | if (ifa) { | ||
360 | sdata->arp_filter_state = false; | ||
361 | c = 0; | ||
362 | } else { | ||
363 | sdata->arp_filter_state = true; | ||
364 | } | ||
365 | bss_conf->arp_addr_cnt = c; | 359 | bss_conf->arp_addr_cnt = c; |
366 | 360 | ||
367 | /* Configure driver only if associated (which also implies it is up) */ | 361 | /* Configure driver only if associated (which also implies it is up) */ |
368 | if (ifmgd->associated) { | 362 | if (ifmgd->associated) |
369 | bss_conf->arp_filter_enabled = sdata->arp_filter_state; | ||
370 | ieee80211_bss_info_change_notify(sdata, | 363 | ieee80211_bss_info_change_notify(sdata, |
371 | BSS_CHANGED_ARP_FILTER); | 364 | BSS_CHANGED_ARP_FILTER); |
372 | } | ||
373 | 365 | ||
374 | mutex_unlock(&ifmgd->mtx); | 366 | mutex_unlock(&ifmgd->mtx); |
375 | 367 | ||