diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 3473a797651a..7f25da8444fe 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -139,7 +139,7 @@ static void ath9k_hw_set_clockrate(struct ath_hw *ah) | |||
139 | clockrate = 117; | 139 | clockrate = 117; |
140 | else if (!ah->curchan) /* should really check for CCK instead */ | 140 | else if (!ah->curchan) /* should really check for CCK instead */ |
141 | clockrate = ATH9K_CLOCK_RATE_CCK; | 141 | clockrate = ATH9K_CLOCK_RATE_CCK; |
142 | else if (conf->channel->band == IEEE80211_BAND_2GHZ) | 142 | else if (conf->chandef.chan->band == IEEE80211_BAND_2GHZ) |
143 | clockrate = ATH9K_CLOCK_RATE_2GHZ_OFDM; | 143 | clockrate = ATH9K_CLOCK_RATE_2GHZ_OFDM; |
144 | else if (ah->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK) | 144 | else if (ah->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK) |
145 | clockrate = ATH9K_CLOCK_FAST_RATE_5GHZ_OFDM; | 145 | clockrate = ATH9K_CLOCK_FAST_RATE_5GHZ_OFDM; |
@@ -1100,7 +1100,8 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) | |||
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | /* As defined by IEEE 802.11-2007 17.3.8.6 */ | 1102 | /* As defined by IEEE 802.11-2007 17.3.8.6 */ |
1103 | acktimeout = slottime + sifstime + 3 * ah->coverage_class + ack_offset; | 1103 | slottime += 3 * ah->coverage_class; |
1104 | acktimeout = slottime + sifstime + ack_offset; | ||
1104 | ctstimeout = acktimeout; | 1105 | ctstimeout = acktimeout; |
1105 | 1106 | ||
1106 | /* | 1107 | /* |
@@ -1110,7 +1111,8 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) | |||
1110 | * BA frames in some implementations, but it has been found to fix ACK | 1111 | * BA frames in some implementations, but it has been found to fix ACK |
1111 | * timeout issues in other cases as well. | 1112 | * timeout issues in other cases as well. |
1112 | */ | 1113 | */ |
1113 | if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ && | 1114 | if (conf->chandef.chan && |
1115 | conf->chandef.chan->band == IEEE80211_BAND_2GHZ && | ||
1114 | !IS_CHAN_HALF_RATE(chan) && !IS_CHAN_QUARTER_RATE(chan)) { | 1116 | !IS_CHAN_HALF_RATE(chan) && !IS_CHAN_QUARTER_RATE(chan)) { |
1115 | acktimeout += 64 - sifstime - ah->slottime; | 1117 | acktimeout += 64 - sifstime - ah->slottime; |
1116 | ctstimeout += 48 - sifstime - ah->slottime; | 1118 | ctstimeout += 48 - sifstime - ah->slottime; |
@@ -1697,12 +1699,11 @@ static void ath9k_hw_reset_opmode(struct ath_hw *ah, | |||
1697 | 1699 | ||
1698 | ENABLE_REGWRITE_BUFFER(ah); | 1700 | ENABLE_REGWRITE_BUFFER(ah); |
1699 | 1701 | ||
1700 | REG_WRITE(ah, AR_STA_ID0, get_unaligned_le32(common->macaddr)); | 1702 | REG_RMW(ah, AR_STA_ID1, macStaId1 |
1701 | REG_WRITE(ah, AR_STA_ID1, get_unaligned_le16(common->macaddr + 4) | ||
1702 | | macStaId1 | ||
1703 | | AR_STA_ID1_RTS_USE_DEF | 1703 | | AR_STA_ID1_RTS_USE_DEF |
1704 | | (ah->config.ack_6mb ? AR_STA_ID1_ACKCTS_6MB : 0) | 1704 | | (ah->config.ack_6mb ? AR_STA_ID1_ACKCTS_6MB : 0) |
1705 | | ah->sta_id1_defaults); | 1705 | | ah->sta_id1_defaults, |
1706 | ~AR_STA_ID1_SADH_MASK); | ||
1706 | ath_hw_setbssidmask(common); | 1707 | ath_hw_setbssidmask(common); |
1707 | REG_WRITE(ah, AR_DEF_ANTENNA, saveDefAntenna); | 1708 | REG_WRITE(ah, AR_DEF_ANTENNA, saveDefAntenna); |
1708 | ath9k_hw_write_associd(ah); | 1709 | ath9k_hw_write_associd(ah); |