Skip to content

Commit 63b8966

Browse files
jprestwokvalo
authored andcommitted
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- Signed-off-by: James Prestwood <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c8a5f34 commit 63b8966

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

drivers/net/wireless/ath/ath10k/core.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
101101
.hw_restart_disconnect = false,
102102
.use_fw_tx_credits = true,
103103
.delay_unmap_buffer = false,
104+
.mcast_frame_registration = false,
104105
},
105106
{
106107
.id = QCA988X_HW_2_0_VERSION,
@@ -141,6 +142,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
141142
.hw_restart_disconnect = false,
142143
.use_fw_tx_credits = true,
143144
.delay_unmap_buffer = false,
145+
.mcast_frame_registration = false,
144146
},
145147
{
146148
.id = QCA9887_HW_1_0_VERSION,
@@ -182,6 +184,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
182184
.hw_restart_disconnect = false,
183185
.use_fw_tx_credits = true,
184186
.delay_unmap_buffer = false,
187+
.mcast_frame_registration = false,
185188
},
186189
{
187190
.id = QCA6174_HW_3_2_VERSION,
@@ -218,6 +221,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
218221
.hw_restart_disconnect = false,
219222
.use_fw_tx_credits = true,
220223
.delay_unmap_buffer = false,
224+
.mcast_frame_registration = false,
221225
},
222226
{
223227
.id = QCA6174_HW_2_1_VERSION,
@@ -258,6 +262,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
258262
.hw_restart_disconnect = false,
259263
.use_fw_tx_credits = true,
260264
.delay_unmap_buffer = false,
265+
.mcast_frame_registration = false,
261266
},
262267
{
263268
.id = QCA6174_HW_2_1_VERSION,
@@ -298,6 +303,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
298303
.hw_restart_disconnect = false,
299304
.use_fw_tx_credits = true,
300305
.delay_unmap_buffer = false,
306+
.mcast_frame_registration = false,
301307
},
302308
{
303309
.id = QCA6174_HW_3_0_VERSION,
@@ -338,6 +344,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
338344
.hw_restart_disconnect = false,
339345
.use_fw_tx_credits = true,
340346
.delay_unmap_buffer = false,
347+
.mcast_frame_registration = false,
341348
},
342349
{
343350
.id = QCA6174_HW_3_2_VERSION,
@@ -382,6 +389,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
382389
.hw_restart_disconnect = false,
383390
.use_fw_tx_credits = true,
384391
.delay_unmap_buffer = false,
392+
.mcast_frame_registration = true,
385393
},
386394
{
387395
.id = QCA99X0_HW_2_0_DEV_VERSION,
@@ -428,6 +436,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
428436
.hw_restart_disconnect = false,
429437
.use_fw_tx_credits = true,
430438
.delay_unmap_buffer = false,
439+
.mcast_frame_registration = false,
431440
},
432441
{
433442
.id = QCA9984_HW_1_0_DEV_VERSION,
@@ -481,6 +490,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
481490
.hw_restart_disconnect = false,
482491
.use_fw_tx_credits = true,
483492
.delay_unmap_buffer = false,
493+
.mcast_frame_registration = false,
484494
},
485495
{
486496
.id = QCA9888_HW_2_0_DEV_VERSION,
@@ -531,6 +541,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
531541
.hw_restart_disconnect = false,
532542
.use_fw_tx_credits = true,
533543
.delay_unmap_buffer = false,
544+
.mcast_frame_registration = false,
534545
},
535546
{
536547
.id = QCA9377_HW_1_0_DEV_VERSION,
@@ -571,6 +582,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
571582
.hw_restart_disconnect = false,
572583
.use_fw_tx_credits = true,
573584
.delay_unmap_buffer = false,
585+
.mcast_frame_registration = false,
574586
},
575587
{
576588
.id = QCA9377_HW_1_1_DEV_VERSION,
@@ -613,6 +625,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
613625
.hw_restart_disconnect = false,
614626
.use_fw_tx_credits = true,
615627
.delay_unmap_buffer = false,
628+
.mcast_frame_registration = false,
616629
},
617630
{
618631
.id = QCA9377_HW_1_1_DEV_VERSION,
@@ -646,6 +659,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
646659
.hw_restart_disconnect = false,
647660
.use_fw_tx_credits = true,
648661
.delay_unmap_buffer = false,
662+
.mcast_frame_registration = false,
649663
},
650664
{
651665
.id = QCA4019_HW_1_0_DEV_VERSION,
@@ -693,6 +707,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
693707
.hw_restart_disconnect = false,
694708
.use_fw_tx_credits = true,
695709
.delay_unmap_buffer = false,
710+
.mcast_frame_registration = false,
696711
},
697712
{
698713
.id = WCN3990_HW_1_0_DEV_VERSION,
@@ -726,6 +741,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
726741
.hw_restart_disconnect = true,
727742
.use_fw_tx_credits = false,
728743
.delay_unmap_buffer = true,
744+
.mcast_frame_registration = false,
729745
},
730746
};
731747

drivers/net/wireless/ath/ath10k/hw.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,9 @@ struct ath10k_hw_params {
640640
bool use_fw_tx_credits;
641641

642642
bool delay_unmap_buffer;
643+
644+
/* The hardware support multicast frame registrations */
645+
bool mcast_frame_registration;
643646
};
644647

645648
struct htt_resp;

drivers/net/wireless/ath/ath10k/mac.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ static bool ath10k_mac_monitor_vdev_is_needed(struct ath10k *ar)
12431243
return ar->monitor ||
12441244
(!test_bit(ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST,
12451245
ar->running_fw->fw_file.fw_features) &&
1246-
(ar->filter_flags & FIF_OTHER_BSS)) ||
1246+
(ar->filter_flags & (FIF_OTHER_BSS | FIF_MCAST_ACTION))) ||
12471247
test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags);
12481248
}
12491249

@@ -6026,10 +6026,15 @@ static void ath10k_configure_filter(struct ieee80211_hw *hw,
60266026
{
60276027
struct ath10k *ar = hw->priv;
60286028
int ret;
6029+
unsigned int supported = SUPPORTED_FILTERS;
60296030

60306031
mutex_lock(&ar->conf_mutex);
60316032

6032-
*total_flags &= SUPPORTED_FILTERS;
6033+
if (ar->hw_params.mcast_frame_registration)
6034+
supported |= FIF_MCAST_ACTION;
6035+
6036+
*total_flags &= supported;
6037+
60336038
ar->filter_flags = *total_flags;
60346039

60356040
ret = ath10k_monitor_recalc(ar);
@@ -10118,6 +10123,10 @@ int ath10k_mac_register(struct ath10k *ar)
1011810123
NL80211_EXT_FEATURE_SET_SCAN_DWELL);
1011910124
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_AQL);
1012010125

10126+
if (ar->hw_params.mcast_frame_registration)
10127+
wiphy_ext_feature_set(ar->hw->wiphy,
10128+
NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS);
10129+
1012110130
if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map) ||
1012210131
test_bit(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, ar->wmi.svc_map))
1012310132
wiphy_ext_feature_set(ar->hw->wiphy,

0 commit comments

Comments
 (0)