ath9k_hw: remove useless hw capability flags
authorFelix Fietkau <nbd@openwrt.org>
Tue, 14 Sep 2010 18:22:44 +0000 (20:22 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 14 Sep 2010 20:14:27 +0000 (16:14 -0400)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/htc_drv_init.c
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/ath9k/init.c
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/recv.c

index 695e2b088d105c4859aba2892c1305dfa6a5b655..717f2b821f0d6c3819a365df45e94d95b3f9c246 100644 (file)
@@ -601,8 +601,7 @@ static void ath9k_init_misc(struct ath9k_htc_priv *priv)
        common->tx_chainmask = priv->ah->caps.tx_chainmask;
        common->rx_chainmask = priv->ah->caps.rx_chainmask;
 
-       if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK)
-               memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN);
+       memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN);
 
        priv->ah->opmode = NL80211_IFTYPE_STATION;
 }
index 2a6e45a293a90f38b7add877b0ca231c603ebe1b..c99600aff76d463f9caa531a1d64b1e4504c12a7 100644 (file)
@@ -415,8 +415,7 @@ static void ath9k_htc_opmode_init(struct ath9k_htc_priv *priv)
        ath9k_hw_setrxfilter(ah, rfilt);
 
        /* configure bssid mask */
-       if (ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK)
-               ath_hw_setbssidmask(common);
+       ath_hw_setbssidmask(common);
 
        /* configure operational mode */
        ath9k_hw_setopmode(ah);
index 0a61f426d7d7454ae59f9d7da9db580b2394307d..40c6451602d35b966e1e3750e7efe4db1e45c242 100644 (file)
@@ -1574,12 +1574,6 @@ bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
                keyType = AR_KEYTABLE_TYPE_AES;
                break;
        case ATH9K_CIPHER_AES_CCM:
-               if (!(pCap->hw_caps & ATH9K_HW_CAP_CIPHER_AESCCM)) {
-                       ath_print(common, ATH_DBG_ANY,
-                                 "AES-CCM not supported by mac rev 0x%x\n",
-                                 ah->hw_version.macRev);
-                       return false;
-               }
                keyType = AR_KEYTABLE_TYPE_CCM;
                break;
        case ATH9K_CIPHER_TKIP:
@@ -2143,24 +2137,11 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
        pCap->low_5ghz_chan = 4920;
        pCap->high_5ghz_chan = 6100;
 
-       pCap->hw_caps &= ~ATH9K_HW_CAP_CIPHER_CKIP;
-       pCap->hw_caps |= ATH9K_HW_CAP_CIPHER_TKIP;
-       pCap->hw_caps |= ATH9K_HW_CAP_CIPHER_AESCCM;
-
-       pCap->hw_caps &= ~ATH9K_HW_CAP_MIC_CKIP;
-       pCap->hw_caps |= ATH9K_HW_CAP_MIC_TKIP;
-       pCap->hw_caps |= ATH9K_HW_CAP_MIC_AESCCM;
-
        if (ah->config.ht_enable)
                pCap->hw_caps |= ATH9K_HW_CAP_HT;
        else
                pCap->hw_caps &= ~ATH9K_HW_CAP_HT;
 
-       pCap->hw_caps |= ATH9K_HW_CAP_GTT;
-       pCap->hw_caps |= ATH9K_HW_CAP_VEOL;
-       pCap->hw_caps |= ATH9K_HW_CAP_BSSIDMASK;
-       pCap->hw_caps &= ~ATH9K_HW_CAP_MCAST_KEYSEARCH;
-
        if (capField & AR_EEPROM_EEPCAP_MAXQCU)
                pCap->total_queues =
                        MS(capField, AR_EEPROM_EEPCAP_MAXQCU);
@@ -2173,8 +2154,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
        else
                pCap->keycache_size = AR_KEYTABLE_SIZE;
 
-       pCap->hw_caps |= ATH9K_HW_CAP_FASTCC;
-
        if (AR_SREV_9285(ah) || AR_SREV_9271(ah))
                pCap->tx_triglevel_max = MAX_TX_FIFO_THRESHOLD >> 1;
        else
