diff options
author | Arik Nemtsov <arik@wizery.com> | 2012-11-26 18:05:41 +0200 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-11-28 11:45:42 +0200 |
commit | 5f9b67770be4201f4449b0f180effecaac4e2686 (patch) | |
tree | 5ac83cde8a352c12db4715e83743915de03a961f /drivers/net/wireless/ti/wl18xx/acx.c | |
parent | 7c482c1040ae54e89a8fd4d6415577070d5a915d (diff) |
wlcore: use new set bandwidth command to adjusting channel BW
We support changing the channel BW when we started the STA role on
a 40Mhz bandwidth. Otherwise a reconnection is required.
Save the started channel width and use it when channel width updates
arrive.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx/acx.c')
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/acx.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/acx.c b/drivers/net/wireless/ti/wl18xx/acx.c index adff9cde7db7..801d8af5cef2 100644 --- a/drivers/net/wireless/ti/wl18xx/acx.c +++ b/drivers/net/wireless/ti/wl18xx/acx.c @@ -109,3 +109,34 @@ out: kfree(acx); return ret; } + +int wl18xx_acx_peer_ht_operation_mode(struct wl1271 *wl, u8 hlid, bool wide) +{ + struct wlcore_peer_ht_operation_mode *acx; + int ret; + + wl1271_debug(DEBUG_ACX, "acx peer ht operation mode hlid %d bw %d", + hlid, wide); + + acx = kzalloc(sizeof(*acx), GFP_KERNEL); + if (!acx) { + ret = -ENOMEM; + goto out; + } + + acx->hlid = hlid; + acx->bandwidth = wide ? WLCORE_BANDWIDTH_40MHZ : WLCORE_BANDWIDTH_20MHZ; + + ret = wl1271_cmd_configure(wl, ACX_PEER_HT_OPERATION_MODE_CFG, acx, + sizeof(*acx)); + + if (ret < 0) { + wl1271_warning("acx peer ht operation mode failed: %d", ret); + goto out; + } + +out: + kfree(acx); + return ret; + +} |