Commit 6de12a1b authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville

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: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c429bdcf
...@@ -564,13 +564,7 @@ static void ath9k_init_crypto(struct ath9k_htc_priv *priv) ...@@ -564,13 +564,7 @@ static void ath9k_init_crypto(struct ath9k_htc_priv *priv)
int i = 0; int i = 0;
/* Get the hardware key cache size. */ /* Get the hardware key cache size. */
common->keymax = priv->ah->caps.keycache_size; common->keymax = AR_KEYTABLE_SIZE;
if (common->keymax > ATH_KEYMAX) {
ath_dbg(common, ATH_DBG_ANY,
"Warning, using only %u entries in %u key cache\n",
ATH_KEYMAX, common->keymax);
common->keymax = ATH_KEYMAX;
}
if (priv->ah->misc_mode & AR_PCU_MIC_NEW_LOC_ENA) if (priv->ah->misc_mode & AR_PCU_MIC_NEW_LOC_ENA)
common->crypt_caps |= ATH_CRYPT_CAP_MIC_COMBINED; common->crypt_caps |= ATH_CRYPT_CAP_MIC_COMBINED;
......
...@@ -1880,12 +1880,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) ...@@ -1880,12 +1880,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
else else
pCap->hw_caps &= ~ATH9K_HW_CAP_HT; pCap->hw_caps &= ~ATH9K_HW_CAP_HT;
if (capField & AR_EEPROM_EEPCAP_KC_ENTRIES)
pCap->keycache_size =
1 << MS(capField, AR_EEPROM_EEPCAP_KC_ENTRIES);
else
pCap->keycache_size = AR_KEYTABLE_SIZE;
if (AR_SREV_9285(ah) || AR_SREV_9271(ah)) if (AR_SREV_9285(ah) || AR_SREV_9271(ah))
pCap->tx_triglevel_max = MAX_TX_FIFO_THRESHOLD >> 1; pCap->tx_triglevel_max = MAX_TX_FIFO_THRESHOLD >> 1;
else else
......
...@@ -191,7 +191,6 @@ enum ath9k_hw_caps { ...@@ -191,7 +191,6 @@ enum ath9k_hw_caps {
struct ath9k_hw_capabilities { struct ath9k_hw_capabilities {
u32 hw_caps; /* ATH9K_HW_CAP_* from ath9k_hw_caps */ u32 hw_caps; /* ATH9K_HW_CAP_* from ath9k_hw_caps */
u16 keycache_size;
u16 low_5ghz_chan, high_5ghz_chan; u16 low_5ghz_chan, high_5ghz_chan;
u16 low_2ghz_chan, high_2ghz_chan; u16 low_2ghz_chan, high_2ghz_chan;
u16 rts_aggr_limit; u16 rts_aggr_limit;
......
...@@ -407,13 +407,7 @@ void ath9k_init_crypto(struct ath_softc *sc) ...@@ -407,13 +407,7 @@ void ath9k_init_crypto(struct ath_softc *sc)
int i = 0; int i = 0;
/* Get the hardware key cache size. */ /* Get the hardware key cache size. */
common->keymax = sc->sc_ah->caps.keycache_size; common->keymax = AR_KEYTABLE_SIZE;
if (common->keymax > ATH_KEYMAX) {
ath_dbg(common, ATH_DBG_ANY,
"Warning, using only %u entries in %u key cache\n",
ATH_KEYMAX, common->keymax);
common->keymax = ATH_KEYMAX;
}
/* /*
* Reset the key cache since some parts do not * Reset the key cache since some parts do not
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment