aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2012-11-20 06:20:09 -0500
committerLuciano Coelho <coelho@ti.com>2012-11-27 03:49:10 -0500
commitec87011a4ac30a4a6ddfbf5dc17e302a490c7763 (patch)
treef4c06892824eee82b99ae0ba51de44e5b301e1d1 /drivers
parent42ec1f82a862b38eb84bc3bbd7fb97b1aa48f18c (diff)
wlcore: reconfigure rate policy on association
When first configuring the rate policy, before auth, we still don't have the correct rates that were agreed during association. Reconfigure the rate policy on association in order to update them. Signed-off-by: Eliad Peller <eliad@wizery.com> Reviewed-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index ef1fd0435947..87fa426c46f2 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -2553,7 +2553,8 @@ static int wlcore_set_ssid(struct wl1271 *wl, struct wl12xx_vif *wlvif)
2553} 2553}
2554 2554
2555static int wlcore_set_assoc(struct wl1271 *wl, struct wl12xx_vif *wlvif, 2555static int wlcore_set_assoc(struct wl1271 *wl, struct wl12xx_vif *wlvif,
2556 struct ieee80211_bss_conf *bss_conf) 2556 struct ieee80211_bss_conf *bss_conf,
2557 u32 sta_rate_set)
2557{ 2558{
2558 int ieoffset; 2559 int ieoffset;
2559 int ret; 2560 int ret;
@@ -2619,6 +2620,18 @@ static int wlcore_set_assoc(struct wl1271 *wl, struct wl12xx_vif *wlvif,
2619 * setting is off (ACTIVE), so sync the fw with the correct value. 2620 * setting is off (ACTIVE), so sync the fw with the correct value.
2620 */ 2621 */
2621 ret = wl1271_ps_set_mode(wl, wlvif, STATION_ACTIVE_MODE); 2622 ret = wl1271_ps_set_mode(wl, wlvif, STATION_ACTIVE_MODE);
2623 if (ret < 0)
2624 return ret;
2625
2626 if (sta_rate_set) {
2627 wlvif->rate_set =
2628 wl1271_tx_enabled_rates_get(wl,
2629 sta_rate_set,
2630 wlvif->band);
2631 ret = wl1271_acx_sta_rate_policies(wl, wlvif);
2632 if (ret < 0)
2633 return ret;
2634 }
2622 2635
2623 return ret; 2636 return ret;
2624} 2637}
@@ -3912,7 +3925,8 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
3912 wlvif->rssi_thold = bss_conf->cqm_rssi_thold; 3925 wlvif->rssi_thold = bss_conf->cqm_rssi_thold;
3913 } 3926 }
3914 3927
3915 if (changed & (BSS_CHANGED_BSSID | BSS_CHANGED_HT)) { 3928 if (changed & (BSS_CHANGED_BSSID | BSS_CHANGED_HT |
3929 BSS_CHANGED_ASSOC)) {
3916 rcu_read_lock(); 3930 rcu_read_lock();
3917 sta = ieee80211_find_sta(vif, bss_conf->bssid); 3931 sta = ieee80211_find_sta(vif, bss_conf->bssid);
3918 if (!sta) 3932 if (!sta)
@@ -3982,7 +3996,8 @@ sta_not_found:
3982 3996
3983 if (changed & BSS_CHANGED_ASSOC) { 3997 if (changed & BSS_CHANGED_ASSOC) {
3984 if (bss_conf->assoc) { 3998 if (bss_conf->assoc) {
3985 ret = wlcore_set_assoc(wl, wlvif, bss_conf); 3999 ret = wlcore_set_assoc(wl, wlvif, bss_conf,
4000 sta_rate_set);
3986 if (ret < 0) 4001 if (ret < 0)
3987 goto out; 4002 goto out;
3988 4003