All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add support to configure 6GHz non-ht duplicate transmission
@ 2022-02-15  8:42 ` Rameshkumar Sundaram
  0 siblings, 0 replies; 20+ messages in thread
From: Rameshkumar Sundaram @ 2022-02-15  8:42 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, ath11k, Rameshkumar Sundaram

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 <quic_ramess@quicinc.com>

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

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

-- 
2.7.4


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 0/2] Add support to configure 6GHz non-ht duplicate transmission
@ 2022-02-15  8:42 ` Rameshkumar Sundaram
  0 siblings, 0 replies; 20+ messages in thread
From: Rameshkumar Sundaram @ 2022-02-15  8:42 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, ath11k, Rameshkumar Sundaram

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 <quic_ramess@quicinc.com>

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

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

-- 
2.7.4


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
  2022-02-15  8:42 ` Rameshkumar Sundaram
@ 2022-02-15  8:43   ` Rameshkumar Sundaram
  -1 siblings, 0 replies; 20+ messages in thread
From: Rameshkumar Sundaram @ 2022-02-15  8:43 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, ath11k, Rameshkumar Sundaram

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 <quic_ramess@quicinc.com>
---
 include/net/mac80211.h |  1 +
 net/mac80211/cfg.c     | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c50221d..a4b1efb 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -704,6 +704,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..9b6f55e 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,20 @@ 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 (u8_get_bits(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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
@ 2022-02-15  8:43   ` Rameshkumar Sundaram
  0 siblings, 0 replies; 20+ messages in thread
From: Rameshkumar Sundaram @ 2022-02-15  8:43 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, ath11k, Rameshkumar Sundaram

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 <quic_ramess@quicinc.com>
---
 include/net/mac80211.h |  1 +
 net/mac80211/cfg.c     | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c50221d..a4b1efb 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -704,6 +704,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..9b6f55e 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,20 @@ 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 (u8_get_bits(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


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/2] ath11k: add support to configure 6GHz non-ht duplicate transmission
  2022-02-15  8:42 ` Rameshkumar Sundaram
@ 2022-02-15  8:43   ` Rameshkumar Sundaram
  -1 siblings, 0 replies; 20+ messages in thread
From: Rameshkumar Sundaram @ 2022-02-15  8:43 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, ath11k, Rameshkumar Sundaram

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 <quic_ramess@quicinc.com>
---
 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 80f8640..307377a 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)
 {
@@ -3129,6 +3156,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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/2] ath11k: add support to configure 6GHz non-ht duplicate transmission
@ 2022-02-15  8:43   ` Rameshkumar Sundaram
  0 siblings, 0 replies; 20+ messages in thread
From: Rameshkumar Sundaram @ 2022-02-15  8:43 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, ath11k, Rameshkumar Sundaram

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 <quic_ramess@quicinc.com>
---
 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 80f8640..307377a 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)
 {
@@ -3129,6 +3156,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


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
  2022-02-15  8:43   ` Rameshkumar Sundaram
@ 2022-03-11 11:03     ` Johannes Berg
  -1 siblings, 0 replies; 20+ messages in thread
From: Johannes Berg @ 2022-03-11 11:03 UTC (permalink / raw)
  To: Rameshkumar Sundaram; +Cc: linux-wireless, ath11k

Hi,

Couple of notes below:

> @@ -704,6 +704,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;

This is missing documentation.
 
> +	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 (u8_get_bits(he_6ghz_oper->control,
> +					IEEE80211_HE_6GHZ_OPER_CTRL_DUP_BEACON)) {
> +				sdata->vif.bss_conf.he_6g_nonht_dup_beacon_set = true;
> +			}

no braces needed there, and no u8_get_bits() either, you can just & ?

> +		}
> +	}

I am wondering though if this should even be detected from the HE
operation element itself, rather than from the beacon rate settings that
are separate in nl80211?

johannes

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
@ 2022-03-11 11:03     ` Johannes Berg
  0 siblings, 0 replies; 20+ messages in thread
From: Johannes Berg @ 2022-03-11 11:03 UTC (permalink / raw)
  To: Rameshkumar Sundaram; +Cc: linux-wireless, ath11k

Hi,

Couple of notes below:

> @@ -704,6 +704,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;

This is missing documentation.
 
> +	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 (u8_get_bits(he_6ghz_oper->control,
> +					IEEE80211_HE_6GHZ_OPER_CTRL_DUP_BEACON)) {
> +				sdata->vif.bss_conf.he_6g_nonht_dup_beacon_set = true;
> +			}

no braces needed there, and no u8_get_bits() either, you can just & ?

> +		}
> +	}

I am wondering though if this should even be detected from the HE
operation element itself, rather than from the beacon rate settings that
are separate in nl80211?

johannes

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
  2022-03-11 11:03     ` Johannes Berg
