diff options
author | Eliad Peller <eliad@wizery.com> | 2014-12-29 08:24:07 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-09 15:47:57 +0200 |
commit | 750e9d15e2fe93fec696893be7b120b2940378d0 (patch) | |
tree | ded8932f4a1f21c62bdfa702a66bc59402d39287 /drivers/net/wireless/ti/wl18xx/cmd.c | |
parent | e2f1e50f62ae70c7ddde8420ed586c6a1aa1e28c (diff) | |
download | lwn-750e9d15e2fe93fec696893be7b120b2940378d0.tar.gz lwn-750e9d15e2fe93fec696893be7b120b2940378d0.zip |
wl18xx: add radar detection implementation
Add support for CAC start/stop commands, and pass
radar detection events from the fw to mac80211.
Bump fw name (to wl18xx-fw-4.bin) and min fw version
(to 8.9.*.*.11), and align event mailbox accordingly.
Signed-off-by: Guy Mishol <guym@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx/cmd.c')
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/cmd.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/cmd.c b/drivers/net/wireless/ti/wl18xx/cmd.c index 44f0b205b065..10f9d1c064ba 100644 --- a/drivers/net/wireless/ti/wl18xx/cmd.c +++ b/drivers/net/wireless/ti/wl18xx/cmd.c @@ -167,3 +167,34 @@ out_free: out: return ret; } + +int wl18xx_cmd_set_cac(struct wl1271 *wl, struct wl12xx_vif *wlvif, bool start) +{ + struct wlcore_cmd_cac_start *cmd; + int ret = 0; + + wl1271_debug(DEBUG_CMD, "cmd cac (channel %d) %s", + wlvif->channel, start ? "start" : "stop"); + + cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); + if (!cmd) + return -ENOMEM; + + cmd->role_id = wlvif->role_id; + cmd->channel = wlvif->channel; + if (wlvif->band == IEEE80211_BAND_5GHZ) + cmd->band = WLCORE_BAND_5GHZ; + cmd->bandwidth = wlcore_get_native_channel_type(wlvif->channel_type); + + ret = wl1271_cmd_send(wl, + start ? CMD_CAC_START : CMD_CAC_STOP, + cmd, sizeof(*cmd), 0); + if (ret < 0) { + wl1271_error("failed to send cac command"); + goto out_free; + } + +out_free: + kfree(cmd); + return ret; +} |