diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-10-10 10:26:59 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-10-14 14:48:10 -0400 |
commit | 78558cb4415919cae5ebc0213abd75fa86d7933b (patch) | |
tree | 94193ca2459a890990b8be8b72a3b85903557f7e | |
parent | c3322b30fe37db53feb4f60ccb1eb5175af2d2e0 (diff) |
iwlagn: set rts retry limit
setup the rts rety limit for tx command
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-hw.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 18 |
2 files changed, 13 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hw.h b/drivers/net/wireless/iwlwifi/iwl-agn-hw.h index 33951a11327d..64e3417d19ea 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn-hw.h | |||
@@ -81,7 +81,10 @@ | |||
81 | /* RSSI to dBm */ | 81 | /* RSSI to dBm */ |
82 | #define IWLAGN_RSSI_OFFSET 44 | 82 | #define IWLAGN_RSSI_OFFSET 44 |
83 | 83 | ||
84 | #define IWLAGN_DEFAULT_TX_RETRY 15 | 84 | #define IWLAGN_DEFAULT_TX_RETRY 15 |
85 | #define IWLAGN_MGMT_DFAULT_RETRY_LIMIT 3 | ||
86 | #define IWLAGN_RTS_DFAULT_RETRY_LIMIT 60 | ||
87 | #define IWLAGN_BAR_DFAULT_RETRY_LIMIT 60 | ||
85 | 88 | ||
86 | /* Limit range of txpower output target to be between these values */ | 89 | /* Limit range of txpower output target to be between these values */ |
87 | #define IWLAGN_TX_POWER_TARGET_POWER_MIN (0) /* 0 dBm: 1 milliwatt */ | 90 | #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 dcb3bd67d4f9..2584f6f70a16 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -113,8 +113,6 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv, | |||
113 | tx_cmd->next_frame_len = 0; | 113 | tx_cmd->next_frame_len = 0; |
114 | } | 114 | } |
115 | 115 | ||
116 | #define RTS_DFAULT_RETRY_LIMIT 60 | ||
117 | |||
118 | static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, | 116 | static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, |
119 | struct iwl_tx_cmd *tx_cmd, | 117 | struct iwl_tx_cmd *tx_cmd, |
120 | struct ieee80211_tx_info *info, | 118 | struct ieee80211_tx_info *info, |
@@ -126,17 +124,19 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, | |||
126 | u8 data_retry_limit; | 124 | u8 data_retry_limit; |
127 | u8 rate_plcp; | 125 | u8 rate_plcp; |
128 | 126 | ||
127 | /* Set retry limit on RTS packets */ | ||
128 | rts_retry_limit = IWLAGN_RTS_DFAULT_RETRY_LIMIT; | ||
129 | |||
129 | /* Set retry limit on DATA packets and Probe Responses*/ | 130 | /* Set retry limit on DATA packets and Probe Responses*/ |
130 | if (ieee80211_is_probe_resp(fc)) | 131 | if (ieee80211_is_probe_resp(fc)) { |
131 | data_retry_limit = 3; | 132 | data_retry_limit = IWLAGN_MGMT_DFAULT_RETRY_LIMIT; |
133 | rts_retry_limit = min(data_retry_limit, rts_retry_limit); | ||
134 | } else if (ieee80211_is_back_req(fc)) | ||
135 | data_retry_limit = IWLAGN_BAR_DFAULT_RETRY_LIMIT; | ||
132 | else | 136 | else |
133 | data_retry_limit = IWLAGN_DEFAULT_TX_RETRY; | 137 | data_retry_limit = IWLAGN_DEFAULT_TX_RETRY; |
134 | tx_cmd->data_retry_limit = data_retry_limit; | ||
135 | 138 | ||
136 | /* Set retry limit on RTS packets */ | 139 | tx_cmd->data_retry_limit = data_retry_limit; |
137 | rts_retry_limit = RTS_DFAULT_RETRY_LIMIT; | ||
138 | if (data_retry_limit < rts_retry_limit) | ||
139 | rts_retry_limit = data_retry_limit; | ||
140 | tx_cmd->rts_retry_limit = rts_retry_limit; | 140 | tx_cmd->rts_retry_limit = rts_retry_limit; |
141 | 141 | ||
142 | /* DATA packets will use the uCode station table for rate/antenna | 142 | /* DATA packets will use the uCode station table for rate/antenna |