Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135080
b: refs/heads/master
c: e0caf9e
h: refs/heads/master
v: v3
  • Loading branch information
Jouni Malinen authored and John W. Linville committed Mar 5, 2009
1 parent 2aca29c commit 774c79d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 672903b329579ff43ae3d553cf55bd82041921c1
refs/heads/master: e0caf9eaae5182ab4e02a5d703ade64719738f87
15 changes: 6 additions & 9 deletions trunk/drivers/net/wireless/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2415,14 +2415,11 @@ bool ath9k_hw_keysetmac(struct ath_hw *ah, u16 entry, const u8 *mac)

bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
const struct ath9k_keyval *k,
const u8 *mac, int xorKey)
const u8 *mac)
{
const struct ath9k_hw_capabilities *pCap = &ah->caps;
u32 key0, key1, key2, key3, key4;
u32 keyType;
u32 xorMask = xorKey ?
(ATH9K_KEY_XOR << 24 | ATH9K_KEY_XOR << 16 | ATH9K_KEY_XOR << 8
| ATH9K_KEY_XOR) : 0;

if (entry >= pCap->keycache_size) {
DPRINTF(ah->ah_sc, ATH_DBG_KEYCACHE,
Expand Down Expand Up @@ -2474,11 +2471,11 @@ bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
return false;
}

key0 = get_unaligned_le32(k->kv_val + 0) ^ xorMask;
key1 = (get_unaligned_le16(k->kv_val + 4) ^ xorMask) & 0xffff;
key2 = get_unaligned_le32(k->kv_val + 6) ^ xorMask;
key3 = (get_unaligned_le16(k->kv_val + 10) ^ xorMask) & 0xffff;
key4 = get_unaligned_le32(k->kv_val + 12) ^ xorMask;
key0 = get_unaligned_le32(k->kv_val + 0);
key1 = get_unaligned_le16(k->kv_val + 4);
key2 = get_unaligned_le32(k->kv_val + 6);
key3 = get_unaligned_le16(k->kv_val + 10);
key4 = get_unaligned_le32(k->kv_val + 12);
if (k->kv_len <= LEN_WEP104)
key4 &= 0xff;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/ath9k/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ bool ath9k_hw_keyreset(struct ath_hw *ah, u16 entry);
bool ath9k_hw_keysetmac(struct ath_hw *ah, u16 entry, const u8 *mac);
bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
const struct ath9k_keyval *k,
const u8 *mac, int xorKey);
const u8 *mac);
bool ath9k_hw_keyisvalid(struct ath_hw *ah, u16 entry);

/* GPIO / RFKILL / Antennae */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ static int ath_keyset(struct ath_softc *sc, u16 keyix,
bool status;

status = ath9k_hw_set_keycache_entry(sc->sc_ah,
keyix, hk, mac, false);
keyix, hk, mac);

return status != false;
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/ath9k/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,6 @@ bool ath9k_hw_init_rf(struct ath_hw *ah,
} \
} while (0)

#define ATH9K_KEY_XOR 0xaa

#define ATH9K_IS_MIC_ENABLED(ah) \
((ah)->sta_id1_defaults & AR_STA_ID1_CRPT_MIC_ENABLE)

Expand Down

0 comments on commit 774c79d

Please sign in to comment.