Patch "iwlwifi: mvm: cleanup pending frames in DQA mode" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iwlwifi: mvm: cleanup pending frames in DQA mode
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
iwlwifi-mvm-cleanup-pending-frames-in-dqa-mode.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Dec 18 14:12:34 CET 2017
From: Sara Sharon <[email protected]>
Date: Tue, 14 Mar 2017 09:50:35 +0200
Subject: iwlwifi: mvm: cleanup pending frames in DQA mode
From: Sara Sharon <[email protected]>
[ Upstream commit 9a3fcf912ef7f5c6e18f9af6875dd13f7311f7aa ]
When a station is asleep, the fw will set it as "asleep". All queues that are used only by one station will be stopped by the fw.
In pre-DQA mode this was relevant for aggregation queues. However, in DQA mode a queue is owned by one station only, so all queues will be stopped.
As a result, we don't expect to get filtered frames back to mac80211 and don't have to maintain the entire pending_frames state logic, the same way as we do in aggregations.
The correct behavior is to align DQA behavior with the aggregation queue behaviour pre-DQA:
- Don't count pending frames.
- Let mac80211 know we have frames in these queues so that it can properly handle trigger frames.
When a trigger frame is received, mac80211 tells the driver to send frames from the queues using release_buffered_frames. The driver will tell the fw to let frames out even if the station is asleep. This is done by iwl_mvm_sta_modify_sleep_tx_count.
--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 5 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 11 +++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 2 - drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 41 +++++++++------------- 4 files changed, 28 insertions(+), 31 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +3 -2
@@ -2320,7 +2320,7 @@ iwl_mvm_mac_release_buffered_frames(stru {struct iwl_mvm *mvm =IWL_MAC80211_GET_MVM (hw); -/* Called when we need to transmit (a) frame(s) from agg queue */ +/* Called when we need to transmit (a) frame(s) from agg or dqa queue */ iwl_mvm_sta_modify_sleep_tx_count (mvm, sta, reason, num_frames, tids, more_data, true);
@@ -2340,7 +2340,8 @@ static void iwl_mvm_mac_sta_notify(strucfor (tid =0 ; tid <IWL_MAX_TID_COUNT ; tid++) {struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; -if (tid_data->state !=IWL_AGG_ON && +if (!iwl_mvm_is_dqa_supported (mvm) && + tid_data->state !=IWL_AGG_ON && tid_data->state !=IWL_EMPTYING_HW_QUEUE_DELBA )continue ;
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +6 -5
@@ -3032,7 +3032,7 @@ void iwl_mvm_sta_modify_sleep_tx_count(sstruct ieee80211_sta *sta, enum ieee80211_frame_release_type reason, u16 cnt, u16 tids, bool more_data, - bool agg) + bool single_sta_queue) { struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); struct iwl_mvm_add_sta_cmd cmd = {
@@ -3052,14 +3052,14 @@ void iwl_mvm_sta_modify_sleep_tx_count(sfor_each_set_bit (tid, &_tids,IWL_MAX_TID_COUNT ) cmd.awake_acs |=BIT (tid_to_ucode_ac[tid]); -/* If we're releasing frames from aggregation queues then check if the -* all queues combined that we're releasing frames from have +/* If we're releasing frames from aggregation or dqa queues then check +* if all the queues that we're releasing frames from, combined, have: * - more frames than the service period, in which case more_data * needs to be set * - fewer than 'cnt' frames, in which case we need to adjust the * firmware command (but do that unconditionally) */ -if (agg) { +if (single_sta_queue) {int remaining = cnt;int sleep_tx_count;
@@ -3069,7 +3069,8 @@ void iwl_mvm_sta_modify_sleep_tx_count(su16 n_queued; tid_data = &mvmsta->tid_data[tid]; -if (WARN (tid_data->state !=IWL_AGG_ON && +if (WARN (!iwl_mvm_is_dqa_supported (mvm) && + tid_data->state !=IWL_AGG_ON && tid_data->state !=IWL_EMPTYING_HW_QUEUE_DELBA ,"TID %d state is %d\n" , tid, tid_data->state)) {
drivers/net/wireless/intel/iwlwifi/mvm/sta.h +1 -1
@@ -545,7 +545,7 @@ void iwl_mvm_sta_modify_sleep_tx_count(sstruct ieee80211_sta *sta, enum ieee80211_frame_release_type reason, u16 cnt, u16 tids, bool more_data, - bool agg); + bool single_sta_queue);int iwl_mvm_drain_sta (struct iwl_mvm *mvm,struct iwl_mvm_sta *mvmsta,bool drain); void iwl_mvm_sta_modify_disable_tx(struct iwl_mvm *mvm,
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +18 -23
101 lines not on this page · raw message
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/iwlwifi-mvm-cleanup-pending-frames-in-dqa-mode.patch