* [PATCH 0/2] wifi: mac80211/mac80211_hwsim: add mesh EHT 320 MHz support
@ 2024-11-19 4:27 Aditya Kumar Singh
2024-11-19 4:27 ` [PATCH 1/2] wifi: mac80211: add EHT 320 MHz support for mesh Aditya Kumar Singh
2024-11-19 4:28 ` [PATCH 2/2] wifi: mac80211_hwsim: add 6 GHz EHT Mesh capabilities Aditya Kumar Singh
0 siblings, 2 replies; 4+ messages in thread
From: Aditya Kumar Singh @ 2024-11-19 4:27 UTC (permalink / raw)
To: Johannes Berg, Kalle Valo
Cc: linux-wireless, linux-kernel, Sathishkumar Muruganandam,
Aditya Kumar Singh
Currently, ieee80211_ie_build_he_oper() lacks support for 320 MHz handling
(already noted as a TODO). This is because 320 MHz is not included in
IEEE 802.11-ax. However, IEEE 802.11-be introduces 320 MHz support and if
the chandef indicates a 320 MHz bandwidth and is used directly as it is, it
will result in an incorrect HE Operation Information Element.
This series aims to add support for EHT 320 MHz in mesh mode. It also
extends mac80211_hwsim to support EHT 320 MHz mesh mode.
---
Aditya Kumar Singh (1):
wifi: mac80211_hwsim: add 6 GHz EHT Mesh capabilities
Sathishkumar Muruganandam (1):
wifi: mac80211: add EHT 320 MHz support for mesh
drivers/net/wireless/virtual/mac80211_hwsim.c | 39 +++++++++++++++++++++++++++
net/mac80211/util.c | 29 ++++++++++++--------
2 files changed, 57 insertions(+), 11 deletions(-)
---
base-commit: dfc14664794a4706e0c2186a0c082386e6b14c4d
change-id: 20241119-mesh_320mhz_support-66155659b830
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] wifi: mac80211: add EHT 320 MHz support for mesh
2024-11-19 4:27 [PATCH 0/2] wifi: mac80211/mac80211_hwsim: add mesh EHT 320 MHz support Aditya Kumar Singh
@ 2024-11-19 4:27 ` Aditya Kumar Singh
2024-11-19 8:52 ` Nicolas Escande
2024-11-19 4:28 ` [PATCH 2/2] wifi: mac80211_hwsim: add 6 GHz EHT Mesh capabilities Aditya Kumar Singh
1 sibling, 1 reply; 4+ messages in thread
From: Aditya Kumar Singh @ 2024-11-19 4:27 UTC (permalink / raw)
To: Johannes Berg, Kalle Valo
Cc: linux-wireless, linux-kernel, Sathishkumar Muruganandam,
Aditya Kumar Singh
From: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
Currently, ieee80211_ie_build_he_oper() lacks support for 320 MHz handling
(already noted as a TODO). This is because 320 MHz is not included in
IEEE 802.11-ax. However, IEEE 802.11-be introduces 320 MHz support and if
the chandef indicates a 320 MHz bandwidth and is used directly as it is, it
will result in an incorrect HE Operation Information Element.
In order to support EHT 320 MHz, HE Operation Element should indicate
bandwidth as 160 MHz only. In EHT Operation IE, the correct bandwidth will
be present. Devices capable of EHT can parse EHT Information Element and
connect in 320 MHz and other HE capable devices can parse HE and can
connect in 160 MHz.
Add support to downgrade the bandwidth in ieee80211_ie_build_he_oper()
during 320 MHz operation and advertise it.
Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
---
net/mac80211/util.c | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index a4e1301cc999d24d6ab1bd899742a2ff04229040..c88ce537aaa7ea5d59dc42e5f30805c6eb4a5c6d 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2762,6 +2762,7 @@ u8 *ieee80211_ie_build_he_oper(u8 *pos, const struct cfg80211_chan_def *chandef)
{
struct ieee80211_he_operation *he_oper;
struct ieee80211_he_6ghz_oper *he_6ghz_op;
+ struct cfg80211_chan_def he_chandef;
u32 he_oper_params;
u8 ie_len = 1 + sizeof(struct ieee80211_he_operation);
@@ -2793,27 +2794,33 @@ u8 *ieee80211_ie_build_he_oper(u8 *pos, const struct cfg80211_chan_def *chandef)
if (chandef->chan->band != NL80211_BAND_6GHZ)
goto out;
+ cfg80211_chandef_create(&he_chandef, chandef->chan, NL80211_CHAN_NO_HT);
+ he_chandef.center_freq1 = chandef->center_freq1;
+ he_chandef.center_freq2 = chandef->center_freq2;
+ he_chandef.width = chandef->width;
+
/* TODO add VHT operational */
he_6ghz_op = (struct ieee80211_he_6ghz_oper *)pos;
he_6ghz_op->minrate = 6; /* 6 Mbps */
he_6ghz_op->primary =
- ieee80211_frequency_to_channel(chandef->chan->center_freq);
+ ieee80211_frequency_to_channel(he_chandef.chan->center_freq);
he_6ghz_op->ccfs0 =
- ieee80211_frequency_to_channel(chandef->center_freq1);
- if (chandef->center_freq2)
+ ieee80211_frequency_to_channel(he_chandef.center_freq1);
+ if (he_chandef.center_freq2)
he_6ghz_op->ccfs1 =
- ieee80211_frequency_to_channel(chandef->center_freq2);
+ ieee80211_frequency_to_channel(he_chandef.center_freq2);
else
he_6ghz_op->ccfs1 = 0;
- switch (chandef->width) {
+ switch (he_chandef.width) {
case NL80211_CHAN_WIDTH_320:
- /*
- * TODO: mesh operation is not defined over 6GHz 320 MHz
- * channels.
+ /* Downgrade EHT 320 MHz BW to 160 MHz for HE and set new
+ * center_freq1
*/
- WARN_ON(1);
- break;
+ ieee80211_chandef_downgrade(&he_chandef, NULL);
+ he_6ghz_op->ccfs0 =
+ ieee80211_frequency_to_channel(he_chandef.center_freq1);
+ fallthrough;
case NL80211_CHAN_WIDTH_160:
/* Convert 160 MHz channel width to new style as interop
* workaround.
@@ -2821,7 +2828,7 @@ u8 *ieee80211_ie_build_he_oper(u8 *pos, const struct cfg80211_chan_def *chandef)
he_6ghz_op->control =
IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_160MHZ;
he_6ghz_op->ccfs1 = he_6ghz_op->ccfs0;
- if (chandef->chan->center_freq < chandef->center_freq1)
+ if (he_chandef.chan->center_freq < he_chandef.center_freq1)
he_6ghz_op->ccfs0 -= 8;
else
he_6ghz_op->ccfs0 += 8;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] wifi: mac80211_hwsim: add 6 GHz EHT Mesh capabilities
2024-11-19 4:27 [PATCH 0/2] wifi: mac80211/mac80211_hwsim: add mesh EHT 320 MHz support Aditya Kumar Singh
2024-11-19 4:27 ` [PATCH 1/2] wifi: mac80211: add EHT 320 MHz support for mesh Aditya Kumar Singh
@ 2024-11-19 4:28 ` Aditya Kumar Singh
1 sibling, 0 replies; 4+ messages in thread
From: Aditya Kumar Singh @ 2024-11-19 4:28 UTC (permalink / raw)
To: Johannes Berg, Kalle Valo
Cc: linux-wireless, linux-kernel, Aditya Kumar Singh
To facilitate testing of mesh EHT 320 MHz, add support for advertising
this capability.
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
---
drivers/net/wireless/virtual/mac80211_hwsim.c | 39 +++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c
index 347a15544afedb238680068088487eefe24524c3..cf6a331d404271141f3e9a736feba1ad8cfead5a 100644
--- a/drivers/net/wireless/virtual/mac80211_hwsim.c
+++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
@@ -5048,6 +5048,45 @@ static const struct ieee80211_sband_iftype_data sband_capa_6ghz[] = {
.tx_mcs_80p80 = cpu_to_le16(0xfffa),
},
},
+ .eht_cap = {
+ .has_eht = true,
+ .eht_cap_elem = {
+ .mac_cap_info[0] = IEEE80211_EHT_MAC_CAP0_OM_CONTROL |
+ IEEE80211_EHT_MAC_CAP0_TRIG_TXOP_SHARING_MODE1,
+ .phy_cap_info[0] = IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ,
+ /* Leave all the other PHY capability bytes
+ * unset, as DCM, beam forming, RU and PPE
+ * threshold information are not supported
+ */
+ },
+ /* For all MCS and bandwidth, set 8 NSS for both Tx and
+ * Rx
+ */
+ .eht_mcs_nss_supp = {
+ /* As B1 and B2 are set in the supported
+ * channel width set field in the HE PHY
+ * capabilities information field and 320MHz in
+ * 6GHz is supported include all the following
+ * MCS/NSS.
+ */
+ .bw._80 = {
+ .rx_tx_mcs9_max_nss = 0x88,
+ .rx_tx_mcs11_max_nss = 0x88,
+ .rx_tx_mcs13_max_nss = 0x88,
+ },
+ .bw._160 = {
+ .rx_tx_mcs9_max_nss = 0x88,
+ .rx_tx_mcs11_max_nss = 0x88,
+ .rx_tx_mcs13_max_nss = 0x88,
+ },
+ .bw._320 = {
+ .rx_tx_mcs9_max_nss = 0x88,
+ .rx_tx_mcs11_max_nss = 0x88,
+ .rx_tx_mcs13_max_nss = 0x88,
+ },
+ },
+ /* PPE threshold information is not supported */
+ },
},
#endif
};
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] wifi: mac80211: add EHT 320 MHz support for mesh
2024-11-19 4:27 ` [PATCH 1/2] wifi: mac80211: add EHT 320 MHz support for mesh Aditya Kumar Singh
@ 2024-11-19 8:52 ` Nicolas Escande
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Escande @ 2024-11-19 8:52 UTC (permalink / raw)
To: Aditya Kumar Singh, Johannes Berg, Kalle Valo
Cc: linux-wireless, linux-kernel, Sathishkumar Muruganandam
On Tue Nov 19, 2024 at 5:27 AM CET, Aditya Kumar Singh wrote:
> From: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
>
> Currently, ieee80211_ie_build_he_oper() lacks support for 320 MHz handling
> (already noted as a TODO). This is because 320 MHz is not included in
> IEEE 802.11-ax. However, IEEE 802.11-be introduces 320 MHz support and if
> the chandef indicates a 320 MHz bandwidth and is used directly as it is, it
> will result in an incorrect HE Operation Information Element.
>
> In order to support EHT 320 MHz, HE Operation Element should indicate
> bandwidth as 160 MHz only. In EHT Operation IE, the correct bandwidth will
> be present. Devices capable of EHT can parse EHT Information Element and
> connect in 320 MHz and other HE capable devices can parse HE and can
> connect in 160 MHz.
>
> Add support to downgrade the bandwidth in ieee80211_ie_build_he_oper()
> during 320 MHz operation and advertise it.
>
> Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
> Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
> ---
> net/mac80211/util.c | 29 ++++++++++++++++++-----------
> 1 file changed, 18 insertions(+), 11 deletions(-)
>
> diff --git a/net/mac80211/util.c b/net/mac80211/util.c
> index a4e1301cc999d24d6ab1bd899742a2ff04229040..c88ce537aaa7ea5d59dc42e5f30805c6eb4a5c6d 100644
> --- a/net/mac80211/util.c
> +++ b/net/mac80211/util.c
> @@ -2762,6 +2762,7 @@ u8 *ieee80211_ie_build_he_oper(u8 *pos, const struct cfg80211_chan_def *chandef)
> {
> struct ieee80211_he_operation *he_oper;
> struct ieee80211_he_6ghz_oper *he_6ghz_op;
> + struct cfg80211_chan_def he_chandef;
> u32 he_oper_params;
> u8 ie_len = 1 + sizeof(struct ieee80211_he_operation);
>
> @@ -2793,27 +2794,33 @@ u8 *ieee80211_ie_build_he_oper(u8 *pos, const struct cfg80211_chan_def *chandef)
> if (chandef->chan->band != NL80211_BAND_6GHZ)
> goto out;
>
> + cfg80211_chandef_create(&he_chandef, chandef->chan, NL80211_CHAN_NO_HT);
> + he_chandef.center_freq1 = chandef->center_freq1;
> + he_chandef.center_freq2 = chandef->center_freq2;
> + he_chandef.width = chandef->width;
> +
> /* TODO add VHT operational */
> he_6ghz_op = (struct ieee80211_he_6ghz_oper *)pos;
> he_6ghz_op->minrate = 6; /* 6 Mbps */
> he_6ghz_op->primary =
> - ieee80211_frequency_to_channel(chandef->chan->center_freq);
> + ieee80211_frequency_to_channel(he_chandef.chan->center_freq);
> he_6ghz_op->ccfs0 =
> - ieee80211_frequency_to_channel(chandef->center_freq1);
> - if (chandef->center_freq2)
> + ieee80211_frequency_to_channel(he_chandef.center_freq1);
> + if (he_chandef.center_freq2)
> he_6ghz_op->ccfs1 =
> - ieee80211_frequency_to_channel(chandef->center_freq2);
> + ieee80211_frequency_to_channel(he_chandef.center_freq2);
> else
> he_6ghz_op->ccfs1 = 0;
>
> - switch (chandef->width) {
> + switch (he_chandef.width) {
> case NL80211_CHAN_WIDTH_320:
> - /*
> - * TODO: mesh operation is not defined over 6GHz 320 MHz
> - * channels.
> + /* Downgrade EHT 320 MHz BW to 160 MHz for HE and set new
> + * center_freq1
> */
> - WARN_ON(1);
> - break;
> + ieee80211_chandef_downgrade(&he_chandef, NULL);
> + he_6ghz_op->ccfs0 =
> + ieee80211_frequency_to_channel(he_chandef.center_freq1);
I don't understand the full implication of those two calls but I made 320MHz
work by doing the same as for 160 but with +/- = 16 instead of 8.
> + fallthrough;
> case NL80211_CHAN_WIDTH_160:
> /* Convert 160 MHz channel width to new style as interop
> * workaround.
> @@ -2821,7 +2828,7 @@ u8 *ieee80211_ie_build_he_oper(u8 *pos, const struct cfg80211_chan_def *chandef)
> he_6ghz_op->control =
> IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_160MHZ;
> he_6ghz_op->ccfs1 = he_6ghz_op->ccfs0;
> - if (chandef->chan->center_freq < chandef->center_freq1)
> + if (he_chandef.chan->center_freq < he_chandef.center_freq1)
> he_6ghz_op->ccfs0 -= 8;
> else
> he_6ghz_op->ccfs0 += 8;
Something along this lines seemed to be enough:
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index a4e1301cc999..f24479f74813 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2808,18 +2808,15 @@ u8 *ieee80211_ie_build_he_oper(u8 *pos, const struct cfg80211_chan_def *chandef)
switch (chandef->width) {
case NL80211_CHAN_WIDTH_320:
- /*
- * TODO: mesh operation is not defined over 6GHz 320 MHz
- * channels.
- */
- WARN_ON(1);
- break;
+ if (chandef->chan->center_freq < chandef->center_freq1)
+ he_6ghz_op->ccfs0 -= 16;
+ else
+ he_6ghz_op->ccfs0 += 16;
+ fallthrough;
case NL80211_CHAN_WIDTH_160:
/* Convert 160 MHz channel width to new style as interop
* workaround.
*/
- he_6ghz_op->control =
- IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_160MHZ;
he_6ghz_op->ccfs1 = he_6ghz_op->ccfs0;
if (chandef->chan->center_freq < chandef->center_freq1)
he_6ghz_op->ccfs0 -= 8;
--
2.47.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-19 8:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19 4:27 [PATCH 0/2] wifi: mac80211/mac80211_hwsim: add mesh EHT 320 MHz support Aditya Kumar Singh
2024-11-19 4:27 ` [PATCH 1/2] wifi: mac80211: add EHT 320 MHz support for mesh Aditya Kumar Singh
2024-11-19 8:52 ` Nicolas Escande
2024-11-19 4:28 ` [PATCH 2/2] wifi: mac80211_hwsim: add 6 GHz EHT Mesh capabilities Aditya Kumar Singh
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).