ath10k: configure rxnss_override for QCA9984
authorBen Greear <greearb@candelatech.com>
Fri, 16 Jun 2017 07:37:45 +0000 (10:37 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 21 Jun 2017 13:17:21 +0000 (16:17 +0300)
commitcc914a55006eb16f0d46188fd1f50d1fa014dbc8
tree378d4cc01336f8e70719c7df51423510d73245fd
parente509e59477083b09e808c8c20562983d34172bb9
ath10k: configure rxnss_override for QCA9984

QCA9984 hardware can do 4x4 at 80Mhz, but only 2x2 at 160Mhz.

First, report this to user-space by setting the max-tx-speed
and max-rx-speed vht capabilities.

Second, if the peer rx-speed is configured, and if we
are in 160 or 80+80 mode, and the peer rx-speed matches
the max speed for 2x2 or 1x1 at 160Mhz (long guard interval),
then use that info to set the peer_bw_rxnss_override appropriately.

Without this, a 9984 firmware will not use 2x2 ratesets when
transmitting to peer (it will be stuck at 1x1), because
the firmware would not have configured the rxnss_override.

Signed-off-by: Ben Greear <greearb@candelatech.com>
[sven.eckelmann@openmesh.com: rebase, cleanup, drop 160Mhz workaround cleanup]
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
[kvalo@qca.qualcomm.com: use hw_params, rename the title]
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/hw.h
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath10k/wmi.c
drivers/net/wireless/ath/ath10k/wmi.h