|
@@ -491,8 +491,18 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm,
|
|
|
|
|
|
if (vif->type == NL80211_IFTYPE_STATION &&
|
|
if (vif->type == NL80211_IFTYPE_STATION &&
|
|
mvmvif->ap_sta_id == mvm_sta->sta_id) {
|
|
mvmvif->ap_sta_id == mvm_sta->sta_id) {
|
|
|
|
+ ret = iwl_mvm_drain_sta(mvm, mvm_sta, true);
|
|
|
|
+ if (ret)
|
|
|
|
+ return ret;
|
|
/* flush its queues here since we are freeing mvm_sta */
|
|
/* flush its queues here since we are freeing mvm_sta */
|
|
ret = iwl_mvm_flush_tx_path(mvm, mvm_sta->tfd_queue_msk, true);
|
|
ret = iwl_mvm_flush_tx_path(mvm, mvm_sta->tfd_queue_msk, true);
|
|
|
|
+ if (ret)
|
|
|
|
+ return ret;
|
|
|
|
+ ret = iwl_trans_wait_tx_queue_empty(mvm->trans,
|
|
|
|
+ mvm_sta->tfd_queue_msk);
|
|
|
|
+ if (ret)
|
|
|
|
+ return ret;
|
|
|
|
+ ret = iwl_mvm_drain_sta(mvm, mvm_sta, false);
|
|
|
|
|
|
/* if we are associated - we can't remove the AP STA now */
|
|
/* if we are associated - we can't remove the AP STA now */
|
|
if (vif->bss_conf.assoc)
|
|
if (vif->bss_conf.assoc)
|
|
@@ -1120,8 +1130,12 @@ int iwl_mvm_sta_tx_agg_flush(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
|
spin_unlock_bh(&mvmsta->lock);
|
|
spin_unlock_bh(&mvmsta->lock);
|
|
|
|
|
|
if (old_state >= IWL_AGG_ON) {
|
|
if (old_state >= IWL_AGG_ON) {
|
|
|
|
+ iwl_mvm_drain_sta(mvm, mvmsta, true);
|
|
if (iwl_mvm_flush_tx_path(mvm, BIT(txq_id), true))
|
|
if (iwl_mvm_flush_tx_path(mvm, BIT(txq_id), true))
|
|
IWL_ERR(mvm, "Couldn't flush the AGG queue\n");
|
|
IWL_ERR(mvm, "Couldn't flush the AGG queue\n");
|
|
|
|
+ iwl_trans_wait_tx_queue_empty(mvm->trans,
|
|
|
|
+ mvmsta->tfd_queue_msk);
|
|
|
|
+ iwl_mvm_drain_sta(mvm, mvmsta, false);
|
|
|
|
|
|
iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false);
|
|
iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false);
|
|
|
|
|