Skip to content

Commit 334167d

Browse files
egrumbachlucacoelho
authored andcommitted
iwlwifi: mvm: set the correct tid when we flush the MCAST sta
The tid being used for the queue (cab_queue) for the MCAST station has been changed recently to be 0 (for BE). The flush path still flushed only the special tid (15) which means that the firmware wasn't flushing the right queue and we could get a firmware crash upon remove station if we had an MCAST packet on the ring. The current code that flushes queues for a station only differentiates between internal stations (stations that aren't instantiated in mac80211, like the MCAST station) and the non-internal ones. Internal stations can be either: BCAST (beacons), MCAST (for cab_queue), GENERAL_PURPOSE (p2p dev, and sniffer injection). The internal stations can use different tids. To make the code simpler, just flush all the tids always and add the special internal tid (15) for internal stations. The firmware will know how to handle this even if we hadn't any queue mapped that that tid. Fixes: e340c1a6ef4b ("iwlwifi: mvm: Correctly set the tid for mcast queue") Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
1 parent 87de120 commit 334167d

File tree

1 file changed

+4
-6
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+4
-6
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/tx.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,14 +1894,12 @@ int iwl_mvm_flush_sta(struct iwl_mvm *mvm, void *sta, bool internal, u32 flags)
18941894
struct iwl_mvm_int_sta *int_sta = sta;
18951895
struct iwl_mvm_sta *mvm_sta = sta;
18961896

1897-
if (iwl_mvm_has_new_tx_api(mvm)) {
1898-
if (internal)
1899-
return iwl_mvm_flush_sta_tids(mvm, int_sta->sta_id,
1900-
BIT(IWL_MGMT_TID), flags);
1897+
BUILD_BUG_ON(offsetof(struct iwl_mvm_int_sta, sta_id) !=
1898+
offsetof(struct iwl_mvm_sta, sta_id));
19011899

1900+
if (iwl_mvm_has_new_tx_api(mvm))
19021901
return iwl_mvm_flush_sta_tids(mvm, mvm_sta->sta_id,
1903-
0xFF, flags);
1904-
}
1902+
0xff | BIT(IWL_MGMT_TID), flags);
19051903

19061904
if (internal)
19071905
return iwl_mvm_flush_tx_path(mvm, int_sta->tfd_queue_msk,

0 commit comments

Comments
 (0)