Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/*
* 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);
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;