diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-10-10 10:27:06 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-10-14 14:48:11 -0400 |
commit | f3129b73889086f326d810c1cf4e807849321d64 (patch) | |
tree | be58840fe148adba9e7859bac966f52f62d4c052 /drivers | |
parent | 281e27c8092da95c83f6bc3df8fc11235f4b364c (diff) |
iwlagn: use low retry limit for WoWLAN
When in D3 state, use low retry limit for both data and rts
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-hw.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 28 |
2 files changed, 18 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hw.h b/drivers/net/wireless/iwlwifi/iwl-agn-hw.h index 64e3417d19ea..ac039d40c062 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn-hw.h | |||
@@ -85,6 +85,7 @@ | |||
85 | #define IWLAGN_MGMT_DFAULT_RETRY_LIMIT 3 | 85 | #define IWLAGN_MGMT_DFAULT_RETRY_LIMIT 3 |
86 | #define IWLAGN_RTS_DFAULT_RETRY_LIMIT 60 | 86 | #define IWLAGN_RTS_DFAULT_RETRY_LIMIT 60 |
87 | #define IWLAGN_BAR_DFAULT_RETRY_LIMIT 60 | 87 | #define IWLAGN_BAR_DFAULT_RETRY_LIMIT 60 |
88 | #define IWLAGN_LOW_RETRY_LIMIT 7 | ||
88 | 89 | ||
89 | /* Limit range of txpower output target to be between these values */ | 90 | /* Limit range of txpower output target to be between these values */ |
90 | #define IWLAGN_TX_POWER_TARGET_POWER_MIN (0) /* 0 dBm: 1 milliwatt */ | 91 | #define IWLAGN_TX_POWER_TARGET_POWER_MIN (0) /* 0 dBm: 1 milliwatt */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index 2584f6f70a16..f849097cf7e6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -124,17 +124,23 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, | |||
124 | u8 data_retry_limit; | 124 | u8 data_retry_limit; |
125 | u8 rate_plcp; | 125 | u8 rate_plcp; |
126 | 126 | ||
127 | /* Set retry limit on RTS packets */ | 127 | if (priv->shrd->wowlan) { |
128 | rts_retry_limit = IWLAGN_RTS_DFAULT_RETRY_LIMIT; | 128 | rts_retry_limit = IWLAGN_LOW_RETRY_LIMIT; |
129 | 129 | data_retry_limit = IWLAGN_LOW_RETRY_LIMIT; | |
130 | /* Set retry limit on DATA packets and Probe Responses*/ | 130 | } else { |
131 | if (ieee80211_is_probe_resp(fc)) { | 131 | /* Set retry limit on RTS packets */ |
132 | data_retry_limit = IWLAGN_MGMT_DFAULT_RETRY_LIMIT; | 132 | rts_retry_limit = IWLAGN_RTS_DFAULT_RETRY_LIMIT; |
133 | rts_retry_limit = min(data_retry_limit, rts_retry_limit); | 133 | |
134 | } else if (ieee80211_is_back_req(fc)) | 134 | /* Set retry limit on DATA packets and Probe Responses*/ |
135 | data_retry_limit = IWLAGN_BAR_DFAULT_RETRY_LIMIT; | 135 | if (ieee80211_is_probe_resp(fc)) { |
136 | else | 136 | data_retry_limit = IWLAGN_MGMT_DFAULT_RETRY_LIMIT; |
137 | data_retry_limit = IWLAGN_DEFAULT_TX_RETRY; | 137 | rts_retry_limit = |
138 | min(data_retry_limit, rts_retry_limit); | ||
139 | } else if (ieee80211_is_back_req(fc)) | ||
140 | data_retry_limit = IWLAGN_BAR_DFAULT_RETRY_LIMIT; | ||
141 | else | ||
142 | data_retry_limit = IWLAGN_DEFAULT_TX_RETRY; | ||
143 | } | ||
138 | 144 | ||
139 | tx_cmd->data_retry_limit = data_retry_limit; | 145 | tx_cmd->data_retry_limit = data_retry_limit; |
140 | tx_cmd->rts_retry_limit = rts_retry_limit; | 146 | tx_cmd->rts_retry_limit = rts_retry_limit; |