]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ath9k: add support for 802.11n bonded out AR2427
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Tue, 2 Feb 2010 16:58:33 +0000 (11:58 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 2 Feb 2010 21:03:42 +0000 (16:03 -0500)
Some single chip family devices are sold in the market with
802.11n bonded out, these have no hardware capability for
802.11n but ath9k can still support them. These are called
AR2427.

Cc: stable@kernel.org
Reported-by: Rolf Leggewie <bugzilla.kernel.org@rolf.leggewie.biz>
Tested-by: Bernhard Reiter <ockham@raz.or.at>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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/pci.c

index 0b1dd10f1d845837ec82cad4b3fb8adf4fd7f1d9..0b1b88ffa49751eacd49b25894b13eb7363148ab 100644 (file)
@@ -334,7 +334,6 @@ static void ath9k_hw_init_config(struct ath_hw *ah)
        ah->config.pcie_clock_req = 0;
        ah->config.pcie_waen = 0;
        ah->config.analog_shiftreg = 1;
-       ah->config.ht_enable = 1;
        ah->config.ofdm_trig_low = 200;
        ah->config.ofdm_trig_high = 500;
        ah->config.cck_trig_high = 200;
@@ -346,6 +345,11 @@ static void ath9k_hw_init_config(struct ath_hw *ah)
                ah->config.spurchans[i][1] = AR_NO_SPUR;
        }
 
+       if (ah->hw_version.devid != AR2427_DEVID_PCIE)
+               ah->config.ht_enable = 1;
+       else
+               ah->config.ht_enable = 0;
+
        ah->config.rx_intr_mitigation = true;
 
        /*
@@ -542,6 +546,7 @@ static bool ath9k_hw_devid_supported(u16 devid)
        case AR5416_DEVID_AR9287_PCI:
        case AR5416_DEVID_AR9287_PCIE:
        case AR9271_USB:
+       case AR2427_DEVID_PCIE:
                return true;
        default:
                break;
index ab1f1981d857a2a697375f17bad6527ca4ed64c6..dbbf7ca5f97d8a5b7ca60f6e3d193a7435f08d7d 100644 (file)
@@ -40,6 +40,7 @@
 #define AR9280_DEVID_PCI       0x0029
 #define AR9280_DEVID_PCIE      0x002a
 #define AR9285_DEVID_PCIE      0x002b
+#define AR2427_DEVID_PCIE      0x002c
 
 #define AR5416_AR9100_DEVID    0x000b
 
index c3066b553546afea3067209670c5b59e00e35c35..4b5e54848683be97b4e56ee3fa4d9cf47788a024 100644 (file)
@@ -620,11 +620,13 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
        hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
                IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
                IEEE80211_HW_SIGNAL_DBM |
-               IEEE80211_HW_AMPDU_AGGREGATION |
                IEEE80211_HW_SUPPORTS_PS |
                IEEE80211_HW_PS_NULLFUNC_STACK |
                IEEE80211_HW_SPECTRUM_MGMT;
 
+       if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
+                hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION;
+
        if (AR_SREV_9160_10_OR_LATER(sc->sc_ah) || modparam_nohwcrypt)
                hw->flags |= IEEE80211_HW_MFP_CAPABLE;
 
index f2afcbefc076469d923df16531059fb1fcbfd27e..f318b3b1abe981769546a03a0a38af5655c34b96 100644 (file)
@@ -25,6 +25,7 @@ static struct pci_device_id ath_pci_id_table[] __devinitdata = {
        { PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI   */
        { PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */
        { PCI_VDEVICE(ATHEROS, 0x002B) }, /* PCI-E */
+       { PCI_VDEVICE(ATHEROS, 0x002C) }, /* PCI-E 802.11n bonded out */
        { PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI   */
        { PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */
        { 0 }