Commit 63b89662 authored by James Prestwood's avatar James Prestwood Committed by Kalle Valo

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: default avatarJames Prestwood <prestwoj@gmail.com>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20231116173246.40458-1-prestwoj@gmail.com
parent c8a5f34a
...@@ -101,6 +101,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -101,6 +101,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA988X_HW_2_0_VERSION, .id = QCA988X_HW_2_0_VERSION,
...@@ -141,6 +142,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -141,6 +142,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA9887_HW_1_0_VERSION, .id = QCA9887_HW_1_0_VERSION,
...@@ -182,6 +184,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -182,6 +184,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA6174_HW_3_2_VERSION, .id = QCA6174_HW_3_2_VERSION,
...@@ -218,6 +221,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -218,6 +221,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA6174_HW_2_1_VERSION, .id = QCA6174_HW_2_1_VERSION,
...@@ -258,6 +262,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -258,6 +262,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA6174_HW_2_1_VERSION, .id = QCA6174_HW_2_1_VERSION,
...@@ -298,6 +303,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -298,6 +303,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA6174_HW_3_0_VERSION, .id = QCA6174_HW_3_0_VERSION,
...@@ -338,6 +344,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -338,6 +344,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA6174_HW_3_2_VERSION, .id = QCA6174_HW_3_2_VERSION,
...@@ -382,6 +389,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -382,6 +389,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = true,
}, },
{ {
.id = QCA99X0_HW_2_0_DEV_VERSION, .id = QCA99X0_HW_2_0_DEV_VERSION,
...@@ -428,6 +436,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -428,6 +436,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA9984_HW_1_0_DEV_VERSION, .id = QCA9984_HW_1_0_DEV_VERSION,
...@@ -481,6 +490,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -481,6 +490,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA9888_HW_2_0_DEV_VERSION, .id = QCA9888_HW_2_0_DEV_VERSION,
...@@ -531,6 +541,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -531,6 +541,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA9377_HW_1_0_DEV_VERSION, .id = QCA9377_HW_1_0_DEV_VERSION,
...@@ -571,6 +582,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -571,6 +582,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA9377_HW_1_1_DEV_VERSION, .id = QCA9377_HW_1_1_DEV_VERSION,
...@@ -613,6 +625,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -613,6 +625,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA9377_HW_1_1_DEV_VERSION, .id = QCA9377_HW_1_1_DEV_VERSION,
...@@ -646,6 +659,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -646,6 +659,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = QCA4019_HW_1_0_DEV_VERSION, .id = QCA4019_HW_1_0_DEV_VERSION,
...@@ -693,6 +707,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -693,6 +707,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = false, .hw_restart_disconnect = false,
.use_fw_tx_credits = true, .use_fw_tx_credits = true,
.delay_unmap_buffer = false, .delay_unmap_buffer = false,
.mcast_frame_registration = false,
}, },
{ {
.id = WCN3990_HW_1_0_DEV_VERSION, .id = WCN3990_HW_1_0_DEV_VERSION,
...@@ -726,6 +741,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { ...@@ -726,6 +741,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.hw_restart_disconnect = true, .hw_restart_disconnect = true,
.use_fw_tx_credits = false, .use_fw_tx_credits = false,
.delay_unmap_buffer = true, .delay_unmap_buffer = true,
.mcast_frame_registration = false,
}, },
}; };
......
...@@ -640,6 +640,9 @@ struct ath10k_hw_params { ...@@ -640,6 +640,9 @@ struct ath10k_hw_params {
bool use_fw_tx_credits; bool use_fw_tx_credits;
bool delay_unmap_buffer; bool delay_unmap_buffer;
/* The hardware support multicast frame registrations */
bool mcast_frame_registration;
}; };
struct htt_resp; struct htt_resp;
......
...@@ -1243,7 +1243,7 @@ static bool ath10k_mac_monitor_vdev_is_needed(struct ath10k *ar) ...@@ -1243,7 +1243,7 @@ static bool ath10k_mac_monitor_vdev_is_needed(struct ath10k *ar)
return ar->monitor || return ar->monitor ||
(!test_bit(ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST, (!test_bit(ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST,
ar->running_fw->fw_file.fw_features) && 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); test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags);
} }
...@@ -6026,10 +6026,15 @@ static void ath10k_configure_filter(struct ieee80211_hw *hw, ...@@ -6026,10 +6026,15 @@ static void ath10k_configure_filter(struct ieee80211_hw *hw,
{ {
struct ath10k *ar = hw->priv; struct ath10k *ar = hw->priv;
int ret; int ret;
unsigned int supported = SUPPORTED_FILTERS;
mutex_lock(&ar->conf_mutex); mutex_lock(&ar->conf_mutex);
*total_flags &= SUPPORTED_FILTERS; if (ar->hw_params.mcast_frame_registration)
supported |= FIF_MCAST_ACTION;
*total_flags &= supported;
ar->filter_flags = *total_flags; ar->filter_flags = *total_flags;
ret = ath10k_monitor_recalc(ar); ret = ath10k_monitor_recalc(ar);
...@@ -10118,6 +10123,10 @@ int ath10k_mac_register(struct ath10k *ar) ...@@ -10118,6 +10123,10 @@ int ath10k_mac_register(struct ath10k *ar)
NL80211_EXT_FEATURE_SET_SCAN_DWELL); NL80211_EXT_FEATURE_SET_SCAN_DWELL);
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_AQL); 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) || 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)) test_bit(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, ar->wmi.svc_map))
wiphy_ext_feature_set(ar->hw->wiphy, wiphy_ext_feature_set(ar->hw->wiphy,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment