diff options
author | Eytan Lifshitz <eytan.lifshitz@intel.com> | 2014-04-01 16:44:21 +0300 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-04-13 09:36:01 +0300 |
commit | 1b8ebbd3cd6c42f5f2d199a6369040cde0220dc7 (patch) | |
tree | 5e06f2da077a6f93623e850c68315081a9b2269e /drivers/net/wireless/iwlwifi/mvm/tt.c | |
parent | 19a04bddabe66edc7dff7aa121b614a202ccb9b8 (diff) | |
download | lwn-1b8ebbd3cd6c42f5f2d199a6369040cde0220dc7.tar.gz lwn-1b8ebbd3cd6c42f5f2d199a6369040cde0220dc7.zip |
iwlwifi: mvm: Fix tx-backoff when NIC exit thermal throttling
When NIC is exiting from thermal throttling state (i.e. after
heating and then cooling down), tx-backoff values are assigned
to be zero, instead of being restored to the minimal value. Fixed.
Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/tt.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/tt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/tt.c b/drivers/net/wireless/iwlwifi/mvm/tt.c index cee4e72fc893..39a3e03a0acd 100644 --- a/drivers/net/wireless/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/iwlwifi/mvm/tt.c @@ -468,13 +468,14 @@ void iwl_mvm_tt_handler(struct iwl_mvm *mvm) } if (params->support_tx_backoff) { - tx_backoff = 0; + tx_backoff = tt->min_backoff; for (i = 0; i < TT_TX_BACKOFF_SIZE; i++) { if (temperature < params->tx_backoff[i].temperature) break; - tx_backoff = params->tx_backoff[i].backoff; + tx_backoff = max(tt->min_backoff, + params->tx_backoff[i].backoff); } - if (tx_backoff != 0) + if (tx_backoff != tt->min_backoff) throttle_enable = true; if (tt->tx_backoff != tx_backoff) iwl_mvm_tt_tx_backoff(mvm, tx_backoff); |