Re: [PATCH wireless-next] wifi: nl80211: add support to configure 6 GHz non-HT duplicate transmission
Mahendran P <[email protected]> Thu, 6 Aug 2026 08:44:51 +0530
| Newsgroups | org.kernel.vger.linux-wireless |
|---|---|
| Message-ID | <[email protected]> |
On 8/5/2026 2:56 PM, Manish Dharanenthiran wrote: > As per IEEE Std 802.11-2024, subclause 26.17.2.2, a 6 GHz AP can transmit > a Beacon frame using a non-HT duplicate PPDU, so that stations scanning > only PSC channels can discover it. Currently, there is no mechanism > to request the driver to transmit non-HT duplicate Beacon frames. > > In [1], changes were made to parse the Beacon from user-space to set > the non-HT duplicate flag in the kernel. However, it was suggested that > non-HT transmission be part of the Beacon TX rate settings. Hence, add > NL80211_TXRATE_6GHZ_NON_HT_DUP as a flag attribute under > NL80211_ATTR_TX_RATES to let user-space request the driver to transmit > non-HT duplicate Beacons. > > Also add validation to reject the Beacon if non-HT duplicate Beacon > transmission is enabled when legacy rates are not configured. > > [1] https://lore.kernel.org/all/[email protected]/ > > Signed-off-by: Manish Dharanenthiran <[email protected]> > --- > Note: Users(ath11k&ath12k) of this new NL attribute will be posted later > once this gets approved. > --- > include/net/cfg80211.h | 1 + > include/uapi/linux/nl80211.h | 4 ++++ > net/wireless/nl80211.c | 13 +++++++++++++ > 3 files changed, 18 insertions(+) > > diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h > index 97c16d4ff127..6bc490108303 100644 > --- a/include/net/cfg80211.h > +++ b/include/net/cfg80211.h > @@ -901,6 +901,7 @@ struct cfg80211_bitrate_mask { > enum nl80211_eht_gi eht_gi; > enum nl80211_he_ltf he_ltf; > enum nl80211_eht_ltf eht_ltf; > + bool nonht_dup_6ghz; > } control[NUM_NL80211_BANDS]; > }; > > diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h > index 020387d76412..d8fefefc11a9 100644 > --- a/include/uapi/linux/nl80211.h > +++ b/include/uapi/linux/nl80211.h > @@ -5900,6 +5900,9 @@ enum nl80211_key_attributes { > * see &struct nl80211_txrate_eht > * @NL80211_TXRATE_EHT_GI: configure EHT GI, (u8, see &enum nl80211_eht_gi) > * @NL80211_TXRATE_EHT_LTF: configure EHT LTF, (u8, see &enum nl80211_eht_ltf) > + * @NL80211_TXRATE_6GHZ_NON_HT_DUP: configure 6 GHz non-HT duplicate Beacon > + * transmission. This flag is applicable only in Beacon TX rate setting > + * and must be accompanied by a non-HT (legacy) Beacon rate. > * @__NL80211_TXRATE_AFTER_LAST: internal > * @NL80211_TXRATE_MAX: highest TX rate attribute > */ > @@ -5915,6 +5918,7 @@ enum nl80211_tx_rate_attributes { > NL80211_TXRATE_EHT, > NL80211_TXRATE_EHT_GI, > NL80211_TXRATE_EHT_LTF, > + NL80211_TXRATE_6GHZ_NON_HT_DUP, > > /* keep last */ > __NL80211_TXRATE_AFTER_LAST, > diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c > index 44f2bad08670..cb4752fc38a0 100644 > --- a/net/wireless/nl80211.c > +++ b/net/wireless/nl80211.c > @@ -569,6 +569,7 @@ static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = { > [NL80211_TXRATE_EHT_LTF] = NLA_POLICY_RANGE(NLA_U8, > NL80211_RATE_INFO_EHT_1XLTF, > NL80211_RATE_INFO_EHT_8XLTF), > + [NL80211_TXRATE_6GHZ_NON_HT_DUP] = { .type = NLA_FLAG }, > > }; > > @@ -6303,6 +6304,14 @@ static int nl80211_parse_tx_bitrate_mask(struct genl_info *info, > mask->control[band].eht_ltf = > nla_get_u8(tb[NL80211_TXRATE_EHT_LTF]); > > + if (tb[NL80211_TXRATE_6GHZ_NON_HT_DUP]) { > + if (band != NL80211_BAND_6GHZ || > + (wdev->iftype != NL80211_IFTYPE_AP && > + wdev->iftype != NL80211_IFTYPE_P2P_GO)) > + return -EINVAL; > + mask->control[band].nonht_dup_6ghz = true; > + } > + > if (mask->control[band].legacy == 0) { > /* don't allow empty legacy rates if HT, VHT, HE or EHT > * are not even supported. > @@ -6344,6 +6353,7 @@ static int validate_beacon_tx_rate(struct cfg80211_registered_device *rdev, > { > u32 count_ht, count_vht, count_he, count_eht, i; > u32 rate = beacon_rate->control[band].legacy; > + bool nonht_dup = beacon_rate->control[band].nonht_dup_6ghz; > > /* Allow only one rate */ > if (hweight32(rate) > 1) > @@ -6405,6 +6415,9 @@ static int validate_beacon_tx_rate(struct cfg80211_registered_device *rdev, > (!rate && !count_ht && !count_vht && !count_he && !count_eht)) > return -EINVAL; > > + if (nonht_dup && !rate) > + return -EINVAL; Since the changes introduce NL80211_TXRATE_6GHZ_NON_HT_DUP as a separate configuration parameter, should cfg80211 verify consistency with the Beacon template's HE operation duplicate beacon subfield? > + > if (rate && > !wiphy_ext_feature_isset(&rdev->wiphy, > NL80211_EXT_FEATURE_BEACON_RATE_LEGACY)) > > --- > base-commit: 6c5fc504d0d6934132637aa3db4b9b58148eaa78 > change-id: 20260805-dup-beacon-0d074e15ecf7 > >