diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2009-10-09 16:20:33 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:48:01 -0400 |
commit | 768db9829d0d45d57204714f18b54f7fc0561ddf (patch) | |
tree | bafd86178a2b2ad9a536154843214a79d6d27f0a /drivers/net/wireless/iwlwifi/iwl-3945.c | |
parent | 1f0436f4702b7cdda22a38689cc1903822694a17 (diff) |
iwl3945: rearrange the code.
Rearrange the code and groups setting of
retry_limit and data_retry_limits code together.
Make 'data_retry_limit' setting similar to iwlwifi
for better readability.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index eb874e08ba5..8012381d371 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -794,17 +794,22 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv, | |||
794 | * in this running context */ | 794 | * in this running context */ |
795 | rate_mask = IWL_RATES_MASK; | 795 | rate_mask = IWL_RATES_MASK; |
796 | 796 | ||
797 | |||
798 | /* Set retry limit on DATA packets and Probe Responses*/ | ||
799 | if (ieee80211_is_probe_resp(fc)) | ||
800 | data_retry_limit = 3; | ||
801 | else | ||
802 | data_retry_limit = IWL_DEFAULT_TX_RETRY; | ||
803 | tx_cmd->data_retry_limit = data_retry_limit; | ||
804 | |||
797 | if (tx_id >= IWL_CMD_QUEUE_NUM) | 805 | if (tx_id >= IWL_CMD_QUEUE_NUM) |
798 | rts_retry_limit = 3; | 806 | rts_retry_limit = 3; |
799 | else | 807 | else |
800 | rts_retry_limit = 7; | 808 | rts_retry_limit = 7; |
801 | 809 | ||
802 | if (ieee80211_is_probe_resp(fc)) { | 810 | if (data_retry_limit < rts_retry_limit) |
803 | data_retry_limit = 3; | 811 | rts_retry_limit = data_retry_limit; |
804 | if (data_retry_limit < rts_retry_limit) | 812 | tx_cmd->rts_retry_limit = rts_retry_limit; |
805 | rts_retry_limit = data_retry_limit; | ||
806 | } else | ||
807 | data_retry_limit = IWL_DEFAULT_TX_RETRY; | ||
808 | 813 | ||
809 | if (ieee80211_is_mgmt(fc)) { | 814 | if (ieee80211_is_mgmt(fc)) { |
810 | switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) { | 815 | switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) { |
@@ -822,8 +827,6 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv, | |||
822 | } | 827 | } |
823 | } | 828 | } |
824 | 829 | ||
825 | tx_cmd->rts_retry_limit = rts_retry_limit; | ||
826 | tx_cmd->data_retry_limit = data_retry_limit; | ||
827 | tx_cmd->rate = rate; | 830 | tx_cmd->rate = rate; |
828 | tx_cmd->tx_flags = tx_flags; | 831 | tx_cmd->tx_flags = tx_flags; |
829 | 832 | ||