Commit 78558cb4 authored by Wey-Yi Guy's avatar Wey-Yi Guy Committed by John W. Linville

iwlagn: set rts retry limit

setup the rts rety limit for tx command
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c3322b30
...@@ -82,6 +82,9 @@ ...@@ -82,6 +82,9 @@
#define IWLAGN_RSSI_OFFSET 44 #define IWLAGN_RSSI_OFFSET 44
#define IWLAGN_DEFAULT_TX_RETRY 15 #define IWLAGN_DEFAULT_TX_RETRY 15
#define IWLAGN_MGMT_DFAULT_RETRY_LIMIT 3
#define IWLAGN_RTS_DFAULT_RETRY_LIMIT 60
#define IWLAGN_BAR_DFAULT_RETRY_LIMIT 60
/* Limit range of txpower output target to be between these values */ /* Limit range of txpower output target to be between these values */
#define IWLAGN_TX_POWER_TARGET_POWER_MIN (0) /* 0 dBm: 1 milliwatt */ #define IWLAGN_TX_POWER_TARGET_POWER_MIN (0) /* 0 dBm: 1 milliwatt */
......
...@@ -113,8 +113,6 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv, ...@@ -113,8 +113,6 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
tx_cmd->next_frame_len = 0; tx_cmd->next_frame_len = 0;
} }
#define RTS_DFAULT_RETRY_LIMIT 60
static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
struct iwl_tx_cmd *tx_cmd, struct iwl_tx_cmd *tx_cmd,
struct ieee80211_tx_info *info, struct ieee80211_tx_info *info,
...@@ -126,17 +124,19 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, ...@@ -126,17 +124,19 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
u8 data_retry_limit; u8 data_retry_limit;
u8 rate_plcp; u8 rate_plcp;
/* Set retry limit on RTS packets */
rts_retry_limit = IWLAGN_RTS_DFAULT_RETRY_LIMIT;
/* Set retry limit on DATA packets and Probe Responses*/ /* Set retry limit on DATA packets and Probe Responses*/
if (ieee80211_is_probe_resp(fc)) if (ieee80211_is_probe_resp(fc)) {
data_retry_limit = 3; data_retry_limit = IWLAGN_MGMT_DFAULT_RETRY_LIMIT;
rts_retry_limit = min(data_retry_limit, rts_retry_limit);
} else if (ieee80211_is_back_req(fc))
data_retry_limit = IWLAGN_BAR_DFAULT_RETRY_LIMIT;
else else
data_retry_limit = IWLAGN_DEFAULT_TX_RETRY; data_retry_limit = IWLAGN_DEFAULT_TX_RETRY;
tx_cmd->data_retry_limit = data_retry_limit;
/* Set retry limit on RTS packets */ tx_cmd->data_retry_limit = data_retry_limit;
rts_retry_limit = RTS_DFAULT_RETRY_LIMIT;
if (data_retry_limit < rts_retry_limit)
rts_retry_limit = data_retry_limit;
tx_cmd->rts_retry_limit = rts_retry_limit; tx_cmd->rts_retry_limit = rts_retry_limit;
/* DATA packets will use the uCode station table for rate/antenna /* DATA packets will use the uCode station table for rate/antenna
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment