linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
To: Johannes Berg <johannes@sipsolutions.net>, ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org,
	Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Subject: [PATCH v2 6/9] ath11k: set psc channel flag when sending channel list to firmware.
Date: Fri, 22 May 2020 00:24:28 -0700	[thread overview]
Message-ID: <20200522072431.27601-7-pradeepc@codeaurora.org> (raw)
In-Reply-To: <20200522072431.27601-1-pradeepc@codeaurora.org>

If 6 ghz channel is a Preferred Scanning Channel(PSC), mark
the channel flag accordingly when updating channel list to firmware.
This will be used when making scanning decision in 6GHz channels.

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/reg.c | 4 ++++
 drivers/net/wireless/ath/ath11k/wmi.h | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/reg.c b/drivers/net/wireless/ath/ath11k/reg.c
index 453aa9c06969..50d13a5d7cf8 100644
--- a/drivers/net/wireless/ath/ath11k/reg.c
+++ b/drivers/net/wireless/ath/ath11k/reg.c
@@ -161,6 +161,10 @@ int ath11k_reg_update_chan_list(struct ath11k *ar)
 			else
 				ch->phy_mode = MODE_11A;
 
+			if (channel->band == NL80211_BAND_6GHZ &&
+			    channel->flags & IEEE80211_CHAN_PSC)
+				ch->psc_channel = true;
+
 			ath11k_dbg(ar->ab, ATH11K_DBG_WMI,
 				   "mac channel [%d/%d] freq %d maxpower %d regpower %d antenna %d mode %d\n",
 				   i, params->nallchans,
diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index fd82cff7537b..76c2da2c5db7 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -2520,7 +2520,8 @@ struct channel_param {
 	    allow_ht:1,
 	    allow_vht:1,
 	    allow_he:1,
-	    set_agile:1;
+	    set_agile:1,
+	    psc_channel:1;
 	u32 phy_mode;
 	u32 cfreq1;
 	u32 cfreq2;
-- 
2.17.1

  parent reply	other threads:[~2020-05-22  7:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  7:24 [PATCH v2 0/9] add 6GHz radio support in ath11k driver Pradeep Kumar Chitrapu
2020-05-22  7:24 ` [PATCH v2 1/9] cfg80211: Add new channel flag to identify 6GHz PSC channel Pradeep Kumar Chitrapu
2020-05-22 20:38   ` Johannes Berg
2020-05-22 23:46     ` Pradeep Kumar Chitrapu
2020-05-25  8:57       ` Johannes Berg
2020-05-22  7:24 ` [PATCH v2 2/9] ath11k: add 6G frequency list supported by driver Pradeep Kumar Chitrapu
2020-05-22  7:24 ` [PATCH v2 3/9] ath11k: add support for 6GHz radio in driver Pradeep Kumar Chitrapu
2020-05-22  7:24 ` [PATCH v2 4/9] ath11k: Use freq instead of channel number in rx path Pradeep Kumar Chitrapu
2020-05-22  7:24 ` [PATCH v2 5/9] ath11k: extend peer_assoc_cmd for 6GHz band Pradeep Kumar Chitrapu
2020-05-22  7:24 ` Pradeep Kumar Chitrapu [this message]
2020-05-22  7:24 ` [PATCH v2 7/9] ath11k: Add 6G scan dwell time parameter in scan request command Pradeep Kumar Chitrapu
2020-05-22  7:24 ` [PATCH v2 8/9] ath11k: Send multiple scan_chan_list messages if required Pradeep Kumar Chitrapu
2020-05-22  7:24 ` [PATCH v2 9/9] ath11k: Add support for 6g scan hint 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=20200522072431.27601-7-pradeepc@codeaurora.org \
    --to=pradeepc@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --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 NNTP newsgroup(s).