aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2014-04-22 06:33:29 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-05-06 16:32:45 -0400
commit9256c2051d39ac5a56685b70b8dfaf87be59cb28 (patch)
treed373ebaf2da5110d8802094a39ffbb69a4ed4f51
parent4d075007d60f871a1d8842809f92b0d23487173a (diff)
iwlwifi: mvm: wait for d0i3 exit in some more ampdu actions
Some ampdu actions change queues by direct target access. Since the bus is disabled in d0i3, make sure to exit d0i3 before handling these actions. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 97c3deae6552..db55d670dce0 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -539,13 +539,22 @@ static int iwl_mvm_mac_ampdu_action(struct ieee80211_hw *hw,
539 return -EACCES; 539 return -EACCES;
540 540
541 /* return from D0i3 before starting a new Tx aggregation */ 541 /* return from D0i3 before starting a new Tx aggregation */
542 if (action == IEEE80211_AMPDU_TX_START) { 542 switch (action) {
543 case IEEE80211_AMPDU_TX_START:
544 case IEEE80211_AMPDU_TX_STOP_CONT:
545 case IEEE80211_AMPDU_TX_STOP_FLUSH:
546 case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
547 case IEEE80211_AMPDU_TX_OPERATIONAL:
543 iwl_mvm_ref(mvm, IWL_MVM_REF_TX_AGG); 548 iwl_mvm_ref(mvm, IWL_MVM_REF_TX_AGG);
544 tx_agg_ref = true; 549 tx_agg_ref = true;
545 550
546 /* 551 /*
547 * wait synchronously until D0i3 exit to get the correct 552 * for tx start, wait synchronously until D0i3 exit to
548 * sequence number for the tid 553 * get the correct sequence number for the tid.
554 * additionally, some other ampdu actions use direct
555 * target access, which is not handled automatically
556 * by the trans layer (unlike commands), so wait for
557 * d0i3 exit in these cases as well.
549 */ 558 */
550 if (!wait_event_timeout(mvm->d0i3_exit_waitq, 559 if (!wait_event_timeout(mvm->d0i3_exit_waitq,
551 !test_bit(IWL_MVM_STATUS_IN_D0I3, &mvm->status), HZ)) { 560 !test_bit(IWL_MVM_STATUS_IN_D0I3, &mvm->status), HZ)) {
@@ -553,6 +562,9 @@ static int iwl_mvm_mac_ampdu_action(struct ieee80211_hw *hw,
553 iwl_mvm_unref(mvm, IWL_MVM_REF_TX_AGG); 562 iwl_mvm_unref(mvm, IWL_MVM_REF_TX_AGG);
554 return -EIO; 563 return -EIO;
555 } 564 }
565 break;
566 default:
567 break;
556 } 568 }
557 569
558 mutex_lock(&mvm->mutex); 570 mutex_lock(&mvm->mutex);