Commit 81fb4613 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville

iwlegacy: 3945: simplify calculations of retry limit

Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5d0bef90
...@@ -570,8 +570,7 @@ il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) ...@@ -570,8 +570,7 @@ il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
/* TODO need this for burst mode later on */ /* TODO need this for burst mode later on */
il3945_build_tx_cmd_basic(il, out_cmd, info, hdr, sta_id); il3945_build_tx_cmd_basic(il, out_cmd, info, hdr, sta_id);
/* set is_hcca to 0; it probably will never be implemented */ il3945_hw_build_tx_cmd_rate(il, out_cmd, info, hdr, sta_id);
il3945_hw_build_tx_cmd_rate(il, out_cmd, info, hdr, sta_id, 0);
/* Total # bytes to be transmitted */ /* Total # bytes to be transmitted */
len = (u16) skb->len; len = (u16) skb->len;
......
...@@ -680,13 +680,13 @@ il3945_hw_txq_free_tfd(struct il_priv *il, struct il_tx_queue *txq) ...@@ -680,13 +680,13 @@ il3945_hw_txq_free_tfd(struct il_priv *il, struct il_tx_queue *txq)
void void
il3945_hw_build_tx_cmd_rate(struct il_priv *il, struct il_device_cmd *cmd, il3945_hw_build_tx_cmd_rate(struct il_priv *il, struct il_device_cmd *cmd,
struct ieee80211_tx_info *info, struct ieee80211_tx_info *info,
struct ieee80211_hdr *hdr, int sta_id, int tx_id) struct ieee80211_hdr *hdr, int sta_id)
{ {
u16 hw_value = ieee80211_get_tx_rate(il->hw, info)->hw_value; u16 hw_value = ieee80211_get_tx_rate(il->hw, info)->hw_value;
u16 rate_idx = min(hw_value & 0xffff, RATE_COUNT_3945 - 1); u16 rate_idx = min(hw_value & 0xffff, RATE_COUNT_3945 - 1);
u16 rate_mask; u16 rate_mask;
int rate; int rate;
u8 rts_retry_limit; const u8 rts_retry_limit = 7;
u8 data_retry_limit; u8 data_retry_limit;
__le32 tx_flags; __le32 tx_flags;
__le16 fc = hdr->frame_control; __le16 fc = hdr->frame_control;
...@@ -705,15 +705,8 @@ il3945_hw_build_tx_cmd_rate(struct il_priv *il, struct il_device_cmd *cmd, ...@@ -705,15 +705,8 @@ il3945_hw_build_tx_cmd_rate(struct il_priv *il, struct il_device_cmd *cmd,
else else
data_retry_limit = IL_DEFAULT_TX_RETRY; data_retry_limit = IL_DEFAULT_TX_RETRY;
tx_cmd->data_retry_limit = data_retry_limit; tx_cmd->data_retry_limit = data_retry_limit;
/* Set retry limit on RTS packets */
if (tx_id >= IL39_CMD_QUEUE_NUM) tx_cmd->rts_retry_limit = min(data_retry_limit, rts_retry_limit);
rts_retry_limit = 3;
else
rts_retry_limit = 7;
if (data_retry_limit < rts_retry_limit)
rts_retry_limit = data_retry_limit;
tx_cmd->rts_retry_limit = rts_retry_limit;
tx_cmd->rate = rate; tx_cmd->rate = rate;
tx_cmd->tx_flags = tx_flags; tx_cmd->tx_flags = tx_flags;
......
...@@ -239,8 +239,7 @@ extern unsigned int il3945_hw_get_beacon_cmd(struct il_priv *il, ...@@ -239,8 +239,7 @@ extern unsigned int il3945_hw_get_beacon_cmd(struct il_priv *il,
u8 rate); u8 rate);
void il3945_hw_build_tx_cmd_rate(struct il_priv *il, struct il_device_cmd *cmd, void il3945_hw_build_tx_cmd_rate(struct il_priv *il, struct il_device_cmd *cmd,
struct ieee80211_tx_info *info, struct ieee80211_tx_info *info,
struct ieee80211_hdr *hdr, int sta_id, struct ieee80211_hdr *hdr, int sta_id);
int tx_id);
extern int il3945_hw_reg_send_txpower(struct il_priv *il); extern int il3945_hw_reg_send_txpower(struct il_priv *il);
extern int il3945_hw_reg_set_txpower(struct il_priv *il, s8 power); extern int il3945_hw_reg_set_txpower(struct il_priv *il, s8 power);
extern void il3945_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb); extern void il3945_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb);
......
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