diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-07-02 18:27:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-07-08 14:16:01 -0400 |
commit | fc32f9243dc93e75f81457e95d9cb90ee6136d94 (patch) | |
tree | b95c2c4ac3cf2052d9bcb67eeac51cfe6fee2a9b /net/mac80211 | |
parent | 8e8862b79d2ce9177bfddd85b8328a86a25c69b2 (diff) |
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')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/main.c | 12 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 175cbdd36d7f..02a8753a4eca 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -893,7 +893,7 @@ int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason); | |||
893 | int ieee80211_sta_disassociate(struct net_device *dev, u16 reason); | 893 | int ieee80211_sta_disassociate(struct net_device *dev, u16 reason); |
894 | void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | 894 | void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, |
895 | u32 changed); | 895 | u32 changed); |
896 | void ieee80211_reset_erp_info(struct net_device *dev); | 896 | u32 ieee80211_reset_erp_info(struct net_device *dev); |
897 | int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie, | 897 | int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie, |
898 | struct ieee80211_ht_info *ht_info); | 898 | struct ieee80211_ht_info *ht_info); |
899 | int ieee80211_ht_addt_info_ie_to_ht_bss_info( | 899 | int ieee80211_ht_addt_info_ie_to_ht_bss_info( |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 074f71a62a6d..cc756e93e6c8 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -182,10 +182,11 @@ static int ieee80211_open(struct net_device *dev) | |||
182 | { | 182 | { |
183 | struct ieee80211_sub_if_data *sdata, *nsdata; | 183 | struct ieee80211_sub_if_data *sdata, *nsdata; |
184 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 184 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
185 | struct sta_info *sta; | ||
185 | struct ieee80211_if_init_conf conf; | 186 | struct ieee80211_if_init_conf conf; |
187 | u32 changed = 0; | ||
186 | int res; | 188 | int res; |
187 | bool need_hw_reconfig = 0; | 189 | bool need_hw_reconfig = 0; |
188 | struct sta_info *sta; | ||
189 | 190 | ||
190 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 191 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
191 | 192 | ||
@@ -329,7 +330,8 @@ static int ieee80211_open(struct net_device *dev) | |||
329 | goto err_stop; | 330 | goto err_stop; |
330 | 331 | ||
331 | ieee80211_if_config(dev); | 332 | ieee80211_if_config(dev); |
332 | ieee80211_reset_erp_info(dev); | 333 | changed |= ieee80211_reset_erp_info(dev); |
334 | ieee80211_bss_info_change_notify(sdata, changed); | ||
333 | ieee80211_enable_keys(sdata); | 335 | ieee80211_enable_keys(sdata); |
334 | 336 | ||
335 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA && | 337 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA && |
@@ -1190,15 +1192,13 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | |||
1190 | changed); | 1192 | changed); |
1191 | } | 1193 | } |
1192 | 1194 | ||
1193 | void ieee80211_reset_erp_info(struct net_device *dev) | 1195 | u32 ieee80211_reset_erp_info(struct net_device *dev) |
1194 | { | 1196 | { |
1195 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1197 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
1196 | 1198 | ||
1197 | sdata->bss_conf.use_cts_prot = 0; | 1199 | sdata->bss_conf.use_cts_prot = 0; |
1198 | sdata->bss_conf.use_short_preamble = 0; | 1200 | sdata->bss_conf.use_short_preamble = 0; |
1199 | ieee80211_bss_info_change_notify(sdata, | 1201 | return BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_ERP_PREAMBLE; |
1200 | BSS_CHANGED_ERP_CTS_PROT | | ||
1201 | BSS_CHANGED_ERP_PREAMBLE); | ||
1202 | } | 1202 | } |
1203 | 1203 | ||
1204 | void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, | 1204 | void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 2a927089f4db..37ea04f5bab9 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -573,7 +573,7 @@ static void ieee80211_set_associated(struct net_device *dev, | |||
573 | ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid); | 573 | ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid); |
574 | ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; | 574 | ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; |
575 | netif_carrier_off(dev); | 575 | netif_carrier_off(dev); |
576 | ieee80211_reset_erp_info(dev); | 576 | changed |= ieee80211_reset_erp_info(dev); |
577 | 577 | ||
578 | sdata->bss_conf.assoc_ht = 0; | 578 | sdata->bss_conf.assoc_ht = 0; |
579 | sdata->bss_conf.ht_conf = NULL; | 579 | sdata->bss_conf.ht_conf = NULL; |