summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2010-01-12 13:47:37 +0100
committerJohn W. Linville <linville@tuxdriver.com>2010-01-12 14:21:09 -0500
commitc97470dd253831e880c72ea5d022ed7f3aee45c3 (patch)
tree9c7877382c1d53d81687873d2fc23acc591b0baf /drivers/net/wireless/mwl8k.c
parent9189c10087a738c764046fa27651d332594cd8e6 (diff)
downloadop-kernel-dev-c97470dd253831e880c72ea5d022ed7f3aee45c3.zip
op-kernel-dev-c97470dd253831e880c72ea5d022ed7f3aee45c3.tar.gz
mwl8k: don't call SET_AID if we're not associated
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r--drivers/net/wireless/mwl8k.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index f2c4524..67ee3da 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -3261,9 +3261,9 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
/*
* Get the AP's legacy and MCS rates.
*/
- ap_legacy_rates = 0;
if (vif->bss_conf.assoc) {
struct ieee80211_sta *ap;
+
rcu_read_lock();
ap = ieee80211_find_sta(vif, vif->bss_conf.bssid);
@@ -3301,8 +3301,9 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
goto out;
}
- if (((changed & BSS_CHANGED_ASSOC) && vif->bss_conf.assoc) ||
- (changed & (BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_HT))) {
+ if (vif->bss_conf.assoc &&
+ (changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_ERP_CTS_PROT |
+ BSS_CHANGED_HT))) {
rc = mwl8k_cmd_set_aid(hw, vif, ap_legacy_rates);
if (rc)
goto out;
OpenPOWER on IntegriCloud