aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-03-23 15:57:31 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-03-30 14:15:20 -0400
commit6de12a1bcef0145436e815d30a3d48b9fadb199d (patch)
tree8a54c5906d4b74ce85e0e10f247a2b9765a31ae8 /drivers
parentc429bdcf8fe033f04830a960e07c13a01f631499 (diff)
ath9k_hw: remove pCap->keycache_size
Similar to the number of tx queue, the number of keycache entries depends on the chip and shouldn't be messed with based on EEPROM data. Remove this field and stick to using AR_KEYTABLE_SIZE Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_init.c8
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c6
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c8
4 files changed, 2 insertions, 21 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index ca69e7ccfd80..8303b34bdc90 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -564,13 +564,7 @@ static void ath9k_init_crypto(struct ath9k_htc_priv *priv)
564 int i = 0; 564 int i = 0;
565 565
566 /* Get the hardware key cache size. */ 566 /* Get the hardware key cache size. */
567 common->keymax = priv->ah->caps.keycache_size; 567 common->keymax = AR_KEYTABLE_SIZE;
568 if (common->keymax > ATH_KEYMAX) {
569 ath_dbg(common, ATH_DBG_ANY,
570 "Warning, using only %u entries in %u key cache\n",
571 ATH_KEYMAX, common->keymax);
572 common->keymax = ATH_KEYMAX;
573 }
574 568
575 if (priv->ah->misc_mode & AR_PCU_MIC_NEW_LOC_ENA) 569 if (priv->ah->misc_mode & AR_PCU_MIC_NEW_LOC_ENA)
576 common->crypt_caps |= ATH_CRYPT_CAP_MIC_COMBINED; 570 common->crypt_caps |= ATH_CRYPT_CAP_MIC_COMBINED;
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index be2257469ab5..5c676da73fee 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1880,12 +1880,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
1880 else 1880 else
1881 pCap->hw_caps &= ~ATH9K_HW_CAP_HT; 1881 pCap->hw_caps &= ~ATH9K_HW_CAP_HT;
1882 1882
1883 if (capField & AR_EEPROM_EEPCAP_KC_ENTRIES)
1884 pCap->keycache_size =
1885 1 << MS(capField, AR_EEPROM_EEPCAP_KC_ENTRIES);
1886 else
1887 pCap->keycache_size = AR_KEYTABLE_SIZE;
1888
1889 if (AR_SREV_9285(ah) || AR_SREV_9271(ah)) 1883 if (AR_SREV_9285(ah) || AR_SREV_9271(ah))
1890 pCap->tx_triglevel_max = MAX_TX_FIFO_THRESHOLD >> 1; 1884 pCap->tx_triglevel_max = MAX_TX_FIFO_THRESHOLD >> 1;
1891 else 1885 else
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index a255f9a0a698..296e51b6135b 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -191,7 +191,6 @@ enum ath9k_hw_caps {
191 191
192struct ath9k_hw_capabilities { 192struct ath9k_hw_capabilities {
193 u32 hw_caps; /* ATH9K_HW_CAP_* from ath9k_hw_caps */ 193 u32 hw_caps; /* ATH9K_HW_CAP_* from ath9k_hw_caps */
194 u16 keycache_size;
195 u16 low_5ghz_chan, high_5ghz_chan; 194 u16 low_5ghz_chan, high_5ghz_chan;
196 u16 low_2ghz_chan, high_2ghz_chan; 195 u16 low_2ghz_chan, high_2ghz_chan;
197 u16 rts_aggr_limit; 196 u16 rts_aggr_limit;
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index db1b7553c684..1ac8318d82a3 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -407,13 +407,7 @@ void ath9k_init_crypto(struct ath_softc *sc)
407 int i = 0; 407 int i = 0;
408 408
409 /* Get the hardware key cache size. */ 409 /* Get the hardware key cache size. */
410 common->keymax = sc->sc_ah->caps.keycache_size; 410 common->keymax = AR_KEYTABLE_SIZE;
411 if (common->keymax > ATH_KEYMAX) {
412 ath_dbg(common, ATH_DBG_ANY,
413 "Warning, using only %u entries in %u key cache\n",
414 ATH_KEYMAX, common->keymax);
415 common->keymax = ATH_KEYMAX;
416 }
417 411
418 /* 412 /*
419 * Reset the key cache since some parts do not 413 * Reset the key cache since some parts do not