wl18xx: bump min fw version

Bump the min wl18xx fw version to 8.8.0.0.1 (multi-ap support)

Some modifications were done to the driver-fw api
in order to support multiple APs.

Increase wl18xx max stations to 10
Increase the number of links to 16
Increase the number of RX BA sessions to 13

Signed-off-by: Arik Nemtsov <arik@wizery.com>
wlcore: send EAPOL frames with voice priority [WAIT FW]

Send EAPOL frames with voice priority by setting TX_HW_ATTR_EAPOL_FRAME
new bit in tx attribute. Sending EAPOL with voice priority fixes
re-key timeout during heavy traffic issue.

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: no sched_scan_stopped on remove interface

Simulating a sched scan stopped from hw to userspace
is no longer valid on interface removal, since
sched scanning can be automatically restarted by mac80211

Signed-off-by: Barak Bercovitz <barak@wizery.com>
wlcore: wl18xx: allow CCK rates for AP mode

12xx chips allow only OFDM rates in AP mode for BT-Coex purposes. This
is no longer required in 18xx chips, starting with FW 8.6.0.0.8.

Update the min allowed FW version in 18xx to support this functionality.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
wlcore: don't handle unsetting of default wep key

mac80211 unsets the default wep key on disassoc.
The fw doesn't support this notification, so simply
ignore it.

The actual flow actually triggers fw recovery in some
cases, as mac80211 unsets the default key only after
disassoc, when wlvif->sta.hlid, resulting in invalid
hlid being passed to the fw.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: consider multiple APs when checking active_link_count

Each AP has its own global and broadcast links, so when
checking for active sta count (according to the active_link_count)
we must take them all into account.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: decrease warning verbosity during recovery

Silently ignore repetitive scheduling of recovery work and commands
being passed to the bus when the HW is not available. This can happen
many times during recovery and slow it down. It also spams the kernel
logs.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
wlcore: increase timeout to 5000 msecs

dfs configuration command might take longer than
the current timeout. increase it to 5 seconds.

Signed-off-by: Yaniv Machani <yanivma@ti.com>
wl18xx: allow setting supported mcs rates

The supported mcs rates are set using the rx_mask field of the
ieee80211_mcs_info structure.
Add an rx_mask module param that can be used for overriding the default
rx_mask value.

[Arik - formatting changes]

Signed-off-by: Eyal Reizer <eyalr@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
wlcore: enable beacon filtering only after receiving a beacon

Enabling beacon filtering before receving a beacon
might result in not having a beacon at all for the
current connected AP, which prevents the station
from entering power-save.

Replace the current approach (of starting beacon
filtering on init) and configure beacon filering
only after bss_conf->dtimper is set (which means
mac80211 already parsed a beacon).

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: don't switch channels on disconnected STA vifs

Sending the FW a channel switch command on a disconnected vif may result
in a beacon loss event. Avoid this edge case.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
wlcore: add support for STA CSA with chan contexts

TI wl12xx/wl18xx cards support channel switch via a driver specific
switch_channel op while operating with channel contexts.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
wl18xx: allow using 40Mhz AP in 2.4Ghz for testing [DEBUG]

Print a more modest error and avoid the WARN_ON. It should be enough to
detect this on a user setup.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
mac80211: RX BA support for sta max_rx_aggregation_subframes

Normally rx ba buff size is limited by a max limitation set by the driver
with local->hw.max_rx_aggregation_subframes. This is the max aggregation
'win_size' supported by the chip.

This fix adds max_rx_aggregation_subframes field to sta->sta. This field
is initialy set to local->hw.max_rx_aggregation_subframes and is used
by addba_req routine. The driver/chip can choose to change this value
causing stop of existing ba sessions and effectivly forcing new ba sessions
(on this link) to be restricted by the new value.

This capability is usefull in cases of IOP, i.e. cases where peer sta
or ap doesn't respect the max subframes in a single-frame and uses the
max win_size instead. In these cases the driver/chip may recover by
decreasing the win_size to use the single frame limitation.

Signed-off-by: Yair Shapira <yair.shapira@ti.com>
wlcore: ACX_BA_SESSION_RX_SETUP win_size taken from sta

Now that max_rx_aggregation_subframes (BA RX win size) is stored in the
mac per active link (and not only per chip), use the link (sta) value
when passing the win_size to firmware through the ACX_BA_SESSION_RX_SETUP
command.

Signed-off-by: Yair Shapira <yair.shapira@ti.com>
wlcore: Add RX_BA_WIN_SIZE_CHANGE_EVENT event

This event is used by the Firmware to limit the RX BA win size
for a specific link.

The event handler updates the new size in the driver's link struct
and in the mac's sta->sta struct accordingly and closes all active BA
sessions for that link.

Conseqent BA sessions opened for that link will use the new restricted
win_size. This limitation remains until a new update is received or
until the link is closed.

This solves an IOP bug with APs that don't respect the max subframes in
a single-frame and uses the max win_size instead. In these cases the FW
recovers by sending this event to decrease the win_size to use the single
frame limitation.

The min fw version supporting it is 8.6.0.0.1

Signed-off-by: Yair Shapira <yair.shapira@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
wlcore: add smart config definitions

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: add smart_config_start/stop commands

These commands configures the fw to enter and
exit smart_config mode.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: wrap testmode.h code with __KERNEL__

we are going to move the testmode definitions to testmode.h,
and then use it by userspace as well, so wrap any kernel-only
code with a proper ifdef.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wlcore: move testmode definitions to testmode.h

These definitions will be used by userspace as well

Signed-off-by: Eliad Peller <eliad@wizery.com>