summaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-07-03 01:27:13 +0300
committerJohn W. Linville <linville@tuxdriver.com>2008-07-08 14:16:01 -0400
commitfc32f9243dc93e75f81457e95d9cb90ee6136d94 (patch)
treeb95c2c4ac3cf2052d9bcb67eeac51cfe6fee2a9b /net/mac80211/main.c
parent8e8862b79d2ce9177bfddd85b8328a86a25c69b2 (diff)
downloadkernel-crypto-fc32f9243dc93e75f81457e95d9cb90ee6136d94.tar.gz
kernel-crypto-fc32f9243dc93e75f81457e95d9cb90ee6136d94.tar.xz
kernel-crypto-fc32f9243dc93e75f81457e95d9cb90ee6136d94.zip
mac80211: call bss_info_change only once upon disassociation
This patch removes call of ieee80211_bss_info_change_notify from within ieee80211_reset_erp_info. This allows gathering all bss info changes into one call to the driver in the disassociation flow. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 074f71a62a6..cc756e93e6c 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -182,10 +182,11 @@ static int ieee80211_open(struct net_device *dev)
{
struct ieee80211_sub_if_data *sdata, *nsdata;
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ struct sta_info *sta;
struct ieee80211_if_init_conf conf;
+ u32 changed = 0;
int res;
bool need_hw_reconfig = 0;
- struct sta_info *sta;
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -329,7 +330,8 @@ static int ieee80211_open(struct net_device *dev)
goto err_stop;
ieee80211_if_config(dev);
- ieee80211_reset_erp_info(dev);
+ changed |= ieee80211_reset_erp_info(dev);
+ ieee80211_bss_info_change_notify(sdata, changed);
ieee80211_enable_keys(sdata);
if (sdata->vif.type == IEEE80211_IF_TYPE_STA &&
@@ -1190,15 +1192,13 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
changed);
}
-void ieee80211_reset_erp_info(struct net_device *dev)
+u32 ieee80211_reset_erp_info(struct net_device *dev)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
sdata->bss_conf.use_cts_prot = 0;
sdata->bss_conf.use_short_preamble = 0;
- ieee80211_bss_info_change_notify(sdata,
- BSS_CHANGED_ERP_CTS_PROT |
- BSS_CHANGED_ERP_PREAMBLE);
+ return BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_ERP_PREAMBLE;
}
void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,