Skip to content

Commit bdc6c9f

Browse files
naerreragregkh
authored andcommitted
iwlwifi: mvm: test roc running status bits before removing the sta
[ Upstream commit 998e1ab ] In some cases the sta is being removed twice since we do not test the roc aux running before removing it. Start looking at the bit before removing the sta. Signed-off-by: Nathan Errera <nathan.errera@intel.com> Fixes: 2c2c364 ("iwlwifi: mvm: support ADD_STA_CMD_API_S ver 12") Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20211219121514.d5376ac6bcb0.Ic5f8470ea60c072bde9d1503e5f528b65e301e20@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a750fcd commit bdc6c9f

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

‎drivers/net/wireless/intel/iwlwifi/mvm/time-event.c‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,13 @@ void iwl_mvm_roc_done_wk(struct work_struct *wk)
9898
struct iwl_mvm *mvm = container_of(wk, struct iwl_mvm, roc_done_wk);
9999

100100
/*
101-
* Clear the ROC_RUNNING /ROC_AUX_RUNNING status bit.
101+
* Clear the ROC_RUNNING status bit.
102102
* This will cause the TX path to drop offchannel transmissions.
103103
* That would also be done by mac80211, but it is racy, in particular
104104
* in the case that the time event actually completed in the firmware
105105
* (which is handled in iwl_mvm_te_handle_notif).
106106
*/
107107
clear_bit(IWL_MVM_STATUS_ROC_RUNNING, &mvm->status);
108-
clear_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status);
109108

110109
synchronize_net();
111110

@@ -131,9 +130,19 @@ void iwl_mvm_roc_done_wk(struct work_struct *wk)
131130
mvmvif = iwl_mvm_vif_from_mac80211(mvm->p2p_device_vif);
132131
iwl_mvm_flush_sta(mvm, &mvmvif->bcast_sta, true);
133132
}
134-
} else {
133+
}
134+
135+
/*
136+
* Clear the ROC_AUX_RUNNING status bit.
137+
* This will cause the TX path to drop offchannel transmissions.
138+
* That would also be done by mac80211, but it is racy, in particular
139+
* in the case that the time event actually completed in the firmware
140+
* (which is handled in iwl_mvm_te_handle_notif).
141+
*/
142+
if (test_and_clear_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status)) {
135143
/* do the same in case of hot spot 2.0 */
136144
iwl_mvm_flush_sta(mvm, &mvm->aux_sta, true);
145+
137146
/* In newer version of this command an aux station is added only
138147
* in cases of dedicated tx queue and need to be removed in end
139148
* of use */

0 commit comments

Comments
 (0)