aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/main.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-08-14 06:17:27 -0400
committerLuciano Coelho <coelho@ti.com>2011-08-22 05:35:29 -0400
commit0b932ab9f156488a56577873b638ecb1e65fa8d7 (patch)
treee8e7df2e93d0a4f3dc42d063a896169b51f85a53 /drivers/net/wireless/wl12xx/main.c
parent227e81e18422851901b9de11c5955d292c4a47fc (diff)
wl12xx: AP-mode - set STA HT capabilities when adding a STA
In addition, set global HT operation mode via ACX_HT_BSS_OPERATION when a change is detected by usermode Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r--drivers/net/wireless/wl12xx/main.c34
1 files changed, 27 insertions, 7 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index e280d9d7911b..0a0b4b634bd4 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -3124,6 +3124,18 @@ static void wl1271_bss_info_changed_ap(struct wl1271 *wl,
3124 ret = wl1271_bss_erp_info_changed(wl, bss_conf, changed); 3124 ret = wl1271_bss_erp_info_changed(wl, bss_conf, changed);
3125 if (ret < 0) 3125 if (ret < 0)
3126 goto out; 3126 goto out;
3127
3128 /* Handle HT information change */
3129 if ((changed & BSS_CHANGED_HT) &&
3130 (bss_conf->channel_type != NL80211_CHAN_NO_HT)) {
3131 ret = wl1271_acx_set_ht_information(wl,
3132 bss_conf->ht_operation_mode);
3133 if (ret < 0) {
3134 wl1271_warning("Set ht information failed %d", ret);
3135 goto out;
3136 }
3137 }
3138
3127out: 3139out:
3128 return; 3140 return;
3129} 3141}
@@ -3439,12 +3451,14 @@ sta_not_found:
3439 } 3451 }
3440 } 3452 }
3441 3453
3442 /* Handle new association with HT. Do this only after join. */ 3454 /* Handle new association with HT. Do this after join. */
3443 if (sta_exists) { 3455 if (sta_exists) {
3444 if ((changed & BSS_CHANGED_HT) && 3456 if ((changed & BSS_CHANGED_HT) &&
3445 (bss_conf->channel_type != NL80211_CHAN_NO_HT)) { 3457 (bss_conf->channel_type != NL80211_CHAN_NO_HT)) {
3446 ret = wl1271_acx_set_ht_capabilities(wl, &sta_ht_cap, 3458 ret = wl1271_acx_set_ht_capabilities(wl,
3447 true); 3459 &sta_ht_cap,
3460 true,
3461 wl->sta_hlid);
3448 if (ret < 0) { 3462 if (ret < 0) {
3449 wl1271_warning("Set ht cap true failed %d", 3463 wl1271_warning("Set ht cap true failed %d",
3450 ret); 3464 ret);
@@ -3453,8 +3467,10 @@ sta_not_found:
3453 } 3467 }
3454 /* handle new association without HT and disassociation */ 3468 /* handle new association without HT and disassociation */
3455 else if (changed & BSS_CHANGED_ASSOC) { 3469 else if (changed & BSS_CHANGED_ASSOC) {
3456 ret = wl1271_acx_set_ht_capabilities(wl, &sta_ht_cap, 3470 ret = wl1271_acx_set_ht_capabilities(wl,
3457 false); 3471 &sta_ht_cap,
3472 false,
3473 wl->sta_hlid);
3458 if (ret < 0) { 3474 if (ret < 0) {
3459 wl1271_warning("Set ht cap false failed %d", 3475 wl1271_warning("Set ht cap false failed %d",
3460 ret); 3476 ret);
@@ -3463,8 +3479,8 @@ sta_not_found:
3463 } 3479 }
3464 } 3480 }
3465 3481
3466 /* Handle HT information change. Only after join. */ 3482 /* Handle HT information change. Done after join. */
3467 if (sta_exists && (changed & BSS_CHANGED_HT) && 3483 if ((changed & BSS_CHANGED_HT) &&
3468 (bss_conf->channel_type != NL80211_CHAN_NO_HT)) { 3484 (bss_conf->channel_type != NL80211_CHAN_NO_HT)) {
3469 ret = wl1271_acx_set_ht_information(wl, 3485 ret = wl1271_acx_set_ht_information(wl,
3470 bss_conf->ht_operation_mode); 3486 bss_conf->ht_operation_mode);
@@ -3703,6 +3719,10 @@ static int wl1271_op_sta_add(struct ieee80211_hw *hw,
3703 if (ret < 0) 3719 if (ret < 0)
3704 goto out_sleep; 3720 goto out_sleep;
3705 3721
3722 ret = wl1271_acx_set_ht_capabilities(wl, &sta->ht_cap, true, hlid);
3723 if (ret < 0)
3724 goto out_sleep;
3725
3706out_sleep: 3726out_sleep:
3707 wl1271_ps_elp_sleep(wl); 3727 wl1271_ps_elp_sleep(wl);
3708 3728