All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 01/10] cfg80211: add a helper to identify 6 GHz PSCs
@ 2020-05-28  9:44 Johannes Berg
  2020-05-28  9:44 ` [RFC 02/10] ieee80211: definitions for reduced neighbor reports Johannes Berg
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Johannes Berg @ 2020-05-28  9:44 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

This allows identifying whether or not a channel is a PSC
(preferred scanning channel).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 include/net/cfg80211.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index e2dbc9c02ef3..a38653358885 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -5277,6 +5277,21 @@ ieee80211_get_channel(struct wiphy *wiphy, int freq)
 	return ieee80211_get_channel_khz(wiphy, MHZ_TO_KHZ(freq));
 }
 
+/**
+ * cfg80211_channel_is_psc - Check if the channel is a 6 GHz PSC
+ * @chan: control channel to check
+ *
+ * The Preferred Scanning Channels (PSC) are defined in
+ * Draft IEEE P802.11ax/D5.0, 26.17.2.3.3
+ */
+static inline bool cfg80211_channel_is_psc(struct ieee80211_channel *chan)
+{
+	if (chan->band != NL80211_BAND_6GHZ)
+		return false;
+
+	return ieee80211_frequency_to_channel(chan->center_freq) % 16 == 5;
+}
+
 /**
  * ieee80211_get_response_rate - get basic rate for a given rate
  *
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-05-29  1:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28  9:44 [RFC 01/10] cfg80211: add a helper to identify 6 GHz PSCs Johannes Berg
2020-05-28  9:44 ` [RFC 02/10] ieee80211: definitions for reduced neighbor reports Johannes Berg
2020-05-28  9:44 ` [RFC 03/10] ieee80211: add code to obtain and parse 6 GHz operation field Johannes Berg
2020-05-28  9:44 ` [RFC 04/10] ieee80211: add HE ext EIDs and 6 GHz capability defines Johannes Berg
2020-05-28  9:44 ` [RFC 05/10] cfg80211: handle 6 GHz capability of new station Johannes Berg
2020-05-28  9:44 ` [RFC 06/10] mac80211: add HE 6 GHz Band Capabilities into parse extension Johannes Berg
2020-05-28  9:44 ` [RFC 07/10] cfg80211: add and expose HE 6 GHz band capabilities Johannes Berg
2020-05-28  9:44 ` [RFC 08/10] mac80211: add HE 6 GHz Band Capability element Johannes Berg
2020-05-28 12:33   ` Johannes Berg
2020-05-28  9:44 ` [RFC 09/10] mac80211: build HE operation with 6 GHz oper information Johannes Berg
2020-05-28  9:50   ` [RFC PATCH v2] " Johannes Berg
2020-05-28 17:57   ` [RFC 09/10] " kbuild test robot
2020-05-28 23:22   ` kbuild test robot
2020-05-29  1:42   ` kbuild test robot
2020-05-28  9:44 ` [RFC 10/10] mac80211: do not allow HT/VHT IEs in 6 GHz mesh mode Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.