diff options
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9002_hw.c | 29 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_hw.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 46 |
6 files changed, 64 insertions, 25 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c index 8dc2d089cdef..fb61b081d172 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c | |||
@@ -269,13 +269,12 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah, | |||
269 | if (ah->config.pcie_waen & AR_WA_D3_L1_DISABLE) | 269 | if (ah->config.pcie_waen & AR_WA_D3_L1_DISABLE) |
270 | val |= AR_WA_D3_L1_DISABLE; | 270 | val |= AR_WA_D3_L1_DISABLE; |
271 | } else { | 271 | } else { |
272 | if (((AR_SREV_9285(ah) || | 272 | if (AR_SREV_9285(ah) || AR_SREV_9271(ah) || AR_SREV_9287(ah)) { |
273 | AR_SREV_9271(ah) || | 273 | if (AR9285_WA_DEFAULT & AR_WA_D3_L1_DISABLE) |
274 | AR_SREV_9287(ah)) && | 274 | val |= AR_WA_D3_L1_DISABLE; |
275 | (AR9285_WA_DEFAULT & AR_WA_D3_L1_DISABLE)) || | 275 | } else if (AR_SREV_9280(ah)) { |
276 | (AR_SREV_9280(ah) && | 276 | if (AR9280_WA_DEFAULT & AR_WA_D3_L1_DISABLE) |
277 | (AR9280_WA_DEFAULT & AR_WA_D3_L1_DISABLE))) { | 277 | val |= AR_WA_D3_L1_DISABLE; |
278 | val |= AR_WA_D3_L1_DISABLE; | ||
279 | } | 278 | } |
280 | } | 279 | } |
281 | 280 | ||
@@ -297,24 +296,18 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah, | |||
297 | } else { | 296 | } else { |
298 | if (ah->config.pcie_waen) { | 297 | if (ah->config.pcie_waen) { |
299 | val = ah->config.pcie_waen; | 298 | val = ah->config.pcie_waen; |
300 | if (!power_off) | 299 | val &= (~AR_WA_D3_L1_DISABLE); |
301 | val &= (~AR_WA_D3_L1_DISABLE); | ||
302 | } else { | 300 | } else { |
303 | if (AR_SREV_9285(ah) || | 301 | if (AR_SREV_9285(ah) || AR_SREV_9271(ah) || AR_SREV_9287(ah)) { |
304 | AR_SREV_9271(ah) || | ||
305 | AR_SREV_9287(ah)) { | ||
306 | val = AR9285_WA_DEFAULT; | 302 | val = AR9285_WA_DEFAULT; |
307 | if (!power_off) | 303 | val &= (~AR_WA_D3_L1_DISABLE); |
308 | val &= (~AR_WA_D3_L1_DISABLE); | 304 | } else if (AR_SREV_9280(ah)) { |
309 | } | ||
310 | else if (AR_SREV_9280(ah)) { | ||
311 | /* | 305 | /* |
312 | * For AR9280 chips, bit 22 of 0x4004 | 306 | * For AR9280 chips, bit 22 of 0x4004 |
313 | * needs to be set. | 307 | * needs to be set. |
314 | */ | 308 | */ |
315 | val = AR9280_WA_DEFAULT; | 309 | val = AR9280_WA_DEFAULT; |
316 | if (!power_off) | 310 | val &= (~AR_WA_D3_L1_DISABLE); |
317 | val &= (~AR_WA_D3_L1_DISABLE); | ||
318 | } else { | 311 | } else { |
319 | val = AR_WA_DEFAULT; | 312 | val = AR_WA_DEFAULT; |
320 | } | 313 | } |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c index 582cddddddd7..608bb4824e2a 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c | |||
@@ -763,12 +763,7 @@ static void ar9003_hw_configpcipowersave(struct ath_hw *ah, | |||
763 | if (!power_off /* !restore */) { | 763 | if (!power_off /* !restore */) { |
764 | /* set bit 19 to allow forcing of pcie core into L1 state */ | 764 | /* set bit 19 to allow forcing of pcie core into L1 state */ |
765 | REG_SET_BIT(ah, AR_PCIE_PM_CTRL, AR_PCIE_PM_CTRL_ENA); | 765 | REG_SET_BIT(ah, AR_PCIE_PM_CTRL, AR_PCIE_PM_CTRL_ENA); |
766 | 766 | REG_WRITE(ah, AR_WA, ah->WARegVal); | |
767 | /* Several PCIe massages to ensure proper behaviour */ | ||
768 | if (ah->config.pcie_waen) | ||
769 | REG_WRITE(ah, AR_WA, ah->config.pcie_waen); | ||
770 | else | ||
771 | REG_WRITE(ah, AR_WA, ah->WARegVal); | ||
772 | } | 767 | } |
773 | 768 | ||
774 | /* | 769 | /* |
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 8519e75a2e79..2ee35f677c0e 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -631,6 +631,7 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs); | |||
631 | #define ATH9K_PCI_CUS217 0x0004 | 631 | #define ATH9K_PCI_CUS217 0x0004 |
632 | #define ATH9K_PCI_WOW 0x0008 | 632 | #define ATH9K_PCI_WOW 0x0008 |
633 | #define ATH9K_PCI_BT_ANT_DIV 0x0010 | 633 | #define ATH9K_PCI_BT_ANT_DIV 0x0010 |
634 | #define ATH9K_PCI_D3_L1_WAR 0x0020 | ||
634 | 635 | ||
635 | /* | 636 | /* |
636 | * Default cache line size, in bytes. | 637 | * Default cache line size, in bytes. |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index b3a6891fe3d7..2670bf6cb066 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -450,7 +450,6 @@ static void ath9k_hw_init_config(struct ath_hw *ah) | |||
450 | ah->config.ack_6mb = 0x0; | 450 | ah->config.ack_6mb = 0x0; |
451 | ah->config.cwm_ignore_extcca = 0; | 451 | ah->config.cwm_ignore_extcca = 0; |
452 | ah->config.pcie_clock_req = 0; | 452 | ah->config.pcie_clock_req = 0; |
453 | ah->config.pcie_waen = 0; | ||
454 | ah->config.analog_shiftreg = 1; | 453 | ah->config.analog_shiftreg = 1; |
455 | 454 | ||
456 | for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { | 455 | for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) { |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 19b46c7e3616..c9f787dea3f6 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -551,6 +551,11 @@ static void ath9k_init_platform(struct ath_softc *sc) | |||
551 | pCap->hw_caps |= ATH9K_HW_CAP_BT_ANT_DIV; | 551 | pCap->hw_caps |= ATH9K_HW_CAP_BT_ANT_DIV; |
552 | ath_info(common, "Set BT/WLAN RX diversity capability\n"); | 552 | ath_info(common, "Set BT/WLAN RX diversity capability\n"); |
553 | } | 553 | } |
554 | |||
555 | if (sc->driver_data & ATH9K_PCI_D3_L1_WAR) { | ||
556 | ah->config.pcie_waen = 0x0040473b; | ||
557 | ath_info(common, "Enable WAR for ASPM D3/L1\n"); | ||
558 | } | ||
554 | } | 559 | } |
555 | 560 | ||
556 | static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob, | 561 | static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob, |
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index e7996a64a49d..d089a7cf01c4 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -30,6 +30,52 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = { | |||
30 | { PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */ | 30 | { PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */ |
31 | { PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */ | 31 | { PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */ |
32 | 32 | ||
33 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
34 | 0x002A, | ||
35 | PCI_VENDOR_ID_AZWAVE, | ||
36 | 0x1C71), | ||
37 | .driver_data = ATH9K_PCI_D3_L1_WAR }, | ||
38 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
39 | 0x002A, | ||
40 | PCI_VENDOR_ID_FOXCONN, | ||
41 | 0xE01F), | ||
42 | .driver_data = ATH9K_PCI_D3_L1_WAR }, | ||
43 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
44 | 0x002A, | ||
45 | 0x11AD, /* LITEON */ | ||
46 | 0x6632), | ||
47 | .driver_data = ATH9K_PCI_D3_L1_WAR }, | ||
48 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
49 | 0x002A, | ||
50 | 0x11AD, /* LITEON */ | ||
51 | 0x6642), | ||
52 | .driver_data = ATH9K_PCI_D3_L1_WAR }, | ||
53 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
54 | 0x002A, | ||
55 | PCI_VENDOR_ID_QMI, | ||
56 | 0x0306), | ||
57 | .driver_data = ATH9K_PCI_D3_L1_WAR }, | ||
58 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
59 | 0x002A, | ||
60 | 0x185F, /* WNC */ | ||
61 | 0x309D), | ||
62 | .driver_data = ATH9K_PCI_D3_L1_WAR }, | ||
63 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
64 | 0x002A, | ||
65 | 0x10CF, /* Fujitsu */ | ||
66 | 0x147C), | ||
67 | .driver_data = ATH9K_PCI_D3_L1_WAR }, | ||
68 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
69 | 0x002A, | ||
70 | 0x10CF, /* Fujitsu */ | ||
71 | 0x147D), | ||
72 | .driver_data = ATH9K_PCI_D3_L1_WAR }, | ||
73 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | ||
74 | 0x002A, | ||
75 | 0x10CF, /* Fujitsu */ | ||
76 | 0x1536), | ||
77 | .driver_data = ATH9K_PCI_D3_L1_WAR }, | ||
78 | |||
33 | /* AR9285 card for Asus */ | 79 | /* AR9285 card for Asus */ |
34 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, | 80 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, |
35 | 0x002B, | 81 | 0x002B, |