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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user