nl80211/cfg80211: add channel switch request command

Add new NL80211_CMD_REQ_CH_SW, which requests from usermode
to perform a channel switch operation for GO/AP.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
mac80211: add channel switch request

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
cfg80211: add channel switch notify event

The firmware may decide to switch channels while already beaconing, e.g.
in response to a cfg80211 connect request on a different vif. Add this
event to notify userspace when an AP or GO interface has successfully
migrated to a new channel, so it can update its configuration
accordingly.

Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm>
Signed-off-by: John W. Linville <linville@tuxdriver>
nl80211/cfg80211: add ap channel switch command

Add NL80211_CMD_AP_CH_SWITCH command which
triggers an AP channel switch process.

Usermode notified about channel switch complete
event with NL80211_CMD_CH_SWITCH_NOTIFY.

Usermode (hostapd) is responsible to update the
channel switch announcement IE in the beacon
prior and after the channel switch operation.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
mac80211: add ap channel switch command/event

Add ieee80211_ap_process_chanswitch(), to handle a channel switch
request for AP.

Add ieee80211_ap_ch_switch_done() which updates oper_channel
and notifies upper layers about channel switch complete event.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
wl12xx: add channel switch ability for AP & GO

Add channel switch command and handle channel
switch event.

[Arik - added check for role id in the event of STA channel switch. This
will prevent bogus calls to ieee80211_chswitch_done]

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
wl12xx: add channel switch request debugfs entry

Which exposes the current operational AP/GO channel
and simulates channel switch request.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
mac80211: request AP/GO channel switch if needed

For devices which support MR on a single channel
we must perform a channel alignment between roles.
This patch handles the case when an AP/GO role is
started on channel X and a second STA role starts
the authentication process on channel Y, in this
case:

1. postpone the auth process of the second role.
2. request from the userspace to switch to channel Y.
3. wait for the channel switch to complete for the first role.
4. continue with auth process.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
mac80211: if "dominant ap ch"!="sta ch" block the auth

Add new IEEE80211_HW_AP_CH_IS_DOMINANT flag which blocks
the authentication requests for the STA role if it's tries
to authenticate on a different channel than the AP/GO channel.

By default the STA channel is the dominant one (this flag is't
set) and the AP/GO channel can follow the dominant role channel.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
wl12xx: new module param to set the dominant role

New bool "ap_ch_is_dominant" module param.

By default the STA channel is the dominant one (this flag
is't set) and the AP/GO channel can follow it.

Setting the ap_ch_is_dominant=1 will set the AP/GO channel as
a dominant, which will block any STA attempt to authenticate
on a different channel than the AP/GO operational channel.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
wl12xx: remove unnecessary WARN_ON in wl12xx_tx_reset

Sometimes the driver can perform a recovery while Tx is
active, this will trigger unnecessary warning which might
delay the recovery for more than 100 mS.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
nl80211: sync nl80211.h with latest wpa_s copy

Also move channel switch related command to the TI private commands
range.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
wl12xx: prevent channel switch in the MR FW

When a channel switch request arrives and we are in the MR FW, drop the
connection, as the FW command is unsupported. This will hopefully cause
the STA to reconnect on the new channel.

Signed-off-by: Arik Nemtsov <arik@wizery.com>