Commit de50140b authored by Johannes Berg's avatar Johannes Berg

wifi: iwlwifi: separate AP link management queues

The link management queues associated with the broadcast stations
were forgotten and so the same queue was used with both broadcast
stations. This leads to lost frames and warnings on cleanup and
HW restart.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230329100040.0671fa976832.Id5aa9856fd5984e447f247e6d0c3979d9794a21a@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 8ca86d61
......@@ -181,7 +181,7 @@ int iwl_mvm_mld_add_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
if (vif->type == NL80211_IFTYPE_AP ||
vif->type == NL80211_IFTYPE_ADHOC) {
queue = &mvm->probe_queue;
queue = &mvm_link->mgmt_queue;
} else if (vif->type == NL80211_IFTYPE_P2P_DEVICE) {
queue = &mvm->p2p_dev_queue;
} else {
......@@ -327,7 +327,7 @@ int iwl_mvm_mld_rm_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
switch (vif->type) {
case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_ADHOC:
queueptr = &mvm->probe_queue;
queueptr = &link->mgmt_queue;
break;
case NL80211_IFTYPE_P2P_DEVICE:
queueptr = &mvm->p2p_dev_queue;
......
......@@ -299,6 +299,7 @@ struct iwl_probe_resp_data {
* data to be inserted into probe response.
* @he_ru_2mhz_block: 26-tone RU OFDMA transmissions should be blocked
* @queue_params: QoS params for this MAC
* @mgmt_queue: queue number for unbufferable management frames
*/
struct iwl_mvm_vif_link_info {
u8 bssid[ETH_ALEN];
......@@ -329,6 +330,8 @@ struct iwl_mvm_vif_link_info {
* to have the data for the MAC context
*/
struct ieee80211_tx_queue_params queue_params[IEEE80211_NUM_ACS];
u16 mgmt_queue;
};
/**
......
......@@ -2348,11 +2348,19 @@ int iwl_mvm_send_add_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
}
if (vif->type == NL80211_IFTYPE_AP ||
vif->type == NL80211_IFTYPE_ADHOC)
vif->type == NL80211_IFTYPE_ADHOC) {
/* for queue management */
mvm->probe_queue = queue;
else if (vif->type == NL80211_IFTYPE_P2P_DEVICE)
/* for use in TX */
mvmvif->deflink.mgmt_queue = queue;
} else if (vif->type == NL80211_IFTYPE_P2P_DEVICE) {
mvm->p2p_dev_queue = queue;
}
} else if (vif->type == NL80211_IFTYPE_AP ||
vif->type == NL80211_IFTYPE_ADHOC) {
/* set it for use in TX */
mvmvif->deflink.mgmt_queue = mvm->probe_queue;
}
return 0;
}
......@@ -2384,6 +2392,10 @@ void iwl_mvm_free_bcast_sta_queues(struct iwl_mvm *mvm,
queue = *queueptr;
iwl_mvm_disable_txq(mvm, NULL, mvmvif->deflink.bcast_sta.sta_id,
queueptr, IWL_MAX_TID_COUNT);
if (vif->type == NL80211_IFTYPE_AP || vif->type == NL80211_IFTYPE_ADHOC)
mvmvif->deflink.mgmt_queue = mvm->probe_queue;
if (iwl_mvm_has_new_tx_api(mvm))
return;
......
......@@ -626,7 +626,7 @@ static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,
if (ieee80211_is_mgmt(fc) &&
(!ieee80211_is_bufferable_mmpdu(fc) ||
ieee80211_is_deauth(fc) || ieee80211_is_disassoc(fc)))
return mvm->probe_queue;
return link->mgmt_queue;
if (!ieee80211_has_order(fc) && !ieee80211_is_probe_req(fc) &&
is_multicast_ether_addr(hdr->addr1))
......@@ -634,7 +634,7 @@ static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,
WARN_ONCE(info->control.vif->type != NL80211_IFTYPE_ADHOC,
"fc=0x%02x", le16_to_cpu(fc));
return mvm->probe_queue;
return link->mgmt_queue;
case NL80211_IFTYPE_P2P_DEVICE:
if (ieee80211_is_mgmt(fc))
return mvm->p2p_dev_queue;
......
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