diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-08 19:59:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-08 19:59:05 -0400 |
commit | 17dce5dfe38ae2fb359b61e855f5d8a3a8b7892b (patch) | |
tree | 88bb1fcf84f9ebfa4299c9a8dcd9e6330b358446 /drivers/net/wireless/ath9k | |
parent | 712d6954e3998d0de2840d8130941e8042541246 (diff) | |
parent | 82a28c794f27aac17d7a3ebd7f14d731a11a5532 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
net/mac80211/mlme.c
Diffstat (limited to 'drivers/net/wireless/ath9k')
-rw-r--r-- | drivers/net/wireless/ath9k/hw.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/recv.c | 5 |
3 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c index 2578411c6019..4ccbbc07cf1e 100644 --- a/drivers/net/wireless/ath9k/hw.c +++ b/drivers/net/wireless/ath9k/hw.c | |||
@@ -7236,15 +7236,15 @@ ath9k_hw_set_keycache_entry(struct ath_hal *ah, u16 entry, | |||
7236 | } | 7236 | } |
7237 | break; | 7237 | break; |
7238 | case ATH9K_CIPHER_WEP: | 7238 | case ATH9K_CIPHER_WEP: |
7239 | if (k->kv_len < 40 / NBBY) { | 7239 | if (k->kv_len < LEN_WEP40) { |
7240 | DPRINTF(ah->ah_sc, ATH_DBG_KEYCACHE, | 7240 | DPRINTF(ah->ah_sc, ATH_DBG_KEYCACHE, |
7241 | "%s: WEP key length %u too small\n", | 7241 | "%s: WEP key length %u too small\n", |
7242 | __func__, k->kv_len); | 7242 | __func__, k->kv_len); |
7243 | return false; | 7243 | return false; |
7244 | } | 7244 | } |
7245 | if (k->kv_len <= 40 / NBBY) | 7245 | if (k->kv_len <= LEN_WEP40) |
7246 | keyType = AR_KEYTABLE_TYPE_40; | 7246 | keyType = AR_KEYTABLE_TYPE_40; |
7247 | else if (k->kv_len <= 104 / NBBY) | 7247 | else if (k->kv_len <= LEN_WEP104) |
7248 | keyType = AR_KEYTABLE_TYPE_104; | 7248 | keyType = AR_KEYTABLE_TYPE_104; |
7249 | else | 7249 | else |
7250 | keyType = AR_KEYTABLE_TYPE_128; | 7250 | keyType = AR_KEYTABLE_TYPE_128; |
@@ -7264,7 +7264,7 @@ ath9k_hw_set_keycache_entry(struct ath_hal *ah, u16 entry, | |||
7264 | key2 = get_unaligned_le32(k->kv_val + 6) ^ xorMask; | 7264 | key2 = get_unaligned_le32(k->kv_val + 6) ^ xorMask; |
7265 | key3 = (get_unaligned_le16(k->kv_val + 10) ^ xorMask) & 0xffff; | 7265 | key3 = (get_unaligned_le16(k->kv_val + 10) ^ xorMask) & 0xffff; |
7266 | key4 = get_unaligned_le32(k->kv_val + 12) ^ xorMask; | 7266 | key4 = get_unaligned_le32(k->kv_val + 12) ^ xorMask; |
7267 | if (k->kv_len <= 104 / NBBY) | 7267 | if (k->kv_len <= LEN_WEP104) |
7268 | key4 &= 0xff; | 7268 | key4 &= 0xff; |
7269 | 7269 | ||
7270 | if (keyType == AR_KEYTABLE_TYPE_TKIP && ATH9K_IS_MIC_ENABLED(ah)) { | 7270 | if (keyType == AR_KEYTABLE_TYPE_TKIP && ATH9K_IS_MIC_ENABLED(ah)) { |
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 39a4a70d0130..245b7308a9ad 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -204,7 +204,8 @@ static int ath_key_config(struct ath_softc *sc, | |||
204 | if (!ret) | 204 | if (!ret) |
205 | return -EIO; | 205 | return -EIO; |
206 | 206 | ||
207 | sc->sc_keytype = hk.kv_type; | 207 | if (mac) |
208 | sc->sc_keytype = hk.kv_type; | ||
208 | return 0; | 209 | return 0; |
209 | } | 210 | } |
210 | 211 | ||
@@ -781,7 +782,8 @@ static int ath9k_set_key(struct ieee80211_hw *hw, | |||
781 | key->hw_key_idx = key->keyidx; | 782 | key->hw_key_idx = key->keyidx; |
782 | /* push IV and Michael MIC generation to stack */ | 783 | /* push IV and Michael MIC generation to stack */ |
783 | key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; | 784 | key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; |
784 | key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; | 785 | if (key->alg == ALG_TKIP) |
786 | key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; | ||
785 | } | 787 | } |
786 | break; | 788 | break; |
787 | case DISABLE_KEY: | 789 | case DISABLE_KEY: |
diff --git a/drivers/net/wireless/ath9k/recv.c b/drivers/net/wireless/ath9k/recv.c index 6e13c638cc0b..498256309ab7 100644 --- a/drivers/net/wireless/ath9k/recv.c +++ b/drivers/net/wireless/ath9k/recv.c | |||
@@ -360,8 +360,9 @@ static void ath_rx_flush_tid(struct ath_softc *sc, | |||
360 | struct ath_arx_tid *rxtid, int drop) | 360 | struct ath_arx_tid *rxtid, int drop) |
361 | { | 361 | { |
362 | struct ath_rxbuf *rxbuf; | 362 | struct ath_rxbuf *rxbuf; |
363 | unsigned long flag; | ||
363 | 364 | ||
364 | spin_lock_bh(&rxtid->tidlock); | 365 | spin_lock_irqsave(&rxtid->tidlock, flag); |
365 | while (rxtid->baw_head != rxtid->baw_tail) { | 366 | while (rxtid->baw_head != rxtid->baw_tail) { |
366 | rxbuf = rxtid->rxbuf + rxtid->baw_head; | 367 | rxbuf = rxtid->rxbuf + rxtid->baw_head; |
367 | if (!rxbuf->rx_wbuf) { | 368 | if (!rxbuf->rx_wbuf) { |
@@ -382,7 +383,7 @@ static void ath_rx_flush_tid(struct ath_softc *sc, | |||
382 | INCR(rxtid->baw_head, ATH_TID_MAX_BUFS); | 383 | INCR(rxtid->baw_head, ATH_TID_MAX_BUFS); |
383 | INCR(rxtid->seq_next, IEEE80211_SEQ_MAX); | 384 | INCR(rxtid->seq_next, IEEE80211_SEQ_MAX); |
384 | } | 385 | } |
385 | spin_unlock_bh(&rxtid->tidlock); | 386 | spin_unlock_irqrestore(&rxtid->tidlock, flag); |
386 | } | 387 | } |
387 | 388 | ||
388 | static struct sk_buff *ath_rxbuf_alloc(struct ath_softc *sc, | 389 | static struct sk_buff *ath_rxbuf_alloc(struct ath_softc *sc, |