From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
To: <ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>,
Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Subject: [PATCH V4 3/6] wifi: ath12k: fix survey dump collection in 6 GHz
Date: Thu, 25 Apr 2024 15:18:59 -0700 [thread overview]
Message-ID: <20240425221902.11553-4-quic_pradeepc@quicinc.com> (raw)
In-Reply-To: <20240425221902.11553-1-quic_pradeepc@quicinc.com>
When ath12k receives survey request, choose the 6 GHz band
when enabled. Without this, survey requests do not include
any 6 GHz band results, leading to failures in auto channel
selection.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index b471b27d6594..830f35fb89fe 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -8020,6 +8020,17 @@ static int ath12k_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) {
+ idx -= sband->n_channels;
+ sband = NULL;
+ }
if (!sband || idx >= sband->n_channels)
return -ENOENT;
--
2.17.1
next prev parent reply other threads:[~2024-04-25 22:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 22:18 [PATCH V4 0/6] bug fixes and enhancements to 6 GHz band support Pradeep Kumar Chitrapu
2024-04-25 22:18 ` [PATCH V4 1/6] wifi: ath12k: add channel 2 into 6 GHz channel list Pradeep Kumar Chitrapu
2024-04-25 22:18 ` [PATCH V4 2/6] wifi: ath12k: Correct 6 GHz frequency value in rx status Pradeep Kumar Chitrapu
2024-04-25 22:18 ` Pradeep Kumar Chitrapu [this message]
2024-04-25 22:19 ` [PATCH V4 4/6] wifi: ath12k: add 6 GHz params in peer assoc command Pradeep Kumar Chitrapu
2024-04-25 22:19 ` [PATCH V4 5/6] wifi: ath12k: refactor SMPS configuration Pradeep Kumar Chitrapu
2024-04-25 23:40 ` Jeff Johnson
2024-05-08 17:28 ` Pradeep Kumar Chitrapu
2024-04-25 22:19 ` [PATCH V4 6/6] wifi: ath12k: support SMPS configuration for 6 GHz Pradeep Kumar Chitrapu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240425221902.11553-4-quic_pradeepc@quicinc.com \
--to=quic_pradeepc@quicinc.com \
--cc=ath12k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).