@ 2022-03-21  5:12       ` Rameshkumar Sundaram (QUIC)
  -1 siblings, 0 replies; 20+ messages in thread
From: Rameshkumar Sundaram (QUIC) @ 2022-03-21  5:12 UTC (permalink / raw)
  To: Johannes Berg, Rameshkumar Sundaram (QUIC); +Cc: linux-wireless, ath11k


> -----Original Message-----
> From: Johannes Berg <johannes@sipsolutions.net>
> Sent: Friday, March 11, 2022 4:33 PM
> To: Rameshkumar Sundaram (QUIC) <quic_ramess@quicinc.com>
> Cc: linux-wireless@vger.kernel.org; ath11k@lists.infradead.org
> Subject: Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht
> duplicate transmission
> 
> Hi,
> 
> Couple of notes below:
> 
> > @@ -704,6 +704,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;
> 
> This is missing documentation.
Thanks, will add it in next patch
> 
> > +	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 (u8_get_bits(he_6ghz_oper->control,
> > +
> 	IEEE80211_HE_6GHZ_OPER_CTRL_DUP_BEACON)) {
> > +				sdata-
> >vif.bss_conf.he_6g_nonht_dup_beacon_set = true;
> > +			}
> 
> no braces needed there, and no u8_get_bits() either, you can just & ?
Sure, I remember I got sparse warnings last time without this (also took reference from net/mac80211/util.c ieee80211_chandef_he_6ghz_oper()), will send v2 with 'just &' anyway.
> 
> > +		}
> > +	}
> 
> I am wondering though if this should even be detected from the HE
> operation element itself, rather than from the beacon rate settings that are
> separate in nl80211?
This is a BW dependent bit in HE Oper IE and user space can switch BW (CSA/chan switch scenarios).
Which can call assign_beacon directly, Hence adding the logic here to cover all Beacon change cases.
> 
> johannes

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
@ 2022-03-21  5:12       ` Rameshkumar Sundaram (QUIC)
  0 siblings, 0 replies; 20+ messages in thread
From: Rameshkumar Sundaram (QUIC) @ 2022-03-21  5:12 UTC (permalink / raw)
  To: Johannes Berg, Rameshkumar Sundaram (QUIC); +Cc: linux-wireless, ath11k


> -----Original Message-----
> From: Johannes Berg <johannes@sipsolutions.net>
> Sent: Friday, March 11, 2022 4:33 PM
> To: Rameshkumar Sundaram (QUIC) <quic_ramess@quicinc.com>
> Cc: linux-wireless@vger.kernel.org; ath11k@lists.infradead.org
> Subject: Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht
> duplicate transmission
> 
> Hi,
> 
> Couple of notes below:
> 
> > @@ -704,6 +704,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;
> 
> This is missing documentation.
Thanks, will add it in next patch
> 
> > +	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 (u8_get_bits(he_6ghz_oper->control,
> > +
> 	IEEE80211_HE_6GHZ_OPER_CTRL_DUP_BEACON)) {
> > +				sdata-
> >vif.bss_conf.he_6g_nonht_dup_beacon_set = true;
> > +			}
> 
> no braces needed there, and no u8_get_bits() either, you can just & ?
Sure, I remember I got sparse warnings last time without this (also took reference from net/mac80211/util.c ieee80211_chandef_he_6ghz_oper()), will send v2 with 'just &' anyway.
> 
> > +		}
> > +	}
> 
> I am wondering though if this should even be detected from the HE
> operation element itself, rather than from the beacon rate settings that are
> separate in nl80211?
This is a BW dependent bit in HE Oper IE and user space can switch BW (CSA/chan switch scenarios).
Which can call assign_beacon directly, Hence adding the logic here to cover all Beacon change cases.
> 
> johannes
-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
  2022-03-21  5:12       ` Rameshkumar Sundaram (QUIC)
@ 2022-03-21  8:58         ` Johannes Berg
  -1 siblings, 0 replies; 20+ messages in thread
From: Johannes Berg @ 2022-03-21  8:58 UTC (permalink / raw)
  To: Rameshkumar Sundaram (QUIC); +Cc: linux-wireless, ath11k

On Mon, 2022-03-21 at 05:12 +0000, Rameshkumar Sundaram (QUIC) wrote:
> 
> > 
> > I am wondering though if this should even be detected from the HE
> > operation element itself, rather than from the beacon rate settings
> > that are
> > separate in nl80211?
> This is a BW dependent bit in HE Oper IE and user space can switch BW
> (CSA/chan switch scenarios).
> Which can call assign_beacon directly, Hence adding the logic here to
> cover all Beacon change cases.
> 

Yeah but still ... why do we take it from the content rather than adding
a control for it?

johannes

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
@ 2022-03-21  8:58         ` Johannes Berg
  0 siblings, 0 replies; 20+ messages in thread
From: Johannes Berg @ 2022-03-21  8:58 UTC (permalink / raw)
  To: Rameshkumar Sundaram (QUIC); +Cc: linux-wireless, ath11k

On Mon, 2022-03-21 at 05:12 +0000, Rameshkumar Sundaram (QUIC) wrote:
> 
> > 
> > I am wondering though if this should even be detected from the HE
> > operation element itself, rather than from the beacon rate settings
> > that are
> > separate in nl80211?
> This is a BW dependent bit in HE Oper IE and user space can switch BW
> (CSA/chan switch scenarios).
> Which can call assign_beacon directly, Hence adding the logic here to
> cover all Beacon change cases.
> 

Yeah but still ... why do we take it from the content rather than adding
a control for it?

johannes

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
  2022-03-21  8:58         ` Johannes Berg
@ 2022-03-22 13:50           ` Rameshkumar Sundaram (QUIC)
  -1 siblings, 0 replies; 20+ messages in thread
From: Rameshkumar Sundaram (QUIC) @ 2022-03-22 13:50 UTC (permalink / raw)
  To: Johannes Berg, Rameshkumar Sundaram (QUIC); +Cc: linux-wireless, ath11k


> -----Original Message-----
> From: Johannes Berg <johannes@sipsolutions.net>
> Sent: Monday, March 21, 2022 2:28 PM
> To: Rameshkumar Sundaram (QUIC) <quic_ramess@quicinc.com>
> Cc: linux-wireless@vger.kernel.org; ath11k@lists.infradead.org
> Subject: Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht
> duplicate transmission
> 
> On Mon, 2022-03-21 at 05:12 +0000, Rameshkumar Sundaram (QUIC) wrote:
> >
> > >
> > > I am wondering though if this should even be detected from the HE
> > > operation element itself, rather than from the beacon rate settings
> > > that are separate in nl80211?
> > This is a BW dependent bit in HE Oper IE and user space can switch BW
> > (CSA/chan switch scenarios).
> > Which can call assign_beacon directly, Hence adding the logic here to
> > cover all Beacon change cases.
> >
> 
> Yeah but still ... why do we take it from the content rather than adding a
> control for it?
So, Suggestion here is to add a new NL attribute to carry the information from user space for
START_AP and SET_BEACON NL commands and use it here, is that understanding correct ?
> 
> johannes

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
@ 2022-03-22 13:50           ` Rameshkumar Sundaram (QUIC)
  0 siblings, 0 replies; 20+ messages in thread
From: Rameshkumar Sundaram (QUIC) @ 2022-03-22 13:50 UTC (permalink / raw)
  To: Johannes Berg, Rameshkumar Sundaram (QUIC); +Cc: linux-wireless, ath11k


> -----Original Message-----
> From: Johannes Berg <johannes@sipsolutions.net>
> Sent: Monday, March 21, 2022 2:28 PM
> To: Rameshkumar Sundaram (QUIC) <quic_ramess@quicinc.com>
> Cc: linux-wireless@vger.kernel.org; ath11k@lists.infradead.org
> Subject: Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht
> duplicate transmission
> 
> On Mon, 2022-03-21 at 05:12 +0000, Rameshkumar Sundaram (QUIC) wrote:
> >
> > >
> > > I am wondering though if this should even be detected from the HE
> > > operation element itself, rather than from the beacon rate settings
> > > that are separate in nl80211?
> > This is a BW dependent bit in HE Oper IE and user space can switch BW
> > (CSA/chan switch scenarios).
> > Which can call assign_beacon directly, Hence adding the logic here to
> > cover all Beacon change cases.
> >
> 
> Yeah but still ... why do we take it from the content rather than adding a
> control for it?
So, Suggestion here is to add a new NL attribute to carry the information from user space for
START_AP and SET_BEACON NL commands and use it here, is that understanding correct ?
> 
> johannes
-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
  2022-03-22 13:50           ` Rameshkumar Sundaram (QUIC)
@ 2022-03-22 15:04             ` Johannes Berg
  -1 siblings, 0 replies; 20+ messages in thread
From: Johannes Berg @ 2022-03-22 15:04 UTC (permalink / raw)
  To: Rameshkumar Sundaram (QUIC); +Cc: linux-wireless, ath11k

On Tue, 2022-03-22 at 13:50 +0000, Rameshkumar Sundaram (QUIC) wrote:
> > 
> So, Suggestion here is to add a new NL attribute to carry the
> information from user space for
> START_AP and SET_BEACON NL commands and use it here, is that
> understanding correct ?
> 

Well, I was thinking it would reasonably come with the beacon rate, i.e.
as a new attribute like NL80211_TXRATE_DUP?

johannes

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
@ 2022-03-22 15:04             ` Johannes Berg
  0 siblings, 0 replies; 20+ messages in thread
From: Johannes Berg @ 2022-03-22 15:04 UTC (permalink / raw)
  To: Rameshkumar Sundaram (QUIC); +Cc: linux-wireless, ath11k

On Tue, 2022-03-22 at 13:50 +0000, Rameshkumar Sundaram (QUIC) wrote:
> > 
> So, Suggestion here is to add a new NL attribute to carry the
> information from user space for
> START_AP and SET_BEACON NL commands and use it here, is that
> understanding correct ?
> 

Well, I was thinking it would reasonably come with the beacon rate, i.e.
as a new attribute like NL80211_TXRATE_DUP?

johannes

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
  2022-03-22 15:04             ` Johannes Berg
@ 2022-04-17 14:30               ` Rameshkumar Sundaram (QUIC)
  -1 siblings, 0 replies; 20+ messages in thread
From: Rameshkumar Sundaram (QUIC) @ 2022-04-17 14:30 UTC (permalink / raw)
  To: Johannes Berg, Rameshkumar Sundaram (QUIC); +Cc: linux-wireless, ath11k


> -----Original Message-----
> From: Johannes Berg <johannes@sipsolutions.net>
> Sent: Tuesday, March 22, 2022 8:34 PM
> To: Rameshkumar Sundaram (QUIC) <quic_ramess@quicinc.com>
> Cc: linux-wireless@vger.kernel.org; ath11k@lists.infradead.org
> Subject: Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht
> duplicate transmission
> 
> WARNING: This email originated from outside of Qualcomm. Please be wary
> of any links or attachments, and do not enable macros.
> 
> On Tue, 2022-03-22 at 13:50 +0000, Rameshkumar Sundaram (QUIC) wrote:
> > >
> > So, Suggestion here is to add a new NL attribute to carry the
> > information from user space for START_AP and SET_BEACON NL commands
> > and use it here, is that understanding correct ?
> >
> 
> Well, I was thinking it would reasonably come with the beacon rate, i.e.
> as a new attribute like NL80211_TXRATE_DUP?
Sorry not getting this, you mean hostapd would need to send new set of rates for this configuration ?
The expectation is that user-space will set this bit in HE oper IE only if legacy rates are present in beacon or basic rates.
> 
> johannes

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
@ 2022-04-17 14:30               ` Rameshkumar Sundaram (QUIC)
  0 siblings, 0 replies; 20+ messages in thread
From: Rameshkumar Sundaram (QUIC) @ 2022-04-17 14:30 UTC (permalink / raw)
  To: Johannes Berg, Rameshkumar Sundaram (QUIC); +Cc: linux-wireless, ath11k


> -----Original Message-----
> From: Johannes Berg <johannes@sipsolutions.net>
> Sent: Tuesday, March 22, 2022 8:34 PM
> To: Rameshkumar Sundaram (QUIC) <quic_ramess@quicinc.com>
> Cc: linux-wireless@vger.kernel.org; ath11k@lists.infradead.org
> Subject: Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht
> duplicate transmission
> 
> WARNING: This email originated from outside of Qualcomm. Please be wary
> of any links or attachments, and do not enable macros.
> 
> On Tue, 2022-03-22 at 13:50 +0000, Rameshkumar Sundaram (QUIC) wrote:
> > >
> > So, Suggestion here is to add a new NL attribute to carry the
> > information from user space for START_AP and SET_BEACON NL commands
> > and use it here, is that understanding correct ?
> >
> 
> Well, I was thinking it would reasonably come with the beacon rate, i.e.
> as a new attribute like NL80211_TXRATE_DUP?
Sorry not getting this, you mean hostapd would need to send new set of rates for this configuration ?
The expectation is that user-space will set this bit in HE oper IE only if legacy rates are present in beacon or basic rates.
> 
> johannes
-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
  2022-04-17 14:30               ` Rameshkumar Sundaram (QUIC)
@ 2022-05-04 11:47                 ` Johannes Berg
  -1 siblings, 0 replies; 20+ messages in thread
From: Johannes Berg @ 2022-05-04 11:47 UTC (permalink / raw)
  To: Rameshkumar Sundaram (QUIC); +Cc: linux-wireless, ath11k

On Sun, 2022-04-17 at 14:30 +0000, Rameshkumar Sundaram (QUIC) wrote:
> > 
> > Well, I was thinking it would reasonably come with the beacon rate,
> > i.e.
> > as a new attribute like NL80211_TXRATE_DUP?
> Sorry not getting this, you mean hostapd would need to send new set of
> rates for this configuration ?
> The expectation is that user-space will set this bit in HE oper IE
> only if legacy rates are present in beacon or basic rates.
> 

?

I don't understand.

The point is - you're setting the bit in the beacon that indicates "I'm
transmitting it as duplicate", right?

But you're also using that bit to actually configure it to do (non-HT)
duplicate transmissions.

But fundamentally, those two things aren't really related, are they? Why
shouldn't you be - at least theoretically - be able to configure it for
duplicate transmission (or not) regardless of the bit in the beacon?

To me it seems "do duplicate transmission" is a property of the *rate*
you want to use to transmit, not really necessarily a property of the
*content* of the frame you're transmitting.

johannes

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] mac80211: add support to configure 6GHz non-ht duplicate transmission
@ 2022-05-04 11:47                 ` Johannes Berg
  0 siblings, 0 replies; 20+ messages in thread
From: Johannes Berg @ 2022-05-04 11:47 UTC (permalink / raw)
  To: Rameshkumar Sundaram (QUIC); +Cc: linux-wireless, ath11k

On Sun, 2022-04-17 at 14:30 +0000, Rameshkumar Sundaram (QUIC) wrote:
> > 
> > Well, I was thinking it would reasonably come with the beacon rate,
> > i.e.
> > as a new attribute like NL80211_TXRATE_DUP?
> Sorry not getting this, you mean hostapd would need to send new set of
> rates for this configuration ?
> The expectation is that user-space will set this bit in HE oper IE
> only if legacy rates are present in beacon or basic rates.
> 

?

I don't understand.

The point is - you're setting the bit in the beacon that indicates "I'm
transmitting it as duplicate", right?

But you're also using that bit to actually configure it to do (non-HT)
duplicate transmissions.

But fundamentally, those two things aren't really related, are they? Why
shouldn't you be - at least theoretically - be able to configure it for
duplicate transmission (or not) regardless of the bit in the beacon?

To me it seems "do duplicate transmission" is a property of the *rate*
you want to use to transmit, not really necessarily a property of the
*content* of the frame you're transmitting.

johannes

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-05-04 11:47 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15  8:42 [PATCH 0/2] Add support to configure 6GHz non-ht duplicate transmission Rameshkumar Sundaram
2022-02-15  8:42 ` Rameshkumar Sundaram
2022-02-15  8:43 ` [PATCH 1/2] mac80211: add " Rameshkumar Sundaram
2022-02-15  8:43   ` Rameshkumar Sundaram
2022-03-11 11:03   ` Johannes Berg
2022-03-11 11:03     ` Johannes Berg
2022-03-21  5:12     ` Rameshkumar Sundaram (QUIC)
2022-03-21  5:12       ` Rameshkumar Sundaram (QUIC)
2022-03-21  8:58       ` Johannes Berg
2022-03-21  8:58         ` Johannes Berg
2022-03-22 13:50         ` Rameshkumar Sundaram (QUIC)
2022-03-22 13:50           ` Rameshkumar Sundaram (QUIC)
2022-03-22 15:04           ` Johannes Berg
2022-03-22 15:04             ` Johannes Berg
2022-04-17 14:30             ` Rameshkumar Sundaram (QUIC)
2022-04-17 14:30               ` Rameshkumar Sundaram (QUIC)
2022-05-04 11:47               ` Johannes Berg
2022-05-04 11:47                 ` Johannes Berg
2022-02-15  8:43 ` [PATCH 2/2] ath11k: " Rameshkumar Sundaram
2022-02-15  8:43   ` Rameshkumar Sundaram

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.