ath9k: Enable WoW only for supported models
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Fri, 21 Jun 2013 05:41:52 +0000 (11:11 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 24 Jun 2013 18:44:24 +0000 (14:44 -0400)
Since platform support is required for WoW, identify and
and enable Wow only for supported cards.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/init.c
drivers/net/wireless/ath/ath9k/pci.c

index 04b2d3ea728f3cff3f9be506fbf18bee9e29f56e..c1224b5a257b86e6d9ab3ee8b7a38fa7d72fe7b3 100644 (file)
@@ -634,6 +634,7 @@ void ath_ant_comb_update(struct ath_softc *sc);
 #define ATH9K_PCI_CUS198 0x0001
 #define ATH9K_PCI_CUS230 0x0002
 #define ATH9K_PCI_CUS217 0x0004
+#define ATH9K_PCI_WOW    0x0008
 
 /*
  * Default cache line size, in bytes.
index 1e555d899469e932b3df36fe56cd42890a68bee1..16f8b201642b71de28ba4920735d0c8a2f5ee8b0 100644 (file)
@@ -837,6 +837,7 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
 
 #ifdef CONFIG_PM_SLEEP
        if ((ah->caps.hw_caps & ATH9K_HW_WOW_DEVICE_CAPABLE) &&
+           (sc->driver_data & ATH9K_PCI_WOW) &&
            device_can_wakeup(sc->dev))
                hw->wiphy->wowlan = &ath9k_wowlan_support;
 
index b096bb2c28c8d3eded648106a878c9b673fb4448..c585c9b359733ff377669ec9ac8f76859e492cda 100644 (file)
@@ -79,6 +79,63 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
                         0x6661),
          .driver_data = ATH9K_PCI_CUS217 },
 
+       /* AR9462 with WoW support */
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+                        0x0034,
+                        PCI_VENDOR_ID_ATHEROS,
+                        0x3117),
+         .driver_data = ATH9K_PCI_WOW },
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+                        0x0034,
+                        PCI_VENDOR_ID_LENOVO,
+                        0x3214),
+         .driver_data = ATH9K_PCI_WOW },
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+                        0x0034,
+                        PCI_VENDOR_ID_ATTANSIC,
+                        0x0091),
+         .driver_data = ATH9K_PCI_WOW },
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+                        0x0034,
+                        PCI_VENDOR_ID_AZWAVE,
+                        0x2110),
+         .driver_data = ATH9K_PCI_WOW },
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+                        0x0034,
+                        PCI_VENDOR_ID_ASUSTEK,
+                        0x850E),
+         .driver_data = ATH9K_PCI_WOW },
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+                        0x0034,
+                        0x11AD, /* LITEON */
+                        0x6631),
+         .driver_data = ATH9K_PCI_WOW },
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+                        0x0034,
+                        0x11AD, /* LITEON */
+                        0x6641),
+         .driver_data = ATH9K_PCI_WOW },
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+                        0x0034,
+                        PCI_VENDOR_ID_HP,
+                        0x1864),
+         .driver_data = ATH9K_PCI_WOW },
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+                        0x0034,
+                        0x14CD, /* USI */
+                        0x0063),
+         .driver_data = ATH9K_PCI_WOW },
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+                        0x0034,
+                        0x14CD, /* USI */
+                        0x0064),
+         .driver_data = ATH9K_PCI_WOW },
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+                        0x0034,
+                        0x10CF, /* Fujitsu */
+                        0x1783),
+         .driver_data = ATH9K_PCI_WOW },
+
        { PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E  AR9462 */
        { PCI_VDEVICE(ATHEROS, 0x0037) }, /* PCI-E  AR1111/AR9485 */
        { PCI_VDEVICE(ATHEROS, 0x0036) }, /* PCI-E  AR9565 */