diff mbox series

[RFC,V2,5/8] cfg80211: add 6GHz in code handling array with NUM_NL80211_BANDS entries

Message ID 1561461027-10793-6-git-send-email-arend.vanspriel@broadcom.com (mailing list archive)
State RFC
Delegated to: Johannes Berg
Headers show
Series nl80211: add 6GHz band support | expand

Commit Message

Arend van Spriel June 25, 2019, 11:10 a.m. UTC
In nl80211.c there is a policy for all bands in NUM_NL80211_BANDS and
in trace.h there is a callback trace for multicast rates which is per
band in NUM_NL80211_BANDS. Both need to be extended for the new
NL80211_BAND_6GHZ.

Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Leon Zegers <leon.zegers@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 net/wireless/nl80211.c | 1 +
 net/wireless/trace.h   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Johannes Berg June 28, 2019, 1:03 p.m. UTC | #1
On Tue, 2019-06-25 at 13:10 +0200, Arend van Spriel wrote:
> 
> +++ b/net/wireless/trace.h
> @@ -2446,10 +2446,11 @@
>  		       sizeof(int) * NUM_NL80211_BANDS);
>  	),
>  	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
> -		  "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 60GHz=0x%x]",
> +		  "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 6GHz=0x%x, 60GHz=0x%x]",
>  		  WIPHY_PR_ARG, NETDEV_PR_ARG,
>  		  __entry->mcast_rate[NL80211_BAND_2GHZ],
>  		  __entry->mcast_rate[NL80211_BAND_5GHZ],
> +		  __entry->mcast_rate[NL80211_BAND_6GHZ],
>  		  __entry->mcast_rate[NL80211_BAND_60GHZ])
>  );

This doesn't really - you just pointed out that legacy rates aren't
permitted, and so this bitmap doesn't make sense for 6 GHz?

johannes
diff mbox series

Patch

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index fc83dd1..57bc35a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -667,6 +667,7 @@  static int validate_ie_attr(const struct nlattr *attr,
 nl80211_match_band_rssi_policy[NUM_NL80211_BANDS] = {
 	[NL80211_BAND_2GHZ] = { .type = NLA_S32 },
 	[NL80211_BAND_5GHZ] = { .type = NLA_S32 },
+	[NL80211_BAND_6GHZ] = { .type = NLA_S32 },
 	[NL80211_BAND_60GHZ] = { .type = NLA_S32 },
 };
 
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 4fbb91a..d98ad2b 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -2446,10 +2446,11 @@ 
 		       sizeof(int) * NUM_NL80211_BANDS);
 	),
 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
-		  "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 60GHz=0x%x]",
+		  "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 6GHz=0x%x, 60GHz=0x%x]",
 		  WIPHY_PR_ARG, NETDEV_PR_ARG,
 		  __entry->mcast_rate[NL80211_BAND_2GHZ],
 		  __entry->mcast_rate[NL80211_BAND_5GHZ],
+		  __entry->mcast_rate[NL80211_BAND_6GHZ],
 		  __entry->mcast_rate[NL80211_BAND_60GHZ])
 );