Skip to contentSkip to conversation

wifi: ath10k: add support to allow broadcast action frame RX

PATCH In review James Prestwood 3 participants 7 messages Nov 16, 2023 – Dec 7, 2023 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 wifi: ath10k: add support to allow broadcast action frame RX

Broadcast action frames are needed for the Device Provisioning Protocol (DPP) for Presence and PKEX Exchange requests. Currently just ath9k has this capability so this is being enabled for ath10k (for at least one hardware variant).

Add a new capability flag in ath10k_hw_params to indicate support for receiving multicast action frames. This bit is then checked when configuring the RX filter and (if set) multicast action frame registration is enabled.

Until more hardware can be tested only the "qca6174 hw3.2" variant is enabling this feature.

Note: I went ahead and removed the 'changed_flags' mask operation since it had no effect, that parameter was not being used anywhere.

Tested-on: QCA6174 hw3.2 WLAN.RM.4.4.1-00288-

---
 drivers/net/wireless/ath/ath10k/core.c |  1 +
 drivers/net/wireless/ath/ath10k/hw.h   |  3 +++
 drivers/net/wireless/ath/ath10k/mac.c  | 14 +++++++++++---
 3 files changed, 15 insertions(+), 3 deletions(-)

v2:
* Add flag in ath10k_hw_params and only set FIF_MCAST_ACTION if that hardware allows it.

drivers/net/wireless/ath/ath10k/core.c +1 -0
index 5eb131ab916f..f2077756ffdf 100644
@@ -381,6 +381,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 		.hw_restart_disconnect = false,
 		.use_fw_tx_credits = true,
 		.delay_unmap_buffer = false,
+		.mcast_frame_registration = true,
 	},
 	{
 		.id = QCA99X0_HW_2_0_DEV_VERSION,
drivers/net/wireless/ath/ath10k/hw.h +3 -0
index 9643031a4427..2aeb52c7f189 100644
@@ -639,6 +639,9 @@ struct ath10k_hw_params {
 	bool use_fw_tx_credits;
 
 	bool delay_unmap_buffer;
+
+	/* The hardware support multicast frame registrations */
+	bool mcast_frame_registration;
 };
 
 struct htt_resp;
drivers/net/wireless/ath/ath10k/mac.c +11 -3
index ec8d5b29bc72..0d0de3646d31 100644
@@ -1249,7 +1249,7 @@ static bool ath10k_mac_monitor_vdev_is_needed(struct ath10k *ar)
 	return ar->monitor ||
 	       (!test_bit(ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST,
 			  ar->running_fw->fw_file.fw_features) &&
-		(ar->filter_flags & FIF_OTHER_BSS)) ||
+		(ar->filter_flags & (FIF_OTHER_BSS | FIF_MCAST_ACTION))) ||
 	       test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags);
 }
 
@@ -6027,11 +6027,15 @@ static void ath10k_configure_filter(struct ieee80211_hw *hw,
 {
 	struct ath10k *ar = hw->priv;
 	int ret;
+	unsigned int supported = SUPPORTED_FILTERS;
 
 	mutex_lock(&ar->conf_mutex);
 
-	changed_flags &= SUPPORTED_FILTERS;
-	*total_flags &= SUPPORTED_FILTERS;
+	if (ar->hw_params.mcast_frame_registration)
+		supported |= FIF_MCAST_ACTION;
+
+	*total_flags &= supported;
+
 	ar->filter_flags = *total_flags;
 
 	ret = ath10k_monitor_recalc(ar);
@@ -10114,6 +10118,10 @@ int ath10k_mac_register(struct ath10k *ar)
 			      NL80211_EXT_FEATURE_SET_SCAN_DWELL);
 	wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_AQL);
 
+	if (ar->hw_params.mcast_frame_registration)
+		wiphy_ext_feature_set(ar->hw->wiphy,
+				      NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS);
+
 	if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map) ||
 	    test_bit(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, ar->wmi.svc_map))
 		wiphy_ext_feature_set(ar->hw->wiphy,
Signature · 1 line
2.34.1
#1 lore raw
Quoted 87 lines · James Prestwood

Broadcast action frames are needed for the Device Provisioning Protocol (DPP) for Presence and PKEX Exchange requests. Currently just ath9k has this capability so this is being enabled for ath10k (for at least one hardware variant).

Add a new capability flag in ath10k_hw_params to indicate support for receiving multicast action frames. This bit is then checked when configuring the RX filter and (if set) multicast action frame registration is enabled.

Until more hardware can be tested only the "qca6174 hw3.2" variant is enabling this feature.

Note: I went ahead and removed the 'changed_flags' mask operation since it had no effect, that parameter was not being used anywhere.

Tested-on: QCA6174 hw3.2 WLAN.RM.4.4.1-00288-

---
 drivers/net/wireless/ath/ath10k/core.c |  1 +
 drivers/net/wireless/ath/ath10k/hw.h   |  3 +++
 drivers/net/wireless/ath/ath10k/mac.c  | 14 +++++++++++---
 3 files changed, 15 insertions(+), 3 deletions(-)

v2:
* Add flag in ath10k_hw_params and only set FIF_MCAST_ACTION if that hardware allows it.

drivers/net/wireless/ath/ath10k/core.c +1 -0
index 5eb131ab916f..f2077756ffdf 100644
@@ -381,6 +381,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 		.hw_restart_disconnect = false,
 		.use_fw_tx_credits = true,
 		.delay_unmap_buffer = false,
+		.mcast_frame_registration = true,
 	},
 	{
 		.id = QCA99X0_HW_2_0_DEV_VERSION,
drivers/net/wireless/ath/ath10k/hw.h +3 -0
index 9643031a4427..2aeb52c7f189 100644
@@ -639,6 +639,9 @@ struct ath10k_hw_params {
 	bool use_fw_tx_credits;
 
 	bool delay_unmap_buffer;
+
+	/* The hardware support multicast frame registrations */
+	bool mcast_frame_registration;
 };
 
 struct htt_resp;
drivers/net/wireless/ath/ath10k/mac.c +7 -3
index ec8d5b29bc72..0d0de3646d31 100644
@@ -1249,7 +1249,7 @@ static bool ath10k_mac_monitor_vdev_is_needed(struct ath10k *ar)
 	return ar->monitor ||
 	       (!test_bit(ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST,
 			  ar->running_fw->fw_file.fw_features) &&
-		(ar->filter_flags & FIF_OTHER_BSS)) ||
+		(ar->filter_flags & (FIF_OTHER_BSS | FIF_MCAST_ACTION))) ||
 	       test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags);
 }
 
@@ -6027,11 +6027,15 @@ static void ath10k_configure_filter(struct ieee80211_hw *hw,
 {
 	struct ath10k *ar = hw->priv;
 	int ret;
+	unsigned int supported = SUPPORTED_FILTERS;
 
 	mutex_lock(&ar->conf_mutex);
 
-	changed_flags &= SUPPORTED_FILTERS;
-	*total_flags &= SUPPORTED_FILTERS;
+	if (ar->hw_params.mcast_frame_registration)
+		supported |= FIF_MCAST_ACTION;
+
+	*total_flags &= supported;
+
 	ar->filter_flags = *total_flags;
 
 	ret = ath10k_monitor_recalc(ar);

drivers/net/wireless/ath/ath10k/mac.c int ath10k_mac_register(struct ath10k *ar) · line 10127

Quoted 10 lines
drivers/net/wireless/ath/ath10k/mac.c +4 -0
@@ -10114,6 +10118,10 @@ int ath10k_mac_register(struct ath10k *ar)
 			      NL80211_EXT_FEATURE_SET_SCAN_DWELL);
 	wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_AQL);
 
+	if (ar->hw_params.mcast_frame_registration)
+		wiphy_ext_feature_set(ar->hw->wiphy,
+				      NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS);
+
 	if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map) ||
 	    test_bit(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, ar->wmi.svc_map))
 		wiphy_ext_feature_set(ar->hw->wiphy,

+ath10k mailing list for visibility

(note I scan ath10/11/12k mailing lists constantly but due to the volume only scan linux-wireless every few days)

#2 lore raw
In reply to James Prestwood
Quoted 87 lines · James Prestwood

Broadcast action frames are needed for the Device Provisioning Protocol (DPP) for Presence and PKEX Exchange requests. Currently just ath9k has this capability so this is being enabled for ath10k (for at least one hardware variant).

Add a new capability flag in ath10k_hw_params to indicate support for receiving multicast action frames. This bit is then checked when configuring the RX filter and (if set) multicast action frame registration is enabled.

Until more hardware can be tested only the "qca6174 hw3.2" variant is enabling this feature.

Note: I went ahead and removed the 'changed_flags' mask operation since it had no effect, that parameter was not being used anywhere.

Tested-on: QCA6174 hw3.2 WLAN.RM.4.4.1-00288-

---
 drivers/net/wireless/ath/ath10k/core.c |  1 +
 drivers/net/wireless/ath/ath10k/hw.h   |  3 +++
 drivers/net/wireless/ath/ath10k/mac.c  | 14 +++++++++++---
 3 files changed, 15 insertions(+), 3 deletions(-)

v2:
* Add flag in ath10k_hw_params and only set FIF_MCAST_ACTION if that hardware allows it.

drivers/net/wireless/ath/ath10k/core.c +1 -0
index 5eb131ab916f..f2077756ffdf 100644
@@ -381,6 +381,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 		.hw_restart_disconnect = false,
 		.use_fw_tx_credits = true,
 		.delay_unmap_buffer = false,
+		.mcast_frame_registration = true,
 	},
 	{
 		.id = QCA99X0_HW_2_0_DEV_VERSION,
drivers/net/wireless/ath/ath10k/hw.h +3 -0
index 9643031a4427..2aeb52c7f189 100644
@@ -639,6 +639,9 @@ struct ath10k_hw_params {
 	bool use_fw_tx_credits;
 
 	bool delay_unmap_buffer;
+
+	/* The hardware support multicast frame registrations */
+	bool mcast_frame_registration;
 };
 
 struct htt_resp;
drivers/net/wireless/ath/ath10k/mac.c +7 -3
index ec8d5b29bc72..0d0de3646d31 100644
@@ -1249,7 +1249,7 @@ static bool ath10k_mac_monitor_vdev_is_needed(struct ath10k *ar)
 	return ar->monitor ||
 	       (!test_bit(ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST,
 			  ar->running_fw->fw_file.fw_features) &&
-		(ar->filter_flags & FIF_OTHER_BSS)) ||
+		(ar->filter_flags & (FIF_OTHER_BSS | FIF_MCAST_ACTION))) ||
 	       test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags);
 }
 
@@ -6027,11 +6027,15 @@ static void ath10k_configure_filter(struct ieee80211_hw *hw,
 {
 	struct ath10k *ar = hw->priv;
 	int ret;
+	unsigned int supported = SUPPORTED_FILTERS;
 
 	mutex_lock(&ar->conf_mutex);
 
-	changed_flags &= SUPPORTED_FILTERS;
-	*total_flags &= SUPPORTED_FILTERS;
+	if (ar->hw_params.mcast_frame_registration)
+		supported |= FIF_MCAST_ACTION;
+
+	*total_flags &= supported;
+
 	ar->filter_flags = *total_flags;
 
 	ret = ath10k_monitor_recalc(ar);

drivers/net/wireless/ath/ath10k/mac.c int ath10k_mac_register(struct ath10k *ar) · line 10127

Quoted 10 lines
drivers/net/wireless/ath/ath10k/mac.c +4 -0
@@ -10114,6 +10118,10 @@ int ath10k_mac_register(struct ath10k *ar)
 			      NL80211_EXT_FEATURE_SET_SCAN_DWELL);
 	wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_AQL);
 
