aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-11-04 20:47:31 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-11 17:09:10 -0500
commitdc1e001bf498a19dcb46676d933cd0e92dc53ef3 (patch)
treea092148669fa82abc449fb6a663bbe10f25f0cf2 /drivers/net
parent7e86c1048a9f5f1e157daf28411f3526f0b9f7b6 (diff)
ath5k: use the common->keymap
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c10
-rw-r--r--drivers/net/wireless/ath/ath5k/base.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 4cefd9e85dd4..a4c086f069b1 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1683,6 +1683,8 @@ static unsigned int
1683ath5k_rx_decrypted(struct ath5k_softc *sc, struct ath5k_desc *ds, 1683ath5k_rx_decrypted(struct ath5k_softc *sc, struct ath5k_desc *ds,
1684 struct sk_buff *skb, struct ath5k_rx_status *rs) 1684 struct sk_buff *skb, struct ath5k_rx_status *rs)
1685{ 1685{
1686 struct ath5k_hw *ah = sc->ah;
1687 struct ath_common *common = ath5k_hw_common(ah);
1686 struct ieee80211_hdr *hdr = (void *)skb->data; 1688 struct ieee80211_hdr *hdr = (void *)skb->data;
1687 unsigned int keyix, hlen; 1689 unsigned int keyix, hlen;
1688 1690
@@ -1699,7 +1701,7 @@ ath5k_rx_decrypted(struct ath5k_softc *sc, struct ath5k_desc *ds,
1699 skb->len >= hlen + 4) { 1701 skb->len >= hlen + 4) {
1700 keyix = skb->data[hlen + 3] >> 6; 1702 keyix = skb->data[hlen + 3] >> 6;
1701 1703
1702 if (test_bit(keyix, sc->keymap)) 1704 if (test_bit(keyix, common->keymap))
1703 return RX_FLAG_DECRYPTED; 1705 return RX_FLAG_DECRYPTED;
1704 } 1706 }
1705 1707
@@ -3038,6 +3040,8 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3038 struct ieee80211_key_conf *key) 3040 struct ieee80211_key_conf *key)
3039{ 3041{
3040 struct ath5k_softc *sc = hw->priv; 3042 struct ath5k_softc *sc = hw->priv;
3043 struct ath5k_hw *ah = sc->ah;
3044 struct ath_common *common = ath5k_hw_common(ah);
3041 int ret = 0; 3045 int ret = 0;
3042 3046
3043 if (modparam_nohwcrypt) 3047 if (modparam_nohwcrypt)
@@ -3070,14 +3074,14 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3070 ATH5K_ERR(sc, "can't set the key\n"); 3074 ATH5K_ERR(sc, "can't set the key\n");
3071 goto unlock; 3075 goto unlock;
3072 } 3076 }
3073 __set_bit(key->keyidx, sc->keymap); 3077 __set_bit(key->keyidx, common->keymap);
3074 key->hw_key_idx = key->keyidx; 3078 key->hw_key_idx = key->keyidx;
3075 key->flags |= (IEEE80211_KEY_FLAG_GENERATE_IV | 3079 key->flags |= (IEEE80211_KEY_FLAG_GENERATE_IV |
3076 IEEE80211_KEY_FLAG_GENERATE_MMIC); 3080 IEEE80211_KEY_FLAG_GENERATE_MMIC);
3077 break; 3081 break;
3078 case DISABLE_KEY: 3082 case DISABLE_KEY:
3079 ath5k_hw_reset_key(sc->ah, key->keyidx); 3083 ath5k_hw_reset_key(sc->ah, key->keyidx);
3080 __clear_bit(key->keyidx, sc->keymap); 3084 __clear_bit(key->keyidx, common->keymap);
3081 break; 3085 break;
3082 default: 3086 default:
3083 ret = -EINVAL; 3087 ret = -EINVAL;
diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
index b14ba07e9157..b72338c9bde7 100644
--- a/drivers/net/wireless/ath/ath5k/base.h
+++ b/drivers/net/wireless/ath/ath5k/base.h
@@ -153,8 +153,6 @@ struct ath5k_softc {
153 153
154 enum ath5k_int imask; /* interrupt mask copy */ 154 enum ath5k_int imask; /* interrupt mask copy */
155 155
156 DECLARE_BITMAP(keymap, AR5K_KEYCACHE_SIZE); /* key use bit map */
157
158 u8 bssidmask[ETH_ALEN]; 156 u8 bssidmask[ETH_ALEN];
159 157
160 unsigned int led_pin, /* GPIO pin for driving LED */ 158 unsigned int led_pin, /* GPIO pin for driving LED */