diff mbox series

[wireless-next] wifi: mac80211: Update MCS15 support in link_conf

Message ID 20250424043256.2982345-1-quic_mkumarg@quicinc.com
State New
Headers show
Series [wireless-next] wifi: mac80211: Update MCS15 support in link_conf | expand

Commit Message

Mohan Kumar G April 24, 2025, 4:32 a.m. UTC
As per IEEE 802.11be-2024 - 9.4.2.321, EHT operation element
contains MCS15 Disable subfield as the sixth bit, which is set when
MCS15 support is not enabled.

Get MCS15 support from EHT operation params and add it in link_conf
so that driver can use this value to know if EHT-MCS 15 reception
is enabled.

Co-developed-by: Dhanavandhana Kannan <quic_dhanavan1@quicinc.com>
Signed-off-by: Dhanavandhana Kannan <quic_dhanavan1@quicinc.com>
Signed-off-by: Mohan Kumar G <quic_mkumarg@quicinc.com>
---

NOTE: An upcoming ath12k patch will utilize this change.

---
 include/linux/ieee80211.h | 1 +
 include/net/mac80211.h    | 2 ++
 net/mac80211/cfg.c        | 3 +++
 3 files changed, 6 insertions(+)


base-commit: f600832794c91d7021d7337104734246b02a2b86

Comments

Mohan Kumar G May 2, 2025, 4:12 p.m. UTC | #1
On 4/24/2025 6:31 PM, Johannes Berg wrote:
> On Thu, 2025-04-24 at 10:02 +0530, Mohan Kumar G wrote:
>> As per IEEE 802.11be-2024 - 9.4.2.321, EHT operation element
>> contains MCS15 Disable subfield as the sixth bit, which is set when
>> MCS15 support is not enabled.
>>
>> Get MCS15 support from EHT operation params and add it in link_conf
>> so that driver can use this value to know if EHT-MCS 15 reception
>> is enabled.
> I guess I'll take this (modulo the question below), but I think for UHR
> we should probably just pu whole fields there rather than splitting
> things out, that doesn't seem all that useful?

Yes, putting whole fields would be better. Will try to handle it as such 
for UHR.

>> @@ -830,6 +831,7 @@ struct ieee80211_bss_conf {
>>   	bool eht_support;
>>   	bool epcs_support;
>>   	bool csa_active;
>> +	bool disable_mcs15;
>>
> Perhaps we should group it with the other EHT ones like
> eht_80mhz_full_bw_ul_mumimo, and also use eht_ prefix?
>
> johannes

Sure. will make the change in next version.
diff mbox series

Patch

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 15a87f522017..fd26930a26f8 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -2325,6 +2325,7 @@  struct ieee80211_eht_cap_elem {
 #define IEEE80211_EHT_OPER_EHT_DEF_PE_DURATION	                0x04
 #define IEEE80211_EHT_OPER_GROUP_ADDRESSED_BU_IND_LIMIT         0x08
 #define IEEE80211_EHT_OPER_GROUP_ADDRESSED_BU_IND_EXP_MASK      0x30
+#define IEEE80211_EHT_OPER_MCS15_DISABLE                        0x40
 
 /**
  * struct ieee80211_eht_operation - eht operation element
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index fdafc37d17cc..bdddca284208 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -707,6 +707,7 @@  struct ieee80211_parsed_tpe {
  * @eht_support: does this BSS support EHT
  * @epcs_support: does this BSS support EPCS
  * @csa_active: marks whether a channel switch is going on.
+ * @disable_mcs15: disable EHT-MCS 15 reception capability.
  * @mu_mimo_owner: indicates interface owns MU-MIMO capability
  * @chanctx_conf: The channel context this interface is assigned to, or %NULL
  *	when it is not assigned. This pointer is RCU-protected due to the TX
@@ -830,6 +831,7 @@  struct ieee80211_bss_conf {
 	bool eht_support;
 	bool epcs_support;
 	bool csa_active;
+	bool disable_mcs15;
 
 	bool mu_mimo_owner;
 	struct ieee80211_chanctx_conf __rcu *chanctx_conf;
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 9017b98fea04..e521eafc69e5 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1421,6 +1421,9 @@  static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
 				(IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_80MHZ |
 				 IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_160MHZ |
 				 IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_320MHZ);
+		link_conf->disable_mcs15 =
+			!!(u8_get_bits(params->eht_oper->params,
+				       IEEE80211_EHT_OPER_MCS15_DISABLE));
 	} else {
 		link_conf->eht_su_beamformer = false;
 		link_conf->eht_su_beamformee = false;