diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-12-04 23:18:37 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-16 11:29:47 +0100 |
commit | e716251d776ce92eb5169522f565ada3deed2a2a (patch) | |
tree | 70615090a03c61e6f0d3f29b8b93e54cd8622f90 /net/mac80211/sta_info.h | |
parent | d778207b06ac1becd012eb689dafdf85feebb179 (diff) |
mac80211: optimise mixed AP/VLAN station removal
Teach sta_info_flush() to optionally also remove stations
from all VLANs associated with an AP interface to optimise
the station removal (in particular, synchronize_net().)
To not have to add the vlans argument throughout, do some
refactoring.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/sta_info.h')
-rw-r--r-- | net/mac80211/sta_info.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index f6081e574a2..d77ff709063 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h @@ -613,8 +613,14 @@ void sta_info_stop(struct ieee80211_local *local); * Returns the number of removed STA entries. * * @sdata: sdata to remove all stations from + * @vlans: if the given interface is an AP interface, also flush VLANs */ -int sta_info_flush(struct ieee80211_sub_if_data *sdata); +int __sta_info_flush(struct ieee80211_sub_if_data *sdata, bool vlans); + +static inline int sta_info_flush(struct ieee80211_sub_if_data *sdata) +{ + return __sta_info_flush(sdata, false); +} void sta_set_rate_info_tx(struct sta_info *sta, const struct ieee80211_tx_rate *rate, |