diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-06-12 11:22:28 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-14 15:39:33 -0400 |
commit | 716f7fc5b83ec04c53274a4810a723747e12f910 (patch) | |
tree | 778a402c4d750eaba1679bb49b7847f608c3dc49 | |
parent | 0efabd51230f38278d8feea42e843e3ed64694bd (diff) |
ath9k_hw: remove ATH9K_CAP_CIPHER
All of the ciphers that are tested for are always supported
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_init.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 24 |
4 files changed, 16 insertions, 45 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index 947de702ef9..a26bc569652 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c | |||
@@ -570,16 +570,13 @@ static void ath9k_init_crypto(struct ath9k_htc_priv *priv) | |||
570 | for (i = 0; i < common->keymax; i++) | 570 | for (i = 0; i < common->keymax; i++) |
571 | ath9k_hw_keyreset(priv->ah, (u16) i); | 571 | ath9k_hw_keyreset(priv->ah, (u16) i); |
572 | 572 | ||
573 | if (ath9k_hw_getcapability(priv->ah, ATH9K_CAP_CIPHER, | 573 | /* |
574 | ATH9K_CIPHER_TKIP, NULL)) { | 574 | * Whether we should enable h/w TKIP MIC. |
575 | /* | 575 | * XXX: if we don't support WME TKIP MIC, then we wouldn't |
576 | * Whether we should enable h/w TKIP MIC. | 576 | * report WMM capable, so it's always safe to turn on |
577 | * XXX: if we don't support WME TKIP MIC, then we wouldn't | 577 | * TKIP MIC in this case. |
578 | * report WMM capable, so it's always safe to turn on | 578 | */ |
579 | * TKIP MIC in this case. | 579 | ath9k_hw_setcapability(priv->ah, ATH9K_CAP_TKIP_MIC, 0, 1, NULL); |
580 | */ | ||
581 | ath9k_hw_setcapability(priv->ah, ATH9K_CAP_TKIP_MIC, 0, 1, NULL); | ||
582 | } | ||
583 | 580 | ||
584 | /* | 581 | /* |
585 | * Check whether the separate key cache entries | 582 | * Check whether the separate key cache entries |
@@ -587,12 +584,7 @@ static void ath9k_init_crypto(struct ath9k_htc_priv *priv) | |||
587 | * With split mic keys the number of stations is limited | 584 | * With split mic keys the number of stations is limited |
588 | * to 27 otherwise 59. | 585 | * to 27 otherwise 59. |
589 | */ | 586 | */ |
590 | if (ath9k_hw_getcapability(priv->ah, ATH9K_CAP_CIPHER, | 587 | if (ath9k_hw_getcapability(priv->ah, ATH9K_CAP_TKIP_SPLIT, 0, NULL)) |
591 | ATH9K_CIPHER_TKIP, NULL) | ||
592 | && ath9k_hw_getcapability(priv->ah, ATH9K_CAP_CIPHER, | ||
593 | ATH9K_CIPHER_MIC, NULL) | ||
594 | && ath9k_hw_getcapability(priv->ah, ATH9K_CAP_TKIP_SPLIT, | ||
595 | 0, NULL)) | ||
596 | common->splitmic = 1; | 588 | common->splitmic = 1; |
597 | 589 | ||
598 | /* turn on mcast key search if possible */ | 590 | /* turn on mcast key search if possible */ |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 5a2e72aaf49..94f12581d0b 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -2260,18 +2260,6 @@ bool ath9k_hw_getcapability(struct ath_hw *ah, enum ath9k_capability_type type, | |||
2260 | { | 2260 | { |
2261 | struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); | 2261 | struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); |
2262 | switch (type) { | 2262 | switch (type) { |
2263 | case ATH9K_CAP_CIPHER: | ||
2264 | switch (capability) { | ||
2265 | case ATH9K_CIPHER_AES_CCM: | ||
2266 | case ATH9K_CIPHER_AES_OCB: | ||
2267 | case ATH9K_CIPHER_TKIP: | ||
2268 | case ATH9K_CIPHER_WEP: | ||
2269 | case ATH9K_CIPHER_MIC: | ||
2270 | case ATH9K_CIPHER_CLR: | ||
2271 | return true; | ||
2272 | default: | ||
2273 | return false; | ||
2274 | } | ||
2275 | case ATH9K_CAP_TKIP_MIC: | 2263 | case ATH9K_CAP_TKIP_MIC: |
2276 | switch (capability) { | 2264 | switch (capability) { |
2277 | case 0: | 2265 | case 0: |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index d60472b4f77..cc01dc8ba8b 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -207,7 +207,6 @@ enum ath9k_hw_caps { | |||
207 | }; | 207 | }; |
208 | 208 | ||
209 | enum ath9k_capability_type { | 209 | enum ath9k_capability_type { |
210 | ATH9K_CAP_CIPHER = 0, | ||
211 | ATH9K_CAP_TKIP_MIC, | 210 | ATH9K_CAP_TKIP_MIC, |
212 | ATH9K_CAP_TKIP_SPLIT, | 211 | ATH9K_CAP_TKIP_SPLIT, |
213 | ATH9K_CAP_TXPOW, | 212 | ATH9K_CAP_TXPOW, |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index e1fa26840a5..8bb866d52e2 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -379,16 +379,13 @@ static void ath9k_init_crypto(struct ath_softc *sc) | |||
379 | for (i = 0; i < common->keymax; i++) | 379 | for (i = 0; i < common->keymax; i++) |
380 | ath9k_hw_keyreset(sc->sc_ah, (u16) i); | 380 | ath9k_hw_keyreset(sc->sc_ah, (u16) i); |
381 | 381 | ||
382 | if (ath9k_hw_getcapability(sc->sc_ah, ATH9K_CAP_CIPHER, | 382 | /* |
383 | ATH9K_CIPHER_TKIP, NULL)) { | 383 | * Whether we should enable h/w TKIP MIC. |
384 | /* | 384 | * XXX: if we don't support WME TKIP MIC, then we wouldn't |
385 | * Whether we should enable h/w TKIP MIC. | 385 | * report WMM capable, so it's always safe to turn on |
386 | * XXX: if we don't support WME TKIP MIC, then we wouldn't | 386 | * TKIP MIC in this case. |
387 | * report WMM capable, so it's always safe to turn on | 387 | */ |
388 | * TKIP MIC in this case. | 388 | ath9k_hw_setcapability(sc->sc_ah, ATH9K_CAP_TKIP_MIC, 0, 1, NULL); |
389 | */ | ||
390 | ath9k_hw_setcapability(sc->sc_ah, ATH9K_CAP_TKIP_MIC, 0, 1, NULL); | ||
391 | } | ||
392 | 389 | ||
393 | /* | 390 | /* |
394 | * Check whether the separate key cache entries | 391 | * Check whether the separate key cache entries |
@@ -396,12 +393,7 @@ static void ath9k_init_crypto(struct ath_softc *sc) | |||
396 | * With split mic keys the number of stations is limited | 393 | * With split mic keys the number of stations is limited |
397 | * to 27 otherwise 59. | 394 | * to 27 otherwise 59. |
398 | */ | 395 | */ |
399 | if (ath9k_hw_getcapability(sc->sc_ah, ATH9K_CAP_CIPHER, | 396 | if (ath9k_hw_getcapability(sc->sc_ah, ATH9K_CAP_TKIP_SPLIT, 0, NULL)) |
400 | ATH9K_CIPHER_TKIP, NULL) | ||
401 | && ath9k_hw_getcapability(sc->sc_ah, ATH9K_CAP_CIPHER, | ||
402 | ATH9K_CIPHER_MIC, NULL) | ||
403 | && ath9k_hw_getcapability(sc->sc_ah, ATH9K_CAP_TKIP_SPLIT, | ||
404 | 0, NULL)) | ||
405 | common->splitmic = 1; | 397 | common->splitmic = 1; |
406 | 398 | ||
407 | /* turn on mcast key search if possible */ | 399 | /* turn on mcast key search if possible */ |