Commit fc32f924 authored by Tomas Winkler's avatar Tomas Winkler Committed by John W. Linville

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: default avatarTomas Winkler <tomas.winkler@intel.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8e8862b7
...@@ -893,7 +893,7 @@ int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason); ...@@ -893,7 +893,7 @@ int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason);
int ieee80211_sta_disassociate(struct net_device *dev, u16 reason); int ieee80211_sta_disassociate(struct net_device *dev, u16 reason);
void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
u32 changed); u32 changed);
void ieee80211_reset_erp_info(struct net_device *dev); u32 ieee80211_reset_erp_info(struct net_device *dev);
int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie, int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie,
struct ieee80211_ht_info *ht_info); struct ieee80211_ht_info *ht_info);
int ieee80211_ht_addt_info_ie_to_ht_bss_info( int ieee80211_ht_addt_info_ie_to_ht_bss_info(
......
...@@ -182,10 +182,11 @@ static int ieee80211_open(struct net_device *dev) ...@@ -182,10 +182,11 @@ static int ieee80211_open(struct net_device *dev)
{ {
struct ieee80211_sub_if_data *sdata, *nsdata; struct ieee80211_sub_if_data *sdata, *nsdata;
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct sta_info *sta;
struct ieee80211_if_init_conf conf; struct ieee80211_if_init_conf conf;
u32 changed = 0;
int res; int res;
bool need_hw_reconfig = 0; bool need_hw_reconfig = 0;
struct sta_info *sta;
sdata = IEEE80211_DEV_TO_SUB_IF(dev); sdata = IEEE80211_DEV_TO_SUB_IF(dev);
...@@ -329,7 +330,8 @@ static int ieee80211_open(struct net_device *dev) ...@@ -329,7 +330,8 @@ static int ieee80211_open(struct net_device *dev)
goto err_stop; goto err_stop;
ieee80211_if_config(dev); 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); ieee80211_enable_keys(sdata);
if (sdata->vif.type == IEEE80211_IF_TYPE_STA && 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,15 +1192,13 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
changed); 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); struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
sdata->bss_conf.use_cts_prot = 0; sdata->bss_conf.use_cts_prot = 0;
sdata->bss_conf.use_short_preamble = 0; sdata->bss_conf.use_short_preamble = 0;
ieee80211_bss_info_change_notify(sdata, return BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_ERP_PREAMBLE;
BSS_CHANGED_ERP_CTS_PROT |
BSS_CHANGED_ERP_PREAMBLE);
} }
void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
......
...@@ -573,7 +573,7 @@ static void ieee80211_set_associated(struct net_device *dev, ...@@ -573,7 +573,7 @@ static void ieee80211_set_associated(struct net_device *dev,
ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid); ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid);
ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; ifsta->flags &= ~IEEE80211_STA_ASSOCIATED;
netif_carrier_off(dev); netif_carrier_off(dev);
ieee80211_reset_erp_info(dev); changed |= ieee80211_reset_erp_info(dev);
sdata->bss_conf.assoc_ht = 0; sdata->bss_conf.assoc_ht = 0;
sdata->bss_conf.ht_conf = NULL; sdata->bss_conf.ht_conf = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment