diff options
author | Pradeep Kumar Chitrapu <pradeepc@codeaurora.org> | 2021-09-28 14:00:43 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-09-28 16:16:55 +0300 |
commit | b6b142f644d2d88e2ceabe0aa4479e0a09ba1ea9 (patch) | |
tree | 7b2de219bae3aeb96a73b0421f21bec87f90ddb9 /drivers/net/wireless/ath/ath11k/mac.c | |
parent | 9d6ae1f5cf733c0e8d7f904c501fd015c4b9f0f4 (diff) | |
download | lwn-b6b142f644d2d88e2ceabe0aa4479e0a09ba1ea9.tar.gz lwn-b6b142f644d2d88e2ceabe0aa4479e0a09ba1ea9.zip |
ath11k: fix survey dump collection in 6 GHz
When ath11k receives survey request, choose the 6 GHz band when enabled.
Without this, survey request does not include any 6 GHz band results,
thereby causing auto channel selection to fail.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01386-QCAHKSWPL_SILICONZ-1
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210722102054.43419-3-jouni@codeaurora.org
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/mac.c')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/mac.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index aa1ea5e39f7f..a92943d6f0b0 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -7172,7 +7172,13 @@ static int ath11k_mac_op_get_survey(struct ieee80211_hw *hw, int idx, if (!sband) sband = hw->wiphy->bands[NL80211_BAND_5GHZ]; + if (sband && idx >= sband->n_channels) { + idx -= sband->n_channels; + sband = NULL; + } + if (!sband) + sband = hw->wiphy->bands[NL80211_BAND_6GHZ]; if (!sband || idx >= sband->n_channels) { ret = -ENOENT; goto exit; |