diff mbox series

[v2,1/7] mac80211: add a struct for holding BSS color settings

Message ID 20191213155802.25491-1-john@phrozen.org (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show
Series [v2,1/7] mac80211: add a struct for holding BSS color settings | expand

Commit Message

John Crispin Dec. 13, 2019, 3:57 p.m. UTC
Right now we only track the actual color but not the other bits contained
within the he_oper field. Fix this by creating a new struct to hold all
of the info.

Signed-off-by: John Crispin <john@phrozen.org>
---
 include/net/cfg80211.h | 15 +++++++++++++++
 include/net/mac80211.h |  2 ++
 2 files changed, 17 insertions(+)

Comments

Johannes Berg Dec. 16, 2019, 9:49 a.m. UTC | #1
On Fri, 2019-12-13 at 16:57 +0100, John Crispin wrote:
> Right now we only track the actual color but not the other bits contained
> within the he_oper field. Fix this by creating a new struct to hold all
> of the info.
> 
> Signed-off-by: John Crispin <john@phrozen.org>
> ---
>  include/net/cfg80211.h | 15 +++++++++++++++
>  include/net/mac80211.h |  2 ++
>  2 files changed, 17 insertions(+)

I think you should drop this patch and put the cfg80211 and mac80211
update into the second and third patch of this series, respectively. It
doesn't make much sense to add some unused structs.

> diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
> index 8140c4837122..e395ef48af83 100644
> --- a/include/net/cfg80211.h
> +++ b/include/net/cfg80211.h
> @@ -259,6 +259,19 @@ struct ieee80211_he_obss_pd {

It looks like I didn't see that previously for that one,

> + * struct ieee80211_he_bss_color - AP settings for BSS coloring

but I'd kinda prefer this be called cfg80211_... since it's not part of
ieee80211.h with all the over-the-air struct definitions. I'm sure we
have some non-over-the-air things that are called ieee80211_*, but ...

johannes
diff mbox series

Patch

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 8140c4837122..e395ef48af83 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -259,6 +259,19 @@  struct ieee80211_he_obss_pd {
 	u8 max_offset;
 };
 
+/**
+ * struct ieee80211_he_bss_color - AP settings for BSS coloring
+ *
+ * @color: the current color.
+ * @disabled: is the feature disabled.
+ * @partial: define the AID equation.
+ */
+struct ieee80211_he_bss_color {
+	u8 color;
+	bool disabled;
+	bool partial;
+};
+
 /**
  * struct ieee80211_sta_ht_cap - STA's HT capabilities
  *
@@ -910,6 +923,7 @@  enum cfg80211_ap_settings_flags {
  * @twt_responder: Enable Target Wait Time
  * @flags: flags, as defined in enum cfg80211_ap_settings_flags
  * @he_obss_pd: OBSS Packet Detection settings
+ * @he_bss_color: BSS Color settings
  */
 struct cfg80211_ap_settings {
 	struct cfg80211_chan_def chandef;
@@ -938,6 +952,7 @@  struct cfg80211_ap_settings {
 	bool twt_responder;
 	u32 flags;
 	struct ieee80211_he_obss_pd he_obss_pd;
+	struct ieee80211_he_bss_color he_bss_color;
 };
 
 /**
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 6781d4637557..16a5525ddab1 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -604,6 +604,7 @@  struct ieee80211_ftm_responder_params {
  *	in order to discover all the nontransmitted BSSIDs in the set.
  * @he_operation: HE operation information of the AP we are connected to
  * @he_obss_pd: OBSS Packet Detection parameters.
+ * @he_bss_color: BSS coloring settings, if BSS supports HE
  */
 struct ieee80211_bss_conf {
 	const u8 *bssid;
@@ -667,6 +668,7 @@  struct ieee80211_bss_conf {
 	u8 profile_periodicity;
 	struct ieee80211_he_operation he_operation;
 	struct ieee80211_he_obss_pd he_obss_pd;
+	struct ieee80211_he_bss_color he_bss_color;
 };
 
 /**