+	if (ar->hw_params.mcast_frame_registration)
+		wiphy_ext_feature_set(ar->hw->wiphy,
+				      NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS);
+
 	if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map) ||
 	    test_bit(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, ar->wmi.svc_map))
 		wiphy_ext_feature_set(ar->hw->wiphy,

Actually add the ath10k list this time. Sigh.

#3 lore raw
Quoted 21 lines · Jeff Johnson
Quoted 19 lines · James Prestwood

Broadcast action frames are needed for the Device Provisioning Protocol (DPP) for Presence and PKEX Exchange requests. Currently just ath9k has this capability so this is being enabled for ath10k (for at least one hardware variant).

Add a new capability flag in ath10k_hw_params to indicate support for receiving multicast action frames. This bit is then checked when configuring the RX filter and (if set) multicast action frame registration is enabled.

Until more hardware can be tested only the "qca6174 hw3.2" variant is enabling this feature.

Note: I went ahead and removed the 'changed_flags' mask operation since it had no effect, that parameter was not being used anywhere.

Tested-on: QCA6174 hw3.2 WLAN.RM.4.4.1-00288-

[...]

Quoted 7 lines

drivers/net/wireless/ath/ath10k/core.c static const struct ath10k_hw_params ath10k_hw_params_list[] = { · line 384

Quoted 7 lines
drivers/net/wireless/ath/ath10k/core.c +1 -0
@@ -381,6 +381,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 		.hw_restart_disconnect = false,
 		.use_fw_tx_credits = true,
 		.delay_unmap_buffer = false,
+		.mcast_frame_registration = true,

I forgot to mention that I prefer explicitly setting the false cases as well so I added those in the pending branch:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=51daeadfbecc13b2ce8a9a4b7697e4056cbb358f

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#4 lore raw
In reply to James Prestwood
Quoted 13 lines · James Prestwood

Broadcast action frames are needed for the Device Provisioning Protocol (DPP) for Presence and PKEX Exchange requests. Currently just ath9k has this capability so this is being enabled for ath10k (for at least one hardware variant).

Add a new capability flag in ath10k_hw_params to indicate support for receiving multicast action frames. This bit is then checked when configuring the RX filter and (if set) multicast action frame registration is enabled.

Until more hardware can be tested only the "qca6174 hw3.2" variant is enabling this feature.

Quoted 7 lines

Note: I went ahead and removed the 'changed_flags' mask operation since it had no effect, that parameter was not being used anywhere.

Tested-on: QCA6174 hw3.2 WLAN.RM.4.4.1-00288-

This had a simple conflict in ath10k_configure_filter() and I fixed it in the pending branch, please check:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=cc9f5dfd74f93ae6f596bccc3a5b92fe3f18c439

In the future please use ath.git master branch as the baseline for ath driver patches.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#5 lore raw

Hi Kalle,

Quoted 20 lines · Kalle Valo
Quoted 18 lines · James Prestwood

Broadcast action frames are needed for the Device Provisioning Protocol (DPP) for Presence and PKEX Exchange requests. Currently just ath9k has this capability so this is being enabled for ath10k (for at least one hardware variant).

Add a new capability flag in ath10k_hw_params to indicate support for receiving multicast action frames. This bit is then checked when configuring the RX filter and (if set) multicast action frame registration is enabled.

Until more hardware can be tested only the "qca6174 hw3.2" variant is enabling this feature.

Note: I went ahead and removed the 'changed_flags' mask operation since it had no effect, that parameter was not being used anywhere.

Tested-on: QCA6174 hw3.2 WLAN.RM.4.4.1-00288-

Quoted 8 lines
Quoted 2 lines

This had a simple conflict in ath10k_configure_filter() and I fixed it in the pending branch, please check:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=cc9f5dfd74f93ae6f596bccc3a5b92fe3f18c439

In the future please use ath.git master branch as the baseline for ath driver patches.

Thank you for resolving that, and I'll use ath.git in the future.

Thanks,

James

#6 lore raw
In reply to James Prestwood
Quoted 13 lines · James Prestwood

Broadcast action frames are needed for the Device Provisioning Protocol (DPP) for Presence and PKEX Exchange requests. Currently just ath9k has this capability so this is being enabled for ath10k (for at least one hardware variant).

Add a new capability flag in ath10k_hw_params to indicate support for receiving multicast action frames. This bit is then checked when configuring the RX filter and (if set) multicast action frame registration is enabled.

Until more hardware can be tested only the "qca6174 hw3.2" variant is enabling this feature.

Quoted 7 lines

Note: I went ahead and removed the 'changed_flags' mask operation since it had no effect, that parameter was not being used anywhere.

Tested-on: QCA6174 hw3.2 WLAN.RM.4.4.1-00288-

Patch applied to ath-next branch of ath.git, thanks.

63b896629353 wifi: ath10k: add support to allow broadcast action frame RX

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches