2022-03-21 08:15:40

by Rameshkumar Sundaram

[permalink] [raw]
Subject: [PATCH v2 0/2] Add support to configure 6GHz non-ht duplicate transmission

A 6GHz AP can decide to transmit Beacon, Broadcast probe response
and FILS discovery frames in a non-HT duplicate PPDU when
operating in non 20MHz Bandwidth to enhance its discoverability.
(IEEE Std 802.11ax‐2021-26.17.2.2)

Add changes to configure 6GHz non-HT duplicate beacon transmission
based on Duplicate Beacon subfield of 6GHz Operation Information
field of the HE Operation element in Beacon.

v2
* Addressed Johannes comments.

Signed-off-by: Rameshkumar Sundaram <[email protected]>

Rameshkumar Sundaram (2):
mac80211: add support to configure 6GHz non-ht duplicate transmission
ath11k: add support to configure 6GHz non-ht duplicate transmission

drivers/net/wireless/ath/ath11k/mac.c | 38 +++++++++++++++++++++++++++++++++++
drivers/net/wireless/ath/ath11k/wmi.h | 8 ++++++++
include/net/mac80211.h | 3 +++
net/mac80211/cfg.c | 15 ++++++++++++++
4 files changed, 64 insertions(+)

--
2.7.4


2022-03-21 17:45:30

by Rameshkumar Sundaram

[permalink] [raw]
Subject: [PATCH v2 2/2] ath11k: add support to configure 6GHz non-ht duplicate transmission

A 6GHz AP can decide to transmit Beacon, Broadcast probe response
and FILS discovery frames in a non-HT duplicate PPDU when
operating in non 20MHz Bandwidth to enhance its discoverability.
(IEEE Std 802.11ax‐2021-26.17.2.2)

Send WMI_VDEV_PARAM_6GHZ_PARAMS with enable/disable option to FW
based on he_6g_nonht_dup_beacon_set.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1

Signed-off-by: Rameshkumar Sundaram <[email protected]>
---
drivers/net/wireless/ath/ath11k/mac.c | 38 +++++++++++++++++++++++++++++++++++
drivers/net/wireless/ath/ath11k/wmi.h | 8 ++++++++
2 files changed, 46 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 07f499d..697e4dc 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -2915,6 +2915,33 @@ static int ath11k_mac_fils_discovery(struct ath11k_vif *arvif,
return ret;
}

+static int ath11k_mac_set_6g_nonht_dup_conf(struct ath11k_vif *arvif,
+ const struct cfg80211_chan_def *chandef)
+{
+ struct ath11k *ar = arvif->ar;
+ int ret = 0;
+ bool is_nontx_ap = arvif->vif->bss_conf.nontransmitted;
+ enum wmi_phy_mode mode = ath11k_phymodes[chandef->chan->band][chandef->width];
+ bool dup_bcn_enable = arvif->vif->bss_conf.he_6g_nonht_dup_beacon_set;
+
+ if ((arvif->vdev_type == WMI_VDEV_TYPE_AP) && !is_nontx_ap &&
+ (chandef->chan->band == NL80211_BAND_6GHZ)) {
+ u32 param_id = WMI_VDEV_PARAM_6GHZ_PARAMS;
+ u32 value = 0;
+
+ if (mode > MODE_11AX_HE20 && dup_bcn_enable) {
+ value |= WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BEACON;
+ value |= WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BCAST_PROBE_RSP;
+ value |= WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_FD_FRAME;
+ }
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "Set 6GHz non-ht dup params for "
+ "vdev %pM vdev_id %d param %d value %d\n", arvif->vif->addr,
+ arvif->vdev_id, param_id, value);
+ ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, param_id, value);
+ }
+ return ret;
+}
+
static int ath11k_mac_config_obss_pd(struct ath11k *ar,
struct ieee80211_he_obss_pd *he_obss_pd)
{
@@ -3128,6 +3155,17 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
arvif->do_not_send_tmpl = true;
else
arvif->do_not_send_tmpl = false;
+
+ if (vif->type == NL80211_IFTYPE_AP && vif->bss_conf.he_support) {
+ if (!ath11k_mac_vif_chan(arvif->vif, &def)) {
+ ret = ath11k_mac_set_6g_nonht_dup_conf(arvif, &def);
+ if (ret) {
+ ath11k_warn(ar->ab, "failed to set 6G non-ht dup"
+ " conf for vdev %d: %d\n",
+ arvif->vdev_id, ret);
+ }
+ }
+ }
}

if (changed & (BSS_CHANGED_BEACON_INFO | BSS_CHANGED_BEACON)) {
diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index 2f26ec1a..96ed891 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -2125,6 +2125,14 @@ enum {
/* preablbe short */
#define WMI_VDEV_PREAMBLE_SHORT 0x2

+/** 6GHZ params **/
+/* Control to enable/disable beacon tx in non-HT duplicate */
+#define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BEACON BIT(0)
+/* Control to enable/disable broadcast probe response tx in non-HT duplicate */
+#define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BCAST_PROBE_RSP BIT(1)
+/* Control to enable/disable FILS discovery frame tx in non-HT duplicate */
+#define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_FD_FRAME BIT(2)
+
enum wmi_peer_smps_state {
WMI_PEER_SMPS_PS_NONE = 0x0,
WMI_PEER_SMPS_STATIC = 0x1,
--
2.7.4

2022-03-21 21:20:13

by Rameshkumar Sundaram

[permalink] [raw]
Subject: [PATCH v2 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission

A 6GHz AP can decide to transmit Beacon, Broadcast probe response
and FILS discovery frames in a non-HT duplicate PPDU when
operating in non 20MHz Bandwidth to enhance its discoverability.
(IEEE Std 802.11ax‐2021-26.17.2.2)

Add changes to configure 6GHz non-HT duplicate beacon transmission
based on Duplicate Beacon subfield of 6GHz Operation Information
field of the HE Operation element in Beacon.

Signed-off-by: Rameshkumar Sundaram <[email protected]>
---
include/net/mac80211.h | 3 +++
net/mac80211/cfg.c | 15 +++++++++++++++
2 files changed, 18 insertions(+)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c50221d..1472ca0 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -630,6 +630,8 @@ struct ieee80211_fils_discovery {
* @unsol_bcast_probe_resp_interval: Unsolicited broadcast probe response
* interval.
* @s1g: BSS is S1G BSS (affects Association Request format).
+ * @he_6g_nonht_dup_beacon_set: if set, indicates that HE 6GHz non-HT duplicate
+ * beacon transmission is enabled for this BSS.
* @beacon_tx_rate: The configured beacon transmit rate that needs to be passed
* to driver when rate control is offloaded to firmware.
* @power_type: power type of BSS for 6 GHz
@@ -704,6 +706,7 @@ struct ieee80211_bss_conf {
struct cfg80211_he_bss_color he_bss_color;
struct ieee80211_fils_discovery fils_discovery;
u32 unsol_bcast_probe_resp_interval;
+ bool he_6g_nonht_dup_beacon_set;
bool s1g;
struct cfg80211_bitrate_mask beacon_tx_rate;
enum ieee80211_ap_reg_power power_type;
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 87a2080..077e1bd 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -997,6 +997,9 @@ static int ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
struct beacon_data *new, *old;
int new_head_len, new_tail_len;
int size, err;
+ const struct element *cap;
+ struct ieee80211_he_operation *he_oper;
+ const struct ieee80211_he_6ghz_oper *he_6ghz_oper;
u32 changed = BSS_CHANGED_BEACON;

old = sdata_dereference(sdata->u.ap.beacon, sdata);
@@ -1084,6 +1087,18 @@ static int ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
changed |= BSS_CHANGED_FTM_RESPONDER;
}

+ cap = cfg80211_find_ext_elem(WLAN_EID_EXT_HE_OPERATION,
+ params->tail, params->tail_len);
+ if (cap && cap->datalen >= sizeof(*he_oper) + 1) {
+ he_oper = (void *)(cap->data + 1);
+ he_6ghz_oper = ieee80211_he_6ghz_oper(he_oper);
+ if (he_6ghz_oper) {
+ sdata->vif.bss_conf.he_6g_nonht_dup_beacon_set = false;
+ if (he_6ghz_oper->control & IEEE80211_HE_6GHZ_OPER_CTRL_DUP_BEACON)
+ sdata->vif.bss_conf.he_6g_nonht_dup_beacon_set = true;
+ }
+ }
+
rcu_assign_pointer(sdata->u.ap.beacon, new);

if (old)
--
2.7.4