diff options
Diffstat (limited to 'drivers/net/wireless/ath9k/hw.c')
-rw-r--r-- | drivers/net/wireless/ath9k/hw.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c index bde162f128ab..6dbfed0b4149 100644 --- a/drivers/net/wireless/ath9k/hw.c +++ b/drivers/net/wireless/ath9k/hw.c | |||
@@ -5017,7 +5017,11 @@ static void ath9k_hw_spur_mitigate(struct ath_hal *ah, | |||
5017 | 5017 | ||
5018 | for (i = 0; i < 123; i++) { | 5018 | for (i = 0; i < 123; i++) { |
5019 | if ((cur_vit_mask > lower) && (cur_vit_mask < upper)) { | 5019 | if ((cur_vit_mask > lower) && (cur_vit_mask < upper)) { |
5020 | if ((abs(cur_vit_mask - bin)) < 75) | 5020 | |
5021 | /* workaround for gcc bug #37014 */ | ||
5022 | volatile int tmp = abs(cur_vit_mask - bin); | ||
5023 | |||
5024 | if (tmp < 75) | ||
5021 | mask_amt = 1; | 5025 | mask_amt = 1; |
5022 | else | 5026 | else |
5023 | mask_amt = 0; | 5027 | mask_amt = 0; |
@@ -7281,15 +7285,15 @@ ath9k_hw_set_keycache_entry(struct ath_hal *ah, u16 entry, | |||
7281 | } | 7285 | } |
7282 | break; | 7286 | break; |
7283 | case ATH9K_CIPHER_WEP: | 7287 | case ATH9K_CIPHER_WEP: |
7284 | if (k->kv_len < 40 / NBBY) { | 7288 | if (k->kv_len < LEN_WEP40) { |
7285 | DPRINTF(ah->ah_sc, ATH_DBG_KEYCACHE, | 7289 | DPRINTF(ah->ah_sc, ATH_DBG_KEYCACHE, |
7286 | "%s: WEP key length %u too small\n", | 7290 | "%s: WEP key length %u too small\n", |
7287 | __func__, k->kv_len); | 7291 | __func__, k->kv_len); |
7288 | return false; | 7292 | return false; |
7289 | } | 7293 | } |
7290 | if (k->kv_len <= 40 / NBBY) | 7294 | if (k->kv_len <= LEN_WEP40) |
7291 | keyType = AR_KEYTABLE_TYPE_40; | 7295 | keyType = AR_KEYTABLE_TYPE_40; |
7292 | else if (k->kv_len <= 104 / NBBY) | 7296 | else if (k->kv_len <= LEN_WEP104) |
7293 | keyType = AR_KEYTABLE_TYPE_104; | 7297 | keyType = AR_KEYTABLE_TYPE_104; |
7294 | else | 7298 | else |
7295 | keyType = AR_KEYTABLE_TYPE_128; | 7299 | keyType = AR_KEYTABLE_TYPE_128; |
@@ -7309,7 +7313,7 @@ ath9k_hw_set_keycache_entry(struct ath_hal *ah, u16 entry, | |||
7309 | key2 = get_unaligned_le32(k->kv_val + 6) ^ xorMask; | 7313 | key2 = get_unaligned_le32(k->kv_val + 6) ^ xorMask; |
7310 | key3 = (get_unaligned_le16(k->kv_val + 10) ^ xorMask) & 0xffff; | 7314 | key3 = (get_unaligned_le16(k->kv_val + 10) ^ xorMask) & 0xffff; |
7311 | key4 = get_unaligned_le32(k->kv_val + 12) ^ xorMask; | 7315 | key4 = get_unaligned_le32(k->kv_val + 12) ^ xorMask; |
7312 | if (k->kv_len <= 104 / NBBY) | 7316 | if (k->kv_len <= LEN_WEP104) |
7313 | key4 &= 0xff; | 7317 | key4 &= 0xff; |
7314 | 7318 | ||
7315 | if (keyType == AR_KEYTABLE_TYPE_TKIP && ATH9K_IS_MIC_ENABLED(ah)) { | 7319 | if (keyType == AR_KEYTABLE_TYPE_TKIP && ATH9K_IS_MIC_ENABLED(ah)) { |