index 1724b17bfc73d9500943d24b0e3e9c2f629016dc..a3c2ce235123dbdfac018bcfabdd8182701e74f5 100644 (file)
@@ -181,30 +181,19 @@ enum wireless_mode {
 };
 
 enum ath9k_hw_caps {
-       ATH9K_HW_CAP_MIC_AESCCM                 = BIT(0),
-       ATH9K_HW_CAP_MIC_CKIP                   = BIT(1),
-       ATH9K_HW_CAP_MIC_TKIP                   = BIT(2),
-       ATH9K_HW_CAP_CIPHER_AESCCM              = BIT(3),
-       ATH9K_HW_CAP_CIPHER_CKIP                = BIT(4),
-       ATH9K_HW_CAP_CIPHER_TKIP                = BIT(5),
-       ATH9K_HW_CAP_VEOL                       = BIT(6),
-       ATH9K_HW_CAP_BSSIDMASK                  = BIT(7),
-       ATH9K_HW_CAP_MCAST_KEYSEARCH            = BIT(8),
-       ATH9K_HW_CAP_HT                         = BIT(9),
-       ATH9K_HW_CAP_GTT                        = BIT(10),
-       ATH9K_HW_CAP_FASTCC                     = BIT(11),
-       ATH9K_HW_CAP_RFSILENT                   = BIT(12),
-       ATH9K_HW_CAP_CST                        = BIT(13),
-       ATH9K_HW_CAP_ENHANCEDPM                 = BIT(14),
-       ATH9K_HW_CAP_AUTOSLEEP                  = BIT(15),
-       ATH9K_HW_CAP_4KB_SPLITTRANS             = BIT(16),
-       ATH9K_HW_CAP_EDMA                       = BIT(17),
-       ATH9K_HW_CAP_RAC_SUPPORTED              = BIT(18),
-       ATH9K_HW_CAP_LDPC                       = BIT(19),
-       ATH9K_HW_CAP_FASTCLOCK                  = BIT(20),
-       ATH9K_HW_CAP_SGI_20                     = BIT(21),
-       ATH9K_HW_CAP_PAPRD                      = BIT(22),
-       ATH9K_HW_CAP_ANT_DIV_COMB               = BIT(23),
+       ATH9K_HW_CAP_HT                         = BIT(0),
+       ATH9K_HW_CAP_RFSILENT                   = BIT(1),
+       ATH9K_HW_CAP_CST                        = BIT(2),
+       ATH9K_HW_CAP_ENHANCEDPM                 = BIT(3),
+       ATH9K_HW_CAP_AUTOSLEEP                  = BIT(4),
+       ATH9K_HW_CAP_4KB_SPLITTRANS             = BIT(5),
+       ATH9K_HW_CAP_EDMA                       = BIT(6),
+       ATH9K_HW_CAP_RAC_SUPPORTED              = BIT(7),
+       ATH9K_HW_CAP_LDPC                       = BIT(8),
+       ATH9K_HW_CAP_FASTCLOCK                  = BIT(9),
+       ATH9K_HW_CAP_SGI_20                     = BIT(10),
+       ATH9K_HW_CAP_PAPRD                      = BIT(11),
+       ATH9K_HW_CAP_ANT_DIV_COMB               = BIT(12),
 };
 
 struct ath9k_hw_capabilities {
index e7c07b3370ccee4a69ded42de4ad87204a49cfa4..5c77a9913e0309fd71b9f75d59a99406b5897cb1 100644 (file)
@@ -522,8 +522,7 @@ static void ath9k_init_misc(struct ath_softc *sc)
        ath9k_hw_set_diversity(sc->sc_ah, true);
        sc->rx.defant = ath9k_hw_getdefantenna(sc->sc_ah);
 
-       if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK)
-               memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN);
+       memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN);
 
        sc->beacon.slottime = ATH9K_SLOT_TIME_9;
 
index d3f96e4520f19953815ee60b12da3bddb7d15f80..a2f7eb2a552bc22e8007b0c4972a644eaa455649 100644 (file)
@@ -1156,8 +1156,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
        else
                ah->imask |= ATH9K_INT_RX;
 
-       if (ah->caps.hw_caps & ATH9K_HW_CAP_GTT)
-               ah->imask |= ATH9K_INT_GTT;
+       ah->imask |= ATH9K_INT_GTT;
 
        if (ah->caps.hw_caps & ATH9K_HW_CAP_HT)
                ah->imask |= ATH9K_INT_CST;
@@ -1379,12 +1378,6 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
 
        mutex_lock(&sc->mutex);
 
-       if (!(ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK) &&
-           sc->nvifs > 0) {
-               ret = -ENOBUFS;
-               goto out;
-       }
-
        switch (vif->type) {
        case NL80211_IFTYPE_STATION:
                ic_opmode = NL80211_IFTYPE_STATION;
@@ -1414,8 +1407,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
 
        sc->nvifs++;
 
-       if (ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK)
-               ath9k_set_bssid_mask(hw, vif);
+       ath9k_set_bssid_mask(hw, vif);
 
        if (sc->nvifs > 1)
                goto out; /* skip global settings for secondary vif */
index b32c8f033d20ecc41933f28f019ec9271eedb86c..6fb3b4536045bebb133be9d5d9a1833ed690ee09 100644 (file)
@@ -119,8 +119,7 @@ static void ath_opmode_init(struct ath_softc *sc)
        ath9k_hw_setrxfilter(ah, rfilt);
 
        /* configure bssid mask */
-       if (ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK)
-               ath_hw_setbssidmask(common);
+       ath_hw_setbssidmask(common);
 
        /* configure operational mode */
        ath9k_hw_setopmode(ah);