ath11k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ath11k: add support for 256 bitmap in Block ack and duration based RTS threshold
@ 2020-10-09  2:18 Pradeep Kumar Chitrapu
  2020-10-09  2:18 ` [PATCH 1/4] mac80211: save HE oper info in BSS config for mesh Pradeep Kumar Chitrapu
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Pradeep Kumar Chitrapu @ 2020-10-09  2:18 UTC (permalink / raw)
  To: Johannes Berg, ath11k; +Cc: Pradeep Kumar Chitrapu, linux-wireless

This series adds support for the configuration of following in
HE capable ath11k APs:
1. TXOP duration based RTS threshold using HE Operation parameters in
   beacons for AP and mesh modes.
2. BlockAck's bitmap to support upto 256 bits in mesh mode. Without
   this maximum of 64 bits are supported in BlockAck bitmap.

mac80211 patch sets he_support flag for mesh BSS and addresses
previous review comments from https://patchwork.kernel.org/patch/11664077/

Pradeep Kumar Chitrapu (4):
  mac80211: save HE oper info in BSS config for mesh
  ath11k: fix incorrect wmi param for configuring HE operation
  ath11k: support TXOP duration based RTS threshold
  ath11k: mesh: add support for 256 bitmap in blockack frames in 11ax

 drivers/net/wireless/ath/ath11k/mac.c | 40 +++++++++++++++++----------
 drivers/net/wireless/ath/ath11k/wmi.h |  2 +-
 include/net/mac80211.h                |  3 +-
 net/mac80211/mesh.c                   | 30 ++++++++++++++++++++
 4 files changed, 58 insertions(+), 17 deletions(-)


base-commit: ba6ff70a3bb76c1ff440d3a0044b82e97abb648f
-- 
2.17.1


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

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

* [PATCH 1/4] mac80211: save HE oper info in BSS config for mesh
  2020-10-09  2:18 [PATCH 0/4] ath11k: add support for 256 bitmap in Block ack and duration based RTS threshold Pradeep Kumar Chitrapu
@ 2020-10-09  2:18 ` Pradeep Kumar Chitrapu
  2020-10-19 20:29   ` Peter Oh
  2020-10-09  2:18 ` [PATCH 2/4] ath11k: fix incorrect wmi param for configuring HE operation Pradeep Kumar Chitrapu
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Pradeep Kumar Chitrapu @ 2020-10-09  2:18 UTC (permalink / raw)
  To: Johannes Berg, ath11k; +Cc: Pradeep Kumar Chitrapu, linux-wireless

Currently he_support is set only for AP mode. Storing this
information for mesh BSS as well helps driver to determine
HE support. Also save HE operation element params in BSS
conf so that drivers can access this for any configurations
instead of having to parse the beacon to fetch that info.

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
---
 include/net/mac80211.h |  3 ++-
 net/mac80211/mesh.c    | 30 ++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index e8e295dae744..ee72ea5ec861 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -621,7 +621,8 @@ struct ieee80211_fils_discovery {
  *	nontransmitted BSSIDs
  * @profile_periodicity: the least number of beacon frames need to be received
  *	in order to discover all the nontransmitted BSSIDs in the set.
- * @he_oper: HE operation information of the AP we are connected to
+ * @he_oper: HE operation information of the BSS (AP/Mesh) or of the AP we are
+ *	connected to (STA)
  * @he_obss_pd: OBSS Packet Detection parameters.
  * @he_bss_color: BSS coloring settings, if BSS supports HE
  * @fils_discovery: FILS discovery configuration
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index ce5825d6f1d1..7841bb766f62 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -667,6 +667,35 @@ void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh)
 	}
 }
 
+static void
+ieee80211_mesh_update_bss_params(struct ieee80211_sub_if_data *sdata,
+				 u8 *ie, u8 ie_len)
+{
+	struct ieee80211_supported_band *sband;
+	const u8 *cap;
+	const struct ieee80211_he_operation *he_oper = NULL;
+
+	sband = ieee80211_get_sband(sdata);
+	if (!sband)
+		return;
+
+	if (ieee80211_get_he_iftype_cap(sband, NL80211_IFTYPE_MESH_POINT) &&
+	    !(sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT ||
+	    sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 ||
+	    sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10))
+		return;
+
+	sdata->vif.bss_conf.he_support = true;
+
+	cap = cfg80211_find_ext_ie(WLAN_EID_EXT_HE_OPERATION, ie, ie_len);
+	if (cap && cap[1] >= ieee80211_he_oper_size(&cap[3]))
+		he_oper = (void *)(cap + 3);
+
+	if (he_oper)
+		sdata->vif.bss_conf.he_oper.params =
+			__le32_to_cpu(he_oper->he_oper_params);
+}
+
 /**
  * ieee80211_fill_mesh_addresses - fill addresses of a locally originated mesh frame
  * @hdr:	802.11 frame header
@@ -943,6 +972,7 @@ ieee80211_mesh_build_beacon(struct ieee80211_if_mesh *ifmsh)
 
 	bcn->tail_len = skb->len;
 	memcpy(bcn->tail, skb->data, bcn->tail_len);
+	ieee80211_mesh_update_bss_params(sdata, bcn->tail, bcn->tail_len);
 	bcn->meshconf = (struct ieee80211_meshconf_ie *)
 					(bcn->tail + ifmsh->meshconf_offset);
 
-- 
2.17.1


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

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

* [PATCH 2/4] ath11k: fix incorrect wmi param for configuring HE operation
  2020-10-09  2:18 [PATCH 0/4] ath11k: add support for 256 bitmap in Block ack and duration based RTS threshold Pradeep Kumar Chitrapu
  2020-10-09  2:18 ` [PATCH 1/4] mac80211: save HE oper info in BSS config for mesh Pradeep Kumar Chitrapu
@ 2020-10-09  2:18 ` Pradeep Kumar Chitrapu
  2020-10-09  2:18 ` [PATCH 3/4] ath11k: support TXOP duration based RTS threshold Pradeep Kumar Chitrapu
  2020-10-09  2:18 ` [PATCH 4/4] ath11k: mesh: add support for 256 bitmap in blockack frames in 11ax Pradeep Kumar Chitrapu
  3 siblings, 0 replies; 7+ messages in thread
From: Pradeep Kumar Chitrapu @ 2020-10-09  2:18 UTC (permalink / raw)
  To: Johannes Berg, ath11k; +Cc: Pradeep Kumar Chitrapu, linux-wireless

WMI_VDEV_PARAM_TX_OFDMA_CPLEN has been added with incorrect enum
value. Fix the enum to represent WMI param for configuring HE
operation field.

This is applicable to firmwares under
https://github.com/kvalo/ath11k-firmware/tree/master/IPQ8074/hw2.0
https://github.com/kvalo/ath11k-firmware/tree/master/IPQ6018/hw1.0
https://github.com/kvalo/ath11k-firmware/tree/master/QCN9074/hw1.0

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/wmi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index 5a32ba0eb4f5..55b1a5db206a 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -1032,7 +1032,7 @@ enum wmi_tlv_vdev_param {
 	WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
 	WMI_VDEV_PARAM_BSS_COLOR,
 	WMI_VDEV_PARAM_SET_HEMU_MODE,
-	WMI_VDEV_PARAM_TX_OFDMA_CPLEN,
+	WMI_VDEV_PARAM_HEOPS_0_31 = 0x8003,
 };
 
 enum wmi_tlv_peer_flags {
-- 
2.17.1


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

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

* [PATCH 3/4] ath11k: support TXOP duration based RTS threshold
  2020-10-09  2:18 [PATCH 0/4] ath11k: add support for 256 bitmap in Block ack and duration based RTS threshold Pradeep Kumar Chitrapu
  2020-10-09  2:18 ` [PATCH 1/4] mac80211: save HE oper info in BSS config for mesh Pradeep Kumar Chitrapu
  2020-10-09  2:18 ` [PATCH 2/4] ath11k: fix incorrect wmi param for configuring HE operation Pradeep Kumar Chitrapu
@ 2020-10-09  2:18 ` Pradeep Kumar Chitrapu
  2020-10-09  2:18 ` [PATCH 4/4] ath11k: mesh: add support for 256 bitmap in blockack frames in 11ax Pradeep Kumar Chitrapu
  3 siblings, 0 replies; 7+ messages in thread
From: Pradeep Kumar Chitrapu @ 2020-10-09  2:18 UTC (permalink / raw)
  To: Johannes Berg, ath11k; +Cc: Pradeep Kumar Chitrapu, linux-wireless

HE operation IE in beacons is constructed based on userspace params,
which firmware might not be aware of. This causes firmware not to
configure TXOP duration based RTS threshold which could cause mismatch
in behaviour with respect to what is being advertised in beacons. This
patch sends HE operation IE fetched from beacon to firmware using
WMI interface for configuration.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/mac.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 3f63a7bd6b59..77d073054ba2 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -1948,9 +1948,25 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
 	if (changed & BSS_CHANGED_BSSID && !is_zero_ether_addr(info->bssid))
 		ether_addr_copy(arvif->bssid, info->bssid);
 
-	if (changed & BSS_CHANGED_BEACON_ENABLED)
+	if (changed & BSS_CHANGED_BEACON_ENABLED) {
 		ath11k_control_beaconing(arvif, info);
 
+		if (arvif->is_up && vif->bss_conf.he_support &&
+		    vif->bss_conf.he_oper.params) {
+			param_id = WMI_VDEV_PARAM_HEOPS_0_31;
+			param_value = vif->bss_conf.he_oper.params;
+			ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
+							    param_id, param_value);
+			ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
+				   "he oper param: %x set for VDEV: %d\n",
+				   param_value, arvif->vdev_id);
+
+			if (ret)
+				ath11k_warn(ar->ab, "Failed to set he oper params %x for VDEV %d: %i\n",
+					    param_value, arvif->vdev_id, ret);
+		}
+	}
+
 	if (changed & BSS_CHANGED_ERP_CTS_PROT) {
 		u32 cts_prot;
 
-- 
2.17.1


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

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

* [PATCH 4/4] ath11k: mesh: add support for 256 bitmap in blockack frames in 11ax
  2020-10-09  2:18 [PATCH 0/4] ath11k: add support for 256 bitmap in Block ack and duration based RTS threshold Pradeep Kumar Chitrapu
                   ` (2 preceding siblings ...)
  2020-10-09  2:18 ` [PATCH 3/4] ath11k: support TXOP duration based RTS threshold Pradeep Kumar Chitrapu
@ 2020-10-09  2:18 ` Pradeep Kumar Chitrapu
  3 siblings, 0 replies; 7+ messages in thread
From: Pradeep Kumar Chitrapu @ 2020-10-09  2:18 UTC (permalink / raw)
  To: Johannes Berg, ath11k; +Cc: Pradeep Kumar Chitrapu, linux-wireless

Currently 256 bitmap in blockack frames is being set only for AP mode.
Fix this to set whenever beacon has changed and has HE capability there
by supporting mesh as well.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/mac.c | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 77d073054ba2..7e8a4dfe49a9 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -1904,20 +1904,6 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
 		if (ret)
 			ath11k_warn(ar->ab, "failed to update bcn template: %d\n",
 				    ret);
-
-		if (vif->bss_conf.he_support) {
-			ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
-							    WMI_VDEV_PARAM_BA_MODE,
-							    WMI_BA_MODE_BUFFER_SIZE_256);
-			if (ret)
-				ath11k_warn(ar->ab,
-					    "failed to set BA BUFFER SIZE 256 for vdev: %d\n",
-					    arvif->vdev_id);
-			else
-				ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
-					   "Set BA BUFFER SIZE 256 for VDEV: %d\n",
-					   arvif->vdev_id);
-		}
 	}
 
 	if (changed & (BSS_CHANGED_BEACON_INFO | BSS_CHANGED_BEACON)) {
@@ -1953,6 +1939,14 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
 
 		if (arvif->is_up && vif->bss_conf.he_support &&
 		    vif->bss_conf.he_oper.params) {
+			ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
+							    WMI_VDEV_PARAM_BA_MODE,
+							    WMI_BA_MODE_BUFFER_SIZE_256);
+			if (ret)
+				ath11k_warn(ar->ab,
+					    "failed to set BA BUFFER SIZE 256 for vdev: %d\n",
+					    arvif->vdev_id);
+
 			param_id = WMI_VDEV_PARAM_HEOPS_0_31;
 			param_value = vif->bss_conf.he_oper.params;
 			ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
-- 
2.17.1


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

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

* Re: [PATCH 1/4] mac80211: save HE oper info in BSS config for mesh
  2020-10-09  2:18 ` [PATCH 1/4] mac80211: save HE oper info in BSS config for mesh Pradeep Kumar Chitrapu
@ 2020-10-19 20:29   ` Peter Oh
  2020-10-20 15:34     ` Pradeep Kumar Chitrapu
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Oh @ 2020-10-19 20:29 UTC (permalink / raw)
  To: Pradeep Kumar Chitrapu, Johannes Berg, ath11k; +Cc: linux-wireless


> +static void
> +ieee80211_mesh_update_bss_params(struct ieee80211_sub_if_data *sdata,
> +				 u8 *ie, u8 ie_len)
> +{
> +	struct ieee80211_supported_band *sband;
> +	const u8 *cap;
> +	const struct ieee80211_he_operation *he_oper = NULL;
> +
> +	sband = ieee80211_get_sband(sdata);
> +	if (!sband)
> +		return;
> +
> +	if (ieee80211_get_he_iftype_cap(sband, NL80211_IFTYPE_MESH_POINT) &&
> +	    !(sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT ||
> +	    sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 ||
> +	    sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10))
> +		return;

Are you update BSS only for sub-20Mhz?

Shouldn't you remove "!" for 20~160Mhz?


Thanks,

Peter


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

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

* Re: [PATCH 1/4] mac80211: save HE oper info in BSS config for mesh
  2020-10-19 20:29   ` Peter Oh
@ 2020-10-20 15:34     ` Pradeep Kumar Chitrapu
  0 siblings, 0 replies; 7+ messages in thread
From: Pradeep Kumar Chitrapu @ 2020-10-20 15:34 UTC (permalink / raw)
  To: Peter Oh; +Cc: Johannes Berg, linux-wireless, ath11k


>> +	if (ieee80211_get_he_iftype_cap(sband, NL80211_IFTYPE_MESH_POINT) &&
>> +	    !(sdata->vif.bss_conf.chandef.width == 
>> NL80211_CHAN_WIDTH_20_NOHT ||
>> +	    sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 ||
>> +	    sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10))
>> +		return;
> 
> Are you update BSS only for sub-20Mhz?
> 
> Shouldn't you remove "!" for 20~160Mhz?
> 
> 
> Thanks,
> 
> Peter
Thanks Peter for the review..Might have been a typo and I missed it..
I will fix this and submit next revision.

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

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

end of thread, other threads:[~2020-10-20 15:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09  2:18 [PATCH 0/4] ath11k: add support for 256 bitmap in Block ack and duration based RTS threshold Pradeep Kumar Chitrapu
2020-10-09  2:18 ` [PATCH 1/4] mac80211: save HE oper info in BSS config for mesh Pradeep Kumar Chitrapu
2020-10-19 20:29   ` Peter Oh
2020-10-20 15:34     ` Pradeep Kumar Chitrapu
2020-10-09  2:18 ` [PATCH 2/4] ath11k: fix incorrect wmi param for configuring HE operation Pradeep Kumar Chitrapu
2020-10-09  2:18 ` [PATCH 3/4] ath11k: support TXOP duration based RTS threshold Pradeep Kumar Chitrapu
2020-10-09  2:18 ` [PATCH 4/4] ath11k: mesh: add support for 256 bitmap in blockack frames in 11ax Pradeep Kumar Chitrapu

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).