diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index a43934fb8138..4dddffd7c403 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1020,7 +1020,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) | |||
1020 | struct ath_common *common = ath9k_hw_common(ah); | 1020 | struct ath_common *common = ath9k_hw_common(ah); |
1021 | struct ieee80211_conf *conf = &common->hw->conf; | 1021 | struct ieee80211_conf *conf = &common->hw->conf; |
1022 | const struct ath9k_channel *chan = ah->curchan; | 1022 | const struct ath9k_channel *chan = ah->curchan; |
1023 | int acktimeout, ctstimeout; | 1023 | int acktimeout, ctstimeout, ack_offset = 0; |
1024 | int slottime; | 1024 | int slottime; |
1025 | int sifstime; | 1025 | int sifstime; |
1026 | int rx_lat = 0, tx_lat = 0, eifs = 0; | 1026 | int rx_lat = 0, tx_lat = 0, eifs = 0; |
@@ -1054,6 +1054,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) | |||
1054 | tx_lat += 11; | 1054 | tx_lat += 11; |
1055 | 1055 | ||
1056 | sifstime *= 2; | 1056 | sifstime *= 2; |
1057 | ack_offset = 16; | ||
1057 | slottime = 13; | 1058 | slottime = 13; |
1058 | } else if (IS_CHAN_QUARTER_RATE(chan)) { | 1059 | } else if (IS_CHAN_QUARTER_RATE(chan)) { |
1059 | eifs = 340; | 1060 | eifs = 340; |
@@ -1063,6 +1064,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) | |||
1063 | tx_lat += 22; | 1064 | tx_lat += 22; |
1064 | 1065 | ||
1065 | sifstime *= 4; | 1066 | sifstime *= 4; |
1067 | ack_offset = 32; | ||
1066 | slottime = 21; | 1068 | slottime = 21; |
1067 | } else { | 1069 | } else { |
1068 | if (AR_SREV_9287(ah) && AR_SREV_9287_13_OR_LATER(ah)) { | 1070 | if (AR_SREV_9287(ah) && AR_SREV_9287_13_OR_LATER(ah)) { |
@@ -1080,7 +1082,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) | |||
1080 | } | 1082 | } |
1081 | 1083 | ||
1082 | /* As defined by IEEE 802.11-2007 17.3.8.6 */ | 1084 | /* As defined by IEEE 802.11-2007 17.3.8.6 */ |
1083 | acktimeout = slottime + sifstime + 3 * ah->coverage_class; | 1085 | acktimeout = slottime + sifstime + 3 * ah->coverage_class + ack_offset; |
1084 | ctstimeout = acktimeout; | 1086 | ctstimeout = acktimeout; |
1085 | 1087 | ||
1086 | /* | 1088 | /* |
@@ -1090,7 +1092,8 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) | |||
1090 | * BA frames in some implementations, but it has been found to fix ACK | 1092 | * BA frames in some implementations, but it has been found to fix ACK |
1091 | * timeout issues in other cases as well. | 1093 | * timeout issues in other cases as well. |
1092 | */ | 1094 | */ |
1093 | if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ) { | 1095 | if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ && |
1096 | !IS_CHAN_HALF_RATE(chan) && !IS_CHAN_QUARTER_RATE(chan)) { | ||
1094 | acktimeout += 64 - sifstime - ah->slottime; | 1097 | acktimeout += 64 - sifstime - ah->slottime; |
1095 | ctstimeout += 48 - sifstime - ah->slottime; | 1098 | ctstimeout += 48 - sifstime - ah->slottime; |
1096 | } | 1099 | } |