}
static int wlcore_set_assoc(struct wl1271 *wl, struct wl12xx_vif *wlvif,
- struct ieee80211_bss_conf *bss_conf)
+ struct ieee80211_bss_conf *bss_conf,
+ u32 sta_rate_set)
{
int ieoffset;
int ret;
* setting is off (ACTIVE), so sync the fw with the correct value.
*/
ret = wl1271_ps_set_mode(wl, wlvif, STATION_ACTIVE_MODE);
+ if (ret < 0)
+ return ret;
+
+ if (sta_rate_set) {
+ wlvif->rate_set =
+ wl1271_tx_enabled_rates_get(wl,
+ sta_rate_set,
+ wlvif->band);
+ ret = wl1271_acx_sta_rate_policies(wl, wlvif);
+ if (ret < 0)
+ return ret;
+ }
return ret;
}
wlvif->rssi_thold = bss_conf->cqm_rssi_thold;
}
- if (changed & (BSS_CHANGED_BSSID | BSS_CHANGED_HT)) {
+ if (changed & (BSS_CHANGED_BSSID | BSS_CHANGED_HT |
+ BSS_CHANGED_ASSOC)) {
rcu_read_lock();
sta = ieee80211_find_sta(vif, bss_conf->bssid);
if (!sta)
if (changed & BSS_CHANGED_ASSOC) {
if (bss_conf->assoc) {
- ret = wlcore_set_assoc(wl, wlvif, bss_conf);
+ ret = wlcore_set_assoc(wl, wlvif, bss_conf,
+ sta_rate_set);
if (ret < 0)
goto out;