xref: /linux/drivers/net/wireless/ath/ath9k/pci.c (revision 621cde16e49b3ecf7d59a8106a20aaebfb4a59a9)
1203c4805SLuis R. Rodriguez /*
25b68138eSSujith Manoharan  * Copyright (c) 2008-2011 Atheros Communications Inc.
3203c4805SLuis R. Rodriguez  *
4203c4805SLuis R. Rodriguez  * Permission to use, copy, modify, and/or distribute this software for any
5203c4805SLuis R. Rodriguez  * purpose with or without fee is hereby granted, provided that the above
6203c4805SLuis R. Rodriguez  * copyright notice and this permission notice appear in all copies.
7203c4805SLuis R. Rodriguez  *
8203c4805SLuis R. Rodriguez  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9203c4805SLuis R. Rodriguez  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10203c4805SLuis R. Rodriguez  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11203c4805SLuis R. Rodriguez  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12203c4805SLuis R. Rodriguez  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13203c4805SLuis R. Rodriguez  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14203c4805SLuis R. Rodriguez  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15203c4805SLuis R. Rodriguez  */
16203c4805SLuis R. Rodriguez 
17516304b0SJoe Perches #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
18516304b0SJoe Perches 
19203c4805SLuis R. Rodriguez #include <linux/nl80211.h>
20203c4805SLuis R. Rodriguez #include <linux/pci.h>
219d9779e7SPaul Gortmaker #include <linux/module.h>
22203c4805SLuis R. Rodriguez #include "ath9k.h"
23203c4805SLuis R. Rodriguez 
249baa3c34SBenoit Taine static const struct pci_device_id ath_pci_id_table[] = {
25203c4805SLuis R. Rodriguez 	{ PCI_VDEVICE(ATHEROS, 0x0023) }, /* PCI   */
26203c4805SLuis R. Rodriguez 	{ PCI_VDEVICE(ATHEROS, 0x0024) }, /* PCI-E */
27203c4805SLuis R. Rodriguez 	{ PCI_VDEVICE(ATHEROS, 0x0027) }, /* PCI   */
280f9edcddSVittorio Gambaletta (VittGam) 
290f9edcddSVittorio Gambaletta (VittGam) #ifdef CONFIG_ATH9K_PCOEM
300f9edcddSVittorio Gambaletta (VittGam) 	/* Mini PCI AR9220 MB92 cards: Compex WLM200NX, Wistron DNMA-92 */
310f9edcddSVittorio Gambaletta (VittGam) 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
320f9edcddSVittorio Gambaletta (VittGam) 			 0x0029,
330f9edcddSVittorio Gambaletta (VittGam) 			 PCI_VENDOR_ID_ATHEROS,
340f9edcddSVittorio Gambaletta (VittGam) 			 0x2096),
350f9edcddSVittorio Gambaletta (VittGam) 	  .driver_data = ATH9K_PCI_LED_ACT_HI },
360f9edcddSVittorio Gambaletta (VittGam) #endif
370f9edcddSVittorio Gambaletta (VittGam) 
3879e57dd1SVittorio Gambaletta (VittGam) 	{ PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI   */
39a5354ccaSSujith Manoharan 
40935477edSFelix Fietkau #ifdef CONFIG_ATH9K_PCOEM
41d1ae25a0SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
42d1ae25a0SSujith Manoharan 			 0x002A,
43d1ae25a0SSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
44d1ae25a0SSujith Manoharan 			 0x1C71),
45d1ae25a0SSujith Manoharan 	  .driver_data = ATH9K_PCI_D3_L1_WAR },
46d1ae25a0SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
47d1ae25a0SSujith Manoharan 			 0x002A,
48d1ae25a0SSujith Manoharan 			 PCI_VENDOR_ID_FOXCONN,
49d1ae25a0SSujith Manoharan 			 0xE01F),
50d1ae25a0SSujith Manoharan 	  .driver_data = ATH9K_PCI_D3_L1_WAR },
51d1ae25a0SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
52d1ae25a0SSujith Manoharan 			 0x002A,
53d1ae25a0SSujith Manoharan 			 0x11AD, /* LITEON */
54d1ae25a0SSujith Manoharan 			 0x6632),
55d1ae25a0SSujith Manoharan 	  .driver_data = ATH9K_PCI_D3_L1_WAR },
56d1ae25a0SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
57d1ae25a0SSujith Manoharan 			 0x002A,
58d1ae25a0SSujith Manoharan 			 0x11AD, /* LITEON */
59d1ae25a0SSujith Manoharan 			 0x6642),
60d1ae25a0SSujith Manoharan 	  .driver_data = ATH9K_PCI_D3_L1_WAR },
61d1ae25a0SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
62d1ae25a0SSujith Manoharan 			 0x002A,
63d1ae25a0SSujith Manoharan 			 PCI_VENDOR_ID_QMI,
64d1ae25a0SSujith Manoharan 			 0x0306),
65d1ae25a0SSujith Manoharan 	  .driver_data = ATH9K_PCI_D3_L1_WAR },
66d1ae25a0SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
67d1ae25a0SSujith Manoharan 			 0x002A,
68d1ae25a0SSujith Manoharan 			 0x185F, /* WNC */
69d1ae25a0SSujith Manoharan 			 0x309D),
70d1ae25a0SSujith Manoharan 	  .driver_data = ATH9K_PCI_D3_L1_WAR },
71d1ae25a0SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
72d1ae25a0SSujith Manoharan 			 0x002A,
73d1ae25a0SSujith Manoharan 			 0x10CF, /* Fujitsu */
74d1ae25a0SSujith Manoharan 			 0x147C),
75d1ae25a0SSujith Manoharan 	  .driver_data = ATH9K_PCI_D3_L1_WAR },
76d1ae25a0SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
77d1ae25a0SSujith Manoharan 			 0x002A,
78d1ae25a0SSujith Manoharan 			 0x10CF, /* Fujitsu */
79d1ae25a0SSujith Manoharan 			 0x147D),
80d1ae25a0SSujith Manoharan 	  .driver_data = ATH9K_PCI_D3_L1_WAR },
81d1ae25a0SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
82d1ae25a0SSujith Manoharan 			 0x002A,
83d1ae25a0SSujith Manoharan 			 0x10CF, /* Fujitsu */
84d1ae25a0SSujith Manoharan 			 0x1536),
85d1ae25a0SSujith Manoharan 	  .driver_data = ATH9K_PCI_D3_L1_WAR },
8679e57dd1SVittorio Gambaletta (VittGam) #endif
87d1ae25a0SSujith Manoharan 
8879e57dd1SVittorio Gambaletta (VittGam) 	{ PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */
8979e57dd1SVittorio Gambaletta (VittGam) 
9079e57dd1SVittorio Gambaletta (VittGam) #ifdef CONFIG_ATH9K_PCOEM
91a5354ccaSSujith Manoharan 	/* AR9285 card for Asus */
92a5354ccaSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
93a5354ccaSSujith Manoharan 			 0x002B,
94a5354ccaSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
95a5354ccaSSujith Manoharan 			 0x2C37),
96a5354ccaSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
97935477edSFelix Fietkau #endif
98a5354ccaSSujith Manoharan 
99203c4805SLuis R. Rodriguez 	{ PCI_VDEVICE(ATHEROS, 0x002B) }, /* PCI-E */
1005ffaf8a3SLuis R. Rodriguez 	{ PCI_VDEVICE(ATHEROS, 0x002C) }, /* PCI-E 802.11n bonded out */
101ac88b6ecSVivek Natarajan 	{ PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI   */
102ac88b6ecSVivek Natarajan 	{ PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */
1034dd35640SSujith Manoharan 
1044dd35640SSujith Manoharan 	/* Killer Wireless (3x3) */
1054dd35640SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1064dd35640SSujith Manoharan 			 0x0030,
1074dd35640SSujith Manoharan 			 0x1A56,
1084dd35640SSujith Manoharan 			 0x2000),
1094dd35640SSujith Manoharan 	  .driver_data = ATH9K_PCI_KILLER },
1104dd35640SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1114dd35640SSujith Manoharan 			 0x0030,
1124dd35640SSujith Manoharan 			 0x1A56,
1134dd35640SSujith Manoharan 			 0x2001),
1144dd35640SSujith Manoharan 	  .driver_data = ATH9K_PCI_KILLER },
1154dd35640SSujith Manoharan 
1160efabd51SLuis R. Rodriguez 	{ PCI_VDEVICE(ATHEROS, 0x0030) }, /* PCI-E  AR9300 */
1179b60b64bSSujith Manoharan 
118935477edSFelix Fietkau #ifdef CONFIG_ATH9K_PCOEM
1199b60b64bSSujith Manoharan 	/* PCI-E CUS198 */
1209b60b64bSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1219b60b64bSSujith Manoharan 			 0x0032,
1229b60b64bSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
1239b60b64bSSujith Manoharan 			 0x2086),
124a5354ccaSSujith Manoharan 	  .driver_data = ATH9K_PCI_CUS198 | ATH9K_PCI_BT_ANT_DIV },
1259b60b64bSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1269b60b64bSSujith Manoharan 			 0x0032,
1279b60b64bSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
1289b60b64bSSujith Manoharan 			 0x1237),
129a5354ccaSSujith Manoharan 	  .driver_data = ATH9K_PCI_CUS198 | ATH9K_PCI_BT_ANT_DIV },
1309b60b64bSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1319b60b64bSSujith Manoharan 			 0x0032,
1329b60b64bSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
1339b60b64bSSujith Manoharan 			 0x2126),
134a5354ccaSSujith Manoharan 	  .driver_data = ATH9K_PCI_CUS198 | ATH9K_PCI_BT_ANT_DIV },
135f4d90704SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
136f4d90704SSujith Manoharan 			 0x0032,
137f4d90704SSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
138f4d90704SSujith Manoharan 			 0x126A),
139f4d90704SSujith Manoharan 	  .driver_data = ATH9K_PCI_CUS198 | ATH9K_PCI_BT_ANT_DIV },
140e861ef52SSujith Manoharan 
141e861ef52SSujith Manoharan 	/* PCI-E CUS230 */
1429b60b64bSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1439b60b64bSSujith Manoharan 			 0x0032,
1449b60b64bSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
1459b60b64bSSujith Manoharan 			 0x2152),
146a5354ccaSSujith Manoharan 	  .driver_data = ATH9K_PCI_CUS230 | ATH9K_PCI_BT_ANT_DIV },
1479b60b64bSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1489b60b64bSSujith Manoharan 			 0x0032,
1499b60b64bSSujith Manoharan 			 PCI_VENDOR_ID_FOXCONN,
1509b60b64bSSujith Manoharan 			 0xE075),
151a5354ccaSSujith Manoharan 	  .driver_data = ATH9K_PCI_CUS230 | ATH9K_PCI_BT_ANT_DIV },
1529b60b64bSSujith Manoharan 
1532952f6efSSujith Manoharan 	/* WB225 */
1542952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1552952f6efSSujith Manoharan 			 0x0032,
1562952f6efSSujith Manoharan 			 PCI_VENDOR_ID_ATHEROS,
1572952f6efSSujith Manoharan 			 0x3119),
1582952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
1592952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1602952f6efSSujith Manoharan 			 0x0032,
1612952f6efSSujith Manoharan 			 PCI_VENDOR_ID_ATHEROS,
1622952f6efSSujith Manoharan 			 0x3122),
1632952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
1642952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1652952f6efSSujith Manoharan 			 0x0032,
1662952f6efSSujith Manoharan 			 0x185F, /* WNC */
1672952f6efSSujith Manoharan 			 0x3119),
1682952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
1692952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1702952f6efSSujith Manoharan 			 0x0032,
1712952f6efSSujith Manoharan 			 0x185F, /* WNC */
1722952f6efSSujith Manoharan 			 0x3027),
1732952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
1742952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1752952f6efSSujith Manoharan 			 0x0032,
1762952f6efSSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
1772952f6efSSujith Manoharan 			 0x4105),
1782952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
1792952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1802952f6efSSujith Manoharan 			 0x0032,
1812952f6efSSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
1822952f6efSSujith Manoharan 			 0x4106),
1832952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
1842952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1852952f6efSSujith Manoharan 			 0x0032,
1862952f6efSSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
1872952f6efSSujith Manoharan 			 0x410D),
1882952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
1892952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1902952f6efSSujith Manoharan 			 0x0032,
1912952f6efSSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
1922952f6efSSujith Manoharan 			 0x410E),
1932952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
1942952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
1952952f6efSSujith Manoharan 			 0x0032,
1962952f6efSSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
1972952f6efSSujith Manoharan 			 0x410F),
1982952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
1992952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2002952f6efSSujith Manoharan 			 0x0032,
2012952f6efSSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
2022952f6efSSujith Manoharan 			 0xC706),
2032952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
2042952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2052952f6efSSujith Manoharan 			 0x0032,
2062952f6efSSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
2072952f6efSSujith Manoharan 			 0xC680),
2082952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
2092952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2102952f6efSSujith Manoharan 			 0x0032,
2112952f6efSSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
2122952f6efSSujith Manoharan 			 0xC708),
2132952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
2142952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2152952f6efSSujith Manoharan 			 0x0032,
2162952f6efSSujith Manoharan 			 PCI_VENDOR_ID_LENOVO,
2172952f6efSSujith Manoharan 			 0x3218),
2182952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
2192952f6efSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2202952f6efSSujith Manoharan 			 0x0032,
2212952f6efSSujith Manoharan 			 PCI_VENDOR_ID_LENOVO,
2222952f6efSSujith Manoharan 			 0x3219),
2232952f6efSSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
2242952f6efSSujith Manoharan 
2252d22c7ddSSujith Manoharan 	/* AR9485 cards with PLL power-save disabled by default. */
2262d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2272d22c7ddSSujith Manoharan 			 0x0032,
2282d22c7ddSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
2292d22c7ddSSujith Manoharan 			 0x2C97),
2302d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2312d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2322d22c7ddSSujith Manoharan 			 0x0032,
2332d22c7ddSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
2342d22c7ddSSujith Manoharan 			 0x2100),
2352d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2362d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2372d22c7ddSSujith Manoharan 			 0x0032,
2382d22c7ddSSujith Manoharan 			 0x1C56, /* ASKEY */
2392d22c7ddSSujith Manoharan 			 0x4001),
2402d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2412d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2422d22c7ddSSujith Manoharan 			 0x0032,
2432d22c7ddSSujith Manoharan 			 0x11AD, /* LITEON */
2442d22c7ddSSujith Manoharan 			 0x6627),
2452d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2462d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2472d22c7ddSSujith Manoharan 			 0x0032,
2482d22c7ddSSujith Manoharan 			 0x11AD, /* LITEON */
2492d22c7ddSSujith Manoharan 			 0x6628),
2502d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2512d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2522d22c7ddSSujith Manoharan 			 0x0032,
2532d22c7ddSSujith Manoharan 			 PCI_VENDOR_ID_FOXCONN,
2542d22c7ddSSujith Manoharan 			 0xE04E),
2552d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2562d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2572d22c7ddSSujith Manoharan 			 0x0032,
2582d22c7ddSSujith Manoharan 			 PCI_VENDOR_ID_FOXCONN,
2592d22c7ddSSujith Manoharan 			 0xE04F),
2602d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2612d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2622d22c7ddSSujith Manoharan 			 0x0032,
2632d22c7ddSSujith Manoharan 			 0x144F, /* ASKEY */
2642d22c7ddSSujith Manoharan 			 0x7197),
2652d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2662d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2672d22c7ddSSujith Manoharan 			 0x0032,
2682d22c7ddSSujith Manoharan 			 0x1B9A, /* XAVI */
2692d22c7ddSSujith Manoharan 			 0x2000),
2702d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2712d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2722d22c7ddSSujith Manoharan 			 0x0032,
2732d22c7ddSSujith Manoharan 			 0x1B9A, /* XAVI */
2742d22c7ddSSujith Manoharan 			 0x2001),
2752d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2762d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2772d22c7ddSSujith Manoharan 			 0x0032,
2782d22c7ddSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
2792d22c7ddSSujith Manoharan 			 0x1186),
2802d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2812d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2822d22c7ddSSujith Manoharan 			 0x0032,
2832d22c7ddSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
2842d22c7ddSSujith Manoharan 			 0x1F86),
2852d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2862d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2872d22c7ddSSujith Manoharan 			 0x0032,
2882d22c7ddSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
2892d22c7ddSSujith Manoharan 			 0x1195),
2902d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2912d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2922d22c7ddSSujith Manoharan 			 0x0032,
2932d22c7ddSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
2942d22c7ddSSujith Manoharan 			 0x1F95),
2952d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
2962d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
2972d22c7ddSSujith Manoharan 			 0x0032,
2982d22c7ddSSujith Manoharan 			 0x1B9A, /* XAVI */
2992d22c7ddSSujith Manoharan 			 0x1C00),
3002d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
3012d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
3022d22c7ddSSujith Manoharan 			 0x0032,
3032d22c7ddSSujith Manoharan 			 0x1B9A, /* XAVI */
3042d22c7ddSSujith Manoharan 			 0x1C01),
3052d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
3062d22c7ddSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
3072d22c7ddSSujith Manoharan 			 0x0032,
3082d22c7ddSSujith Manoharan 			 PCI_VENDOR_ID_ASUSTEK,
3092d22c7ddSSujith Manoharan 			 0x850D),
3102d22c7ddSSujith Manoharan 	  .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE },
311935477edSFelix Fietkau #endif
3122d22c7ddSSujith Manoharan 
3131435894dSVasanthakumar Thiagarajan 	{ PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E  AR9485 */
314a508a6eaSLuis R. Rodriguez 	{ PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E  AR9580 */
31512eea640SSujith Manoharan 
316935477edSFelix Fietkau #ifdef CONFIG_ATH9K_PCOEM
31712eea640SSujith Manoharan 	/* PCI-E CUS217 */
31812eea640SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
31912eea640SSujith Manoharan 			 0x0034,
32012eea640SSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
32112eea640SSujith Manoharan 			 0x2116),
32212eea640SSujith Manoharan 	  .driver_data = ATH9K_PCI_CUS217 },
32312eea640SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
32412eea640SSujith Manoharan 			 0x0034,
32512eea640SSujith Manoharan 			 0x11AD, /* LITEON */
32612eea640SSujith Manoharan 			 0x6661),
32712eea640SSujith Manoharan 	  .driver_data = ATH9K_PCI_CUS217 },
32812eea640SSujith Manoharan 
329fca3c21dSSujith Manoharan 	/* AR9462 with WoW support */
330fca3c21dSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
331fca3c21dSSujith Manoharan 			 0x0034,
332fca3c21dSSujith Manoharan 			 PCI_VENDOR_ID_ATHEROS,
333fca3c21dSSujith Manoharan 			 0x3117),
334fca3c21dSSujith Manoharan 	  .driver_data = ATH9K_PCI_WOW },
335fca3c21dSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
336fca3c21dSSujith Manoharan 			 0x0034,
337fca3c21dSSujith Manoharan 			 PCI_VENDOR_ID_LENOVO,
338fca3c21dSSujith Manoharan 			 0x3214),
339fca3c21dSSujith Manoharan 	  .driver_data = ATH9K_PCI_WOW },
340fca3c21dSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
341fca3c21dSSujith Manoharan 			 0x0034,
342fca3c21dSSujith Manoharan 			 PCI_VENDOR_ID_ATTANSIC,
343fca3c21dSSujith Manoharan 			 0x0091),
344fca3c21dSSujith Manoharan 	  .driver_data = ATH9K_PCI_WOW },
345fca3c21dSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
346fca3c21dSSujith Manoharan 			 0x0034,
347fca3c21dSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
348fca3c21dSSujith Manoharan 			 0x2110),
349fca3c21dSSujith Manoharan 	  .driver_data = ATH9K_PCI_WOW },
350fca3c21dSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
351fca3c21dSSujith Manoharan 			 0x0034,
352fca3c21dSSujith Manoharan 			 PCI_VENDOR_ID_ASUSTEK,
353fca3c21dSSujith Manoharan 			 0x850E),
354fca3c21dSSujith Manoharan 	  .driver_data = ATH9K_PCI_WOW },
355fca3c21dSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
356fca3c21dSSujith Manoharan 			 0x0034,
357fca3c21dSSujith Manoharan 			 0x11AD, /* LITEON */
358fca3c21dSSujith Manoharan 			 0x6631),
359fca3c21dSSujith Manoharan 	  .driver_data = ATH9K_PCI_WOW },
360fca3c21dSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
361fca3c21dSSujith Manoharan 			 0x0034,
362fca3c21dSSujith Manoharan 			 0x11AD, /* LITEON */
363fca3c21dSSujith Manoharan 			 0x6641),
364fca3c21dSSujith Manoharan 	  .driver_data = ATH9K_PCI_WOW },
365fca3c21dSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
366fca3c21dSSujith Manoharan 			 0x0034,
367fca3c21dSSujith Manoharan 			 PCI_VENDOR_ID_HP,
368fca3c21dSSujith Manoharan 			 0x1864),
369fca3c21dSSujith Manoharan 	  .driver_data = ATH9K_PCI_WOW },
370fca3c21dSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
371fca3c21dSSujith Manoharan 			 0x0034,
372fca3c21dSSujith Manoharan 			 0x14CD, /* USI */
373fca3c21dSSujith Manoharan 			 0x0063),
374fca3c21dSSujith Manoharan 	  .driver_data = ATH9K_PCI_WOW },
375fca3c21dSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
376fca3c21dSSujith Manoharan 			 0x0034,
377fca3c21dSSujith Manoharan 			 0x14CD, /* USI */
378fca3c21dSSujith Manoharan 			 0x0064),
379fca3c21dSSujith Manoharan 	  .driver_data = ATH9K_PCI_WOW },
380fca3c21dSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
381fca3c21dSSujith Manoharan 			 0x0034,
382fca3c21dSSujith Manoharan 			 0x10CF, /* Fujitsu */
383fca3c21dSSujith Manoharan 			 0x1783),
384fca3c21dSSujith Manoharan 	  .driver_data = ATH9K_PCI_WOW },
385050fd820SDamien Thébault 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
386050fd820SDamien Thébault 			 0x0034,
387050fd820SDamien Thébault 			 PCI_VENDOR_ID_DELL,
388050fd820SDamien Thébault 			 0x020B),
389050fd820SDamien Thébault 	  .driver_data = ATH9K_PCI_WOW },
390129e12a9SRosen Penev 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
391129e12a9SRosen Penev 			 0x0034,
392129e12a9SRosen Penev 			 PCI_VENDOR_ID_DELL,
393129e12a9SRosen Penev 			 0x0300),
394129e12a9SRosen Penev 	  .driver_data = ATH9K_PCI_WOW },
395fca3c21dSSujith Manoharan 
3964dd35640SSujith Manoharan 	/* Killer Wireless (2x2) */
3974dd35640SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
3984dd35640SSujith Manoharan 			 0x0030,
3994dd35640SSujith Manoharan 			 0x1A56,
4004dd35640SSujith Manoharan 			 0x2003),
4014dd35640SSujith Manoharan 	  .driver_data = ATH9K_PCI_KILLER },
4024dd35640SSujith Manoharan 
403423e38e8SRajkumar Manoharan 	{ PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E  AR9462 */
404d4e5979cSMohammed Shafi Shajakhan 	{ PCI_VDEVICE(ATHEROS, 0x0037) }, /* PCI-E  AR1111/AR9485 */
4051823a421SSujith Manoharan 
40610631336SSujith Manoharan 	/* CUS252 */
40710631336SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
40810631336SSujith Manoharan 			 0x0036,
40910631336SSujith Manoharan 			 PCI_VENDOR_ID_ATHEROS,
41010631336SSujith Manoharan 			 0x3028),
4113fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_CUS252 |
4123fcdd0a1SSujith Manoharan 			 ATH9K_PCI_AR9565_2ANT |
4133fcdd0a1SSujith Manoharan 			 ATH9K_PCI_BT_ANT_DIV },
41410631336SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
41510631336SSujith Manoharan 			 0x0036,
41610631336SSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
41710631336SSujith Manoharan 			 0x2176),
4183fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_CUS252 |
4193fcdd0a1SSujith Manoharan 			 ATH9K_PCI_AR9565_2ANT |
4203fcdd0a1SSujith Manoharan 			 ATH9K_PCI_BT_ANT_DIV },
4213fcdd0a1SSujith Manoharan 
4223fcdd0a1SSujith Manoharan 	/* WB335 1-ANT */
4233fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
4243fcdd0a1SSujith Manoharan 			 0x0036,
4253fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_FOXCONN,
4263fcdd0a1SSujith Manoharan 			 0xE068),
4273fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
4283fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
4293fcdd0a1SSujith Manoharan 			 0x0036,
4303fcdd0a1SSujith Manoharan 			 0x185F, /* WNC */
4313fcdd0a1SSujith Manoharan 			 0xA119),
4323fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
4333fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
4343fcdd0a1SSujith Manoharan 			 0x0036,
4353fcdd0a1SSujith Manoharan 			 0x11AD, /* LITEON */
4363fcdd0a1SSujith Manoharan 			 0x0632),
4373fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
4383fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
4393fcdd0a1SSujith Manoharan 			 0x0036,
4403fcdd0a1SSujith Manoharan 			 0x11AD, /* LITEON */
4419c36254cSSujith Manoharan 			 0x06B2),
4429c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
4439c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
4449c36254cSSujith Manoharan 			 0x0036,
4459c36254cSSujith Manoharan 			 0x11AD, /* LITEON */
4469c36254cSSujith Manoharan 			 0x0842),
4479c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
4489c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
4499c36254cSSujith Manoharan 			 0x0036,
4509c36254cSSujith Manoharan 			 0x11AD, /* LITEON */
451edea2acbSSujith Manoharan 			 0x1842),
452edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
453edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
454edea2acbSSujith Manoharan 			 0x0036,
455edea2acbSSujith Manoharan 			 0x11AD, /* LITEON */
4563fcdd0a1SSujith Manoharan 			 0x6671),
4573fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
4583fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
4593fcdd0a1SSujith Manoharan 			 0x0036,
4603fcdd0a1SSujith Manoharan 			 0x1B9A, /* XAVI */
4613fcdd0a1SSujith Manoharan 			 0x2811),
4623fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
4633fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
4643fcdd0a1SSujith Manoharan 			 0x0036,
4653fcdd0a1SSujith Manoharan 			 0x1B9A, /* XAVI */
4663fcdd0a1SSujith Manoharan 			 0x2812),
4673fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
4689c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
4699c36254cSSujith Manoharan 			 0x0036,
4709c36254cSSujith Manoharan 			 0x1B9A, /* XAVI */
4719c36254cSSujith Manoharan 			 0x28A1),
4729c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
4739c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
4749c36254cSSujith Manoharan 			 0x0036,
475edea2acbSSujith Manoharan 			 0x1B9A, /* XAVI */
476edea2acbSSujith Manoharan 			 0x28A3),
477edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
478edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
479edea2acbSSujith Manoharan 			 0x0036,
4809c36254cSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
4819c36254cSSujith Manoharan 			 0x218A),
4829c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
483edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
484edea2acbSSujith Manoharan 			 0x0036,
485edea2acbSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
486edea2acbSSujith Manoharan 			 0x2F8A),
487edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT },
4883fcdd0a1SSujith Manoharan 
4893fcdd0a1SSujith Manoharan 	/* WB335 1-ANT / Antenna Diversity */
4903fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
4913fcdd0a1SSujith Manoharan 			 0x0036,
4923fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_ATHEROS,
4933fcdd0a1SSujith Manoharan 			 0x3025),
4943fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
4953fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
4963fcdd0a1SSujith Manoharan 			 0x0036,
4973fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_ATHEROS,
4983fcdd0a1SSujith Manoharan 			 0x3026),
4993fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
5003fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5013fcdd0a1SSujith Manoharan 			 0x0036,
5023fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_ATHEROS,
5033fcdd0a1SSujith Manoharan 			 0x302B),
5043fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
5053fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5063fcdd0a1SSujith Manoharan 			 0x0036,
5073fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_FOXCONN,
5083fcdd0a1SSujith Manoharan 			 0xE069),
5093fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
5103fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5113fcdd0a1SSujith Manoharan 			 0x0036,
5123fcdd0a1SSujith Manoharan 			 0x185F, /* WNC */
5133fcdd0a1SSujith Manoharan 			 0x3028),
5143fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
5153fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5163fcdd0a1SSujith Manoharan 			 0x0036,
5173fcdd0a1SSujith Manoharan 			 0x11AD, /* LITEON */
5183fcdd0a1SSujith Manoharan 			 0x0622),
5193fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
5203fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5213fcdd0a1SSujith Manoharan 			 0x0036,
5223fcdd0a1SSujith Manoharan 			 0x11AD, /* LITEON */
5233fcdd0a1SSujith Manoharan 			 0x0672),
5243fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
5253fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5263fcdd0a1SSujith Manoharan 			 0x0036,
5273fcdd0a1SSujith Manoharan 			 0x11AD, /* LITEON */
5283fcdd0a1SSujith Manoharan 			 0x0662),
5293fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
5303fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5313fcdd0a1SSujith Manoharan 			 0x0036,
53296581132SSujith Manoharan 			 0x11AD, /* LITEON */
5339c36254cSSujith Manoharan 			 0x06A2),
5349c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
5359c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5369c36254cSSujith Manoharan 			 0x0036,
5379c36254cSSujith Manoharan 			 0x11AD, /* LITEON */
53896581132SSujith Manoharan 			 0x0682),
53996581132SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
54096581132SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
54196581132SSujith Manoharan 			 0x0036,
5423fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
5433fcdd0a1SSujith Manoharan 			 0x213A),
5443fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
5453fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5463fcdd0a1SSujith Manoharan 			 0x0036,
547edea2acbSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
548edea2acbSSujith Manoharan 			 0x213C),
549edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
550edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
551edea2acbSSujith Manoharan 			 0x0036,
5523fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_HP,
5533fcdd0a1SSujith Manoharan 			 0x18E3),
5543fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
5553fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5563fcdd0a1SSujith Manoharan 			 0x0036,
5573fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_HP,
5583fcdd0a1SSujith Manoharan 			 0x217F),
5593fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
560bf7c756cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
561bf7c756cSSujith Manoharan 			 0x0036,
56296581132SSujith Manoharan 			 PCI_VENDOR_ID_HP,
56396581132SSujith Manoharan 			 0x2005),
56496581132SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
56596581132SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
56696581132SSujith Manoharan 			 0x0036,
567bf7c756cSSujith Manoharan 			 PCI_VENDOR_ID_DELL,
5689c36254cSSujith Manoharan 			 0x020C),
569bf7c756cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
5703fcdd0a1SSujith Manoharan 
5719c36254cSSujith Manoharan 	/* WB335 2-ANT / Antenna-Diversity */
5723fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5733fcdd0a1SSujith Manoharan 			 0x0036,
5743fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
5753fcdd0a1SSujith Manoharan 			 0x411A),
5769c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
5773fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5783fcdd0a1SSujith Manoharan 			 0x0036,
5793fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
5803fcdd0a1SSujith Manoharan 			 0x411B),
5819c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
5823fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5833fcdd0a1SSujith Manoharan 			 0x0036,
5843fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
5853fcdd0a1SSujith Manoharan 			 0x411C),
5869c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
5873fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5883fcdd0a1SSujith Manoharan 			 0x0036,
5893fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
5903fcdd0a1SSujith Manoharan 			 0x411D),
5919c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
5923fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5933fcdd0a1SSujith Manoharan 			 0x0036,
5943fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
5953fcdd0a1SSujith Manoharan 			 0x411E),
5969c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
5973fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
5983fcdd0a1SSujith Manoharan 			 0x0036,
599edea2acbSSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
600edea2acbSSujith Manoharan 			 0x4129),
601edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
602edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
603edea2acbSSujith Manoharan 			 0x0036,
604edea2acbSSujith Manoharan 			 PCI_VENDOR_ID_SAMSUNG,
605edea2acbSSujith Manoharan 			 0x412A),
606edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
607edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
608edea2acbSSujith Manoharan 			 0x0036,
6093fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_ATHEROS,
6103fcdd0a1SSujith Manoharan 			 0x3027),
6113fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
6123fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
6133fcdd0a1SSujith Manoharan 			 0x0036,
6143fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_ATHEROS,
6153fcdd0a1SSujith Manoharan 			 0x302C),
6163fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
6173fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
6183fcdd0a1SSujith Manoharan 			 0x0036,
6193fcdd0a1SSujith Manoharan 			 0x11AD, /* LITEON */
6203fcdd0a1SSujith Manoharan 			 0x0642),
6213fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
6223fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
6233fcdd0a1SSujith Manoharan 			 0x0036,
6243fcdd0a1SSujith Manoharan 			 0x11AD, /* LITEON */
6253fcdd0a1SSujith Manoharan 			 0x0652),
6263fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
6273fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
6283fcdd0a1SSujith Manoharan 			 0x0036,
6293fcdd0a1SSujith Manoharan 			 0x11AD, /* LITEON */
6303fcdd0a1SSujith Manoharan 			 0x0612),
6313fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
6323fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
6333fcdd0a1SSujith Manoharan 			 0x0036,
6349c36254cSSujith Manoharan 			 0x11AD, /* LITEON */
6359c36254cSSujith Manoharan 			 0x0832),
6369c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
6379c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
6389c36254cSSujith Manoharan 			 0x0036,
6399c36254cSSujith Manoharan 			 0x11AD, /* LITEON */
640edea2acbSSujith Manoharan 			 0x1832),
641edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
642edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
643edea2acbSSujith Manoharan 			 0x0036,
644edea2acbSSujith Manoharan 			 0x11AD, /* LITEON */
6459c36254cSSujith Manoharan 			 0x0692),
6469c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
6479c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
6489c36254cSSujith Manoharan 			 0x0036,
649edea2acbSSujith Manoharan 			 0x11AD, /* LITEON */
650edea2acbSSujith Manoharan 			 0x0803),
651edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
652edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
653edea2acbSSujith Manoharan 			 0x0036,
654edea2acbSSujith Manoharan 			 0x11AD, /* LITEON */
655edea2acbSSujith Manoharan 			 0x0813),
656edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
657edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
658edea2acbSSujith Manoharan 			 0x0036,
6593fcdd0a1SSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
6603fcdd0a1SSujith Manoharan 			 0x2130),
6613fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
6623fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
6633fcdd0a1SSujith Manoharan 			 0x0036,
6649c36254cSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
6659c36254cSSujith Manoharan 			 0x213B),
6669c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
6679c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
6689c36254cSSujith Manoharan 			 0x0036,
6699c36254cSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
6709c36254cSSujith Manoharan 			 0x2182),
6719c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
6729c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
6739c36254cSSujith Manoharan 			 0x0036,
674edea2acbSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
675edea2acbSSujith Manoharan 			 0x218B),
676edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
677edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
678edea2acbSSujith Manoharan 			 0x0036,
679edea2acbSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
680edea2acbSSujith Manoharan 			 0x218C),
681edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
682edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
683edea2acbSSujith Manoharan 			 0x0036,
684edea2acbSSujith Manoharan 			 PCI_VENDOR_ID_AZWAVE,
685edea2acbSSujith Manoharan 			 0x2F82),
686edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
687edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
688edea2acbSSujith Manoharan 			 0x0036,
6893fcdd0a1SSujith Manoharan 			 0x144F, /* ASKEY */
6903fcdd0a1SSujith Manoharan 			 0x7202),
6913fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
6923fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
6933fcdd0a1SSujith Manoharan 			 0x0036,
6943fcdd0a1SSujith Manoharan 			 0x1B9A, /* XAVI */
6953fcdd0a1SSujith Manoharan 			 0x2810),
6963fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
6973fcdd0a1SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
6983fcdd0a1SSujith Manoharan 			 0x0036,
6999c36254cSSujith Manoharan 			 0x1B9A, /* XAVI */
700edea2acbSSujith Manoharan 			 0x2813),
701edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
702edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
703edea2acbSSujith Manoharan 			 0x0036,
704edea2acbSSujith Manoharan 			 0x1B9A, /* XAVI */
7059c36254cSSujith Manoharan 			 0x28A2),
7069c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
7079c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
7089c36254cSSujith Manoharan 			 0x0036,
709edea2acbSSujith Manoharan 			 0x1B9A, /* XAVI */
710edea2acbSSujith Manoharan 			 0x28A4),
711edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
712edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
713edea2acbSSujith Manoharan 			 0x0036,
7143fcdd0a1SSujith Manoharan 			 0x185F, /* WNC */
7153fcdd0a1SSujith Manoharan 			 0x3027),
7163fcdd0a1SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
71796581132SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
71896581132SSujith Manoharan 			 0x0036,
71996581132SSujith Manoharan 			 0x185F, /* WNC */
72096581132SSujith Manoharan 			 0xA120),
72196581132SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
72296581132SSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
72396581132SSujith Manoharan 			 0x0036,
72496581132SSujith Manoharan 			 PCI_VENDOR_ID_FOXCONN,
72596581132SSujith Manoharan 			 0xE07F),
72696581132SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
7279c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
7289c36254cSSujith Manoharan 			 0x0036,
7299c36254cSSujith Manoharan 			 PCI_VENDOR_ID_FOXCONN,
730edea2acbSSujith Manoharan 			 0xE08F),
731edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
732edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
733edea2acbSSujith Manoharan 			 0x0036,
734edea2acbSSujith Manoharan 			 PCI_VENDOR_ID_FOXCONN,
7359c36254cSSujith Manoharan 			 0xE081),
7369c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
7379c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
7389c36254cSSujith Manoharan 			 0x0036,
739edea2acbSSujith Manoharan 			 PCI_VENDOR_ID_FOXCONN,
740edea2acbSSujith Manoharan 			 0xE091),
741edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
742edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
743edea2acbSSujith Manoharan 			 0x0036,
744edea2acbSSujith Manoharan 			 PCI_VENDOR_ID_FOXCONN,
745edea2acbSSujith Manoharan 			 0xE099),
746edea2acbSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
747edea2acbSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
748edea2acbSSujith Manoharan 			 0x0036,
7499c36254cSSujith Manoharan 			 PCI_VENDOR_ID_LENOVO,
7509c36254cSSujith Manoharan 			 0x3026),
7519c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
7529c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
7539c36254cSSujith Manoharan 			 0x0036,
7549c36254cSSujith Manoharan 			 PCI_VENDOR_ID_LENOVO,
7559c36254cSSujith Manoharan 			 0x4026),
7569c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
7579c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
7589c36254cSSujith Manoharan 			 0x0036,
7599c36254cSSujith Manoharan 			 PCI_VENDOR_ID_ASUSTEK,
7609c36254cSSujith Manoharan 			 0x85F2),
7619c36254cSSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
7629c36254cSSujith Manoharan 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
7639c36254cSSujith Manoharan 			 0x0036,
7649c36254cSSujith Manoharan 			 PCI_VENDOR_ID_DELL,
7659c36254cSSujith Manoharan 			 0x020E),
766aeeb2065SSujith Manoharan 	  .driver_data = ATH9K_PCI_AR9565_2ANT |
767aeeb2065SSujith Manoharan 			 ATH9K_PCI_BT_ANT_DIV |
768aeeb2065SSujith Manoharan 			 ATH9K_PCI_LED_ACT_HI},
76910631336SSujith Manoharan 
7701823a421SSujith Manoharan 	/* PCI-E AR9565 (WB335) */
7711823a421SSujith Manoharan 	{ PCI_VDEVICE(ATHEROS, 0x0036),
7721823a421SSujith Manoharan 	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
773935477edSFelix Fietkau #endif
7741823a421SSujith Manoharan 
775203c4805SLuis R. Rodriguez 	{ 0 }
776203c4805SLuis R. Rodriguez };
777203c4805SLuis R. Rodriguez 
77884c87dc8SStanislaw Gruszka 
779203c4805SLuis R. Rodriguez /* return bus cachesize in 4B word units */
ath_pci_read_cachesize(struct ath_common * common,int * csz)7805bb12791SLuis R. Rodriguez static void ath_pci_read_cachesize(struct ath_common *common, int *csz)
781203c4805SLuis R. Rodriguez {
782*d6e71dd1SWu Yunchuan 	struct ath_softc *sc = common->priv;
783203c4805SLuis R. Rodriguez 	u8 u8tmp;
784203c4805SLuis R. Rodriguez 
785f020979dSVasanthakumar Thiagarajan 	pci_read_config_byte(to_pci_dev(sc->dev), PCI_CACHE_LINE_SIZE, &u8tmp);
786203c4805SLuis R. Rodriguez 	*csz = (int)u8tmp;
787203c4805SLuis R. Rodriguez 
788203c4805SLuis R. Rodriguez 	/*
78925985edcSLucas De Marchi 	 * This check was put in to avoid "unpleasant" consequences if
790203c4805SLuis R. Rodriguez 	 * the bootrom has not fully initialized all PCI devices.
791203c4805SLuis R. Rodriguez 	 * Sometimes the cache line size register is not set
792203c4805SLuis R. Rodriguez 	 */
793203c4805SLuis R. Rodriguez 
794203c4805SLuis R. Rodriguez 	if (*csz == 0)
795203c4805SLuis R. Rodriguez 		*csz = DEFAULT_CACHELINE >> 2;   /* Use the default size */
796203c4805SLuis R. Rodriguez }
797203c4805SLuis R. Rodriguez 
ath_pci_eeprom_read(struct ath_common * common,u32 off,u16 * data)7985bb12791SLuis R. Rodriguez static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data)
799203c4805SLuis R. Rodriguez {
800*d6e71dd1SWu Yunchuan 	struct ath_hw *ah = common->ah;
8015bb12791SLuis R. Rodriguez 
80256398519SMartin Blumenstingl 	common->ops->read(ah, AR5416_EEPROM_OFFSET + (off << AR5416_EEPROM_S));
803203c4805SLuis R. Rodriguez 
804203c4805SLuis R. Rodriguez 	if (!ath9k_hw_wait(ah,
805b3a663f0SWenli Looi 				AR_EEPROM_STATUS_DATA(ah),
806203c4805SLuis R. Rodriguez 				AR_EEPROM_STATUS_DATA_BUSY |
807203c4805SLuis R. Rodriguez 				AR_EEPROM_STATUS_DATA_PROT_ACCESS, 0,
808203c4805SLuis R. Rodriguez 				AH_WAIT_TIMEOUT)) {
809203c4805SLuis R. Rodriguez 		return false;
810203c4805SLuis R. Rodriguez 	}
811203c4805SLuis R. Rodriguez 
812b3a663f0SWenli Looi 	*data = MS(common->ops->read(ah, AR_EEPROM_STATUS_DATA(ah)),
813203c4805SLuis R. Rodriguez 			AR_EEPROM_STATUS_DATA_VAL);
814203c4805SLuis R. Rodriguez 
815203c4805SLuis R. Rodriguez 	return true;
816203c4805SLuis R. Rodriguez }
817203c4805SLuis R. Rodriguez 
81869ce674bSStanislaw Gruszka /* Need to be called after we discover btcoex capabilities */
ath_pci_aspm_init(struct ath_common * common)819d4930086SStanislaw Gruszka static void ath_pci_aspm_init(struct ath_common *common)
820d4930086SStanislaw Gruszka {
821*d6e71dd1SWu Yunchuan 	struct ath_softc *sc = common->priv;
822d4930086SStanislaw Gruszka 	struct ath_hw *ah = sc->sc_ah;
823d4930086SStanislaw Gruszka 	struct pci_dev *pdev = to_pci_dev(sc->dev);
824d4930086SStanislaw Gruszka 	struct pci_dev *parent;
82508bd1080SJiang Liu 	u16 aspm;
8269a8ab2bfSBolarinwa Olayemi Saheed 	int ret;
827d4930086SStanislaw Gruszka 
828d09f5f4cSSujith Manoharan 	if (!ah->is_pciexpress)
829d09f5f4cSSujith Manoharan 		return;
830d09f5f4cSSujith Manoharan 
831d4930086SStanislaw Gruszka 	parent = pdev->bus->self;
83222c55e6eSJohn W. Linville 	if (!parent)
83322c55e6eSJohn W. Linville 		return;
83469ce674bSStanislaw Gruszka 
835046b6802SSujith Manoharan 	if ((ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) &&
836046b6802SSujith Manoharan 	    (AR_SREV_9285(ah))) {
837a875621eSBjorn Helgaas 		/* Bluetooth coexistence requires disabling ASPM. */
83808bd1080SJiang Liu 		pcie_capability_clear_word(pdev, PCI_EXP_LNKCTL,
839a875621eSBjorn Helgaas 			PCI_EXP_LNKCTL_ASPM_L0S | PCI_EXP_LNKCTL_ASPM_L1);
84069ce674bSStanislaw Gruszka 
84169ce674bSStanislaw Gruszka 		/*
84269ce674bSStanislaw Gruszka 		 * Both upstream and downstream PCIe components should
84369ce674bSStanislaw Gruszka 		 * have the same ASPM settings.
84469ce674bSStanislaw Gruszka 		 */
84508bd1080SJiang Liu 		pcie_capability_clear_word(parent, PCI_EXP_LNKCTL,
846a875621eSBjorn Helgaas 			PCI_EXP_LNKCTL_ASPM_L0S | PCI_EXP_LNKCTL_ASPM_L1);
84769ce674bSStanislaw Gruszka 
848d09f5f4cSSujith Manoharan 		ath_info(common, "Disabling ASPM since BTCOEX is enabled\n");
84969ce674bSStanislaw Gruszka 		return;
85069ce674bSStanislaw Gruszka 	}
85169ce674bSStanislaw Gruszka 
852b380a43bSSujith Manoharan 	/*
853b380a43bSSujith Manoharan 	 * 0x70c - Ack Frequency Register.
854b380a43bSSujith Manoharan 	 *
855b380a43bSSujith Manoharan 	 * Bits 27:29 - DEFAULT_L1_ENTRANCE_LATENCY.
856b380a43bSSujith Manoharan 	 *
857b380a43bSSujith Manoharan 	 * 000 : 1 us
858b380a43bSSujith Manoharan 	 * 001 : 2 us
859b380a43bSSujith Manoharan 	 * 010 : 4 us
860b380a43bSSujith Manoharan 	 * 011 : 8 us
861b380a43bSSujith Manoharan 	 * 100 : 16 us
862b380a43bSSujith Manoharan 	 * 101 : 32 us
863b380a43bSSujith Manoharan 	 * 110/111 : 64 us
864b380a43bSSujith Manoharan 	 */
865b380a43bSSujith Manoharan 	if (AR_SREV_9462(ah))
866b380a43bSSujith Manoharan 		pci_read_config_dword(pdev, 0x70c, &ah->config.aspm_l1_fix);
867b380a43bSSujith Manoharan 
8689a8ab2bfSBolarinwa Olayemi Saheed 	ret = pcie_capability_read_word(parent, PCI_EXP_LNKCTL, &aspm);
8699a8ab2bfSBolarinwa Olayemi Saheed 	if (!ret && (aspm & (PCI_EXP_LNKCTL_ASPM_L0S | PCI_EXP_LNKCTL_ASPM_L1))) {
870d4930086SStanislaw Gruszka 		ah->aspm_enabled = true;
871d4930086SStanislaw Gruszka 		/* Initialize PCIe PM and SERDES registers. */
87284c87dc8SStanislaw Gruszka 		ath9k_hw_configpcipowersave(ah, false);
873d09f5f4cSSujith Manoharan 		ath_info(common, "ASPM enabled: 0x%x\n", aspm);
874d4930086SStanislaw Gruszka 	}
875d4930086SStanislaw Gruszka }
876d4930086SStanislaw Gruszka 
87783bd11a0STobias Klauser static const struct ath_bus_ops ath_pci_bus_ops = {
878497ad9adSSujith 	.ath_bus_type = ATH_PCI,
879203c4805SLuis R. Rodriguez 	.read_cachesize = ath_pci_read_cachesize,
880203c4805SLuis R. Rodriguez 	.eeprom_read = ath_pci_eeprom_read,
881d4930086SStanislaw Gruszka 	.aspm_init = ath_pci_aspm_init,
882203c4805SLuis R. Rodriguez };
883203c4805SLuis R. Rodriguez 
ath_pci_probe(struct pci_dev * pdev,const struct pci_device_id * id)884203c4805SLuis R. Rodriguez static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
885203c4805SLuis R. Rodriguez {
886203c4805SLuis R. Rodriguez 	struct ath_softc *sc;
887203c4805SLuis R. Rodriguez 	struct ieee80211_hw *hw;
888203c4805SLuis R. Rodriguez 	u8 csz;
889f0214843SJouni Malinen 	u32 val;
890203c4805SLuis R. Rodriguez 	int ret = 0;
891f934c4d9SLuis R. Rodriguez 	char hw_name[64];
8927368160fSRussell Hu 	int msi_enabled = 0;
893203c4805SLuis R. Rodriguez 
894b81950b1SFelix Fietkau 	if (pcim_enable_device(pdev))
895203c4805SLuis R. Rodriguez 		return -EIO;
896203c4805SLuis R. Rodriguez 
897923a1346SChristophe JAILLET 	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
898203c4805SLuis R. Rodriguez 	if (ret) {
899516304b0SJoe Perches 		pr_err("32-bit DMA not available\n");
900b81950b1SFelix Fietkau 		return ret;
901203c4805SLuis R. Rodriguez 	}
902203c4805SLuis R. Rodriguez 
903203c4805SLuis R. Rodriguez 	/*
904203c4805SLuis R. Rodriguez 	 * Cache line size is used to size and align various
905203c4805SLuis R. Rodriguez 	 * structures used to communicate with the hardware.
906203c4805SLuis R. Rodriguez 	 */
907203c4805SLuis R. Rodriguez 	pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &csz);
908203c4805SLuis R. Rodriguez 	if (csz == 0) {
909203c4805SLuis R. Rodriguez 		/*
910203c4805SLuis R. Rodriguez 		 * Linux 2.4.18 (at least) writes the cache line size
911203c4805SLuis R. Rodriguez 		 * register as a 16-bit wide register which is wrong.
912203c4805SLuis R. Rodriguez 		 * We must have this setup properly for rx buffer
913203c4805SLuis R. Rodriguez 		 * DMA to work so force a reasonable value here if it
914203c4805SLuis R. Rodriguez 		 * comes up zero.
915203c4805SLuis R. Rodriguez 		 */
916203c4805SLuis R. Rodriguez 		csz = L1_CACHE_BYTES / sizeof(u32);
917203c4805SLuis R. Rodriguez 		pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, csz);
918203c4805SLuis R. Rodriguez 	}
919203c4805SLuis R. Rodriguez 	/*
920203c4805SLuis R. Rodriguez 	 * The default setting of latency timer yields poor results,
921203c4805SLuis R. Rodriguez 	 * set it to the value used by other systems. It may be worth
922203c4805SLuis R. Rodriguez 	 * tweaking this setting more.
923203c4805SLuis R. Rodriguez 	 */
924203c4805SLuis R. Rodriguez 	pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xa8);
925203c4805SLuis R. Rodriguez 
926203c4805SLuis R. Rodriguez 	pci_set_master(pdev);
927203c4805SLuis R. Rodriguez 
928f0214843SJouni Malinen 	/*
929f0214843SJouni Malinen 	 * Disable the RETRY_TIMEOUT register (0x41) to keep
930f0214843SJouni Malinen 	 * PCI Tx retries from interfering with C3 CPU state.
931f0214843SJouni Malinen 	 */
932f0214843SJouni Malinen 	pci_read_config_dword(pdev, 0x40, &val);
933f0214843SJouni Malinen 	if ((val & 0x0000ff00) != 0)
934f0214843SJouni Malinen 		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
935f0214843SJouni Malinen 
936b81950b1SFelix Fietkau 	ret = pcim_iomap_regions(pdev, BIT(0), "ath9k");
937203c4805SLuis R. Rodriguez 	if (ret) {
938203c4805SLuis R. Rodriguez 		dev_err(&pdev->dev, "PCI memory region reserve error\n");
939b81950b1SFelix Fietkau 		return -ENODEV;
940203c4805SLuis R. Rodriguez 	}
941203c4805SLuis R. Rodriguez 
94278b21949SFelix Fietkau 	ath9k_fill_chanctx_ops();
9439ac58615SFelix Fietkau 	hw = ieee80211_alloc_hw(sizeof(struct ath_softc), &ath9k_ops);
944db6be53cSLuis R. Rodriguez 	if (!hw) {
945285f2ddaSSujith 		dev_err(&pdev->dev, "No memory for ieee80211_hw\n");
946b81950b1SFelix Fietkau 		return -ENOMEM;
947203c4805SLuis R. Rodriguez 	}
948203c4805SLuis R. Rodriguez 
949203c4805SLuis R. Rodriguez 	SET_IEEE80211_DEV(hw, &pdev->dev);
950203c4805SLuis R. Rodriguez 	pci_set_drvdata(pdev, hw);
951203c4805SLuis R. Rodriguez 
9529ac58615SFelix Fietkau 	sc = hw->priv;
953203c4805SLuis R. Rodriguez 	sc->hw = hw;
954203c4805SLuis R. Rodriguez 	sc->dev = &pdev->dev;
955b81950b1SFelix Fietkau 	sc->mem = pcim_iomap_table(pdev)[0];
9569b60b64bSSujith Manoharan 	sc->driver_data = id->driver_data;
957203c4805SLuis R. Rodriguez 
9587368160fSRussell Hu 	if (ath9k_use_msi) {
9597368160fSRussell Hu 		if (pci_enable_msi(pdev) == 0) {
9607368160fSRussell Hu 			msi_enabled = 1;
9617368160fSRussell Hu 			dev_err(&pdev->dev, "Using MSI\n");
9627368160fSRussell Hu 		} else {
9637368160fSRussell Hu 			dev_err(&pdev->dev, "Using INTx\n");
9647368160fSRussell Hu 		}
9657368160fSRussell Hu 	}
9667368160fSRussell Hu 
9677368160fSRussell Hu 	if (!msi_enabled)
968fc548af8SLuis R. Rodriguez 		ret = request_irq(pdev->irq, ath_isr, IRQF_SHARED, "ath9k", sc);
9697368160fSRussell Hu 	else
9707368160fSRussell Hu 		ret = request_irq(pdev->irq, ath_isr, 0, "ath9k", sc);
9717368160fSRussell Hu 
972580171f7SLuis R. Rodriguez 	if (ret) {
973580171f7SLuis R. Rodriguez 		dev_err(&pdev->dev, "request_irq failed\n");
974285f2ddaSSujith 		goto err_irq;
975203c4805SLuis R. Rodriguez 	}
976203c4805SLuis R. Rodriguez 
977203c4805SLuis R. Rodriguez 	sc->irq = pdev->irq;
978203c4805SLuis R. Rodriguez 
979eb93e891SPavel Roskin 	ret = ath9k_init_device(id->device, sc, &ath_pci_bus_ops);
980285f2ddaSSujith 	if (ret) {
981285f2ddaSSujith 		dev_err(&pdev->dev, "Failed to initialize device\n");
982285f2ddaSSujith 		goto err_init;
983285f2ddaSSujith 	}
984285f2ddaSSujith 
9857368160fSRussell Hu 	sc->sc_ah->msi_enabled = msi_enabled;
9867368160fSRussell Hu 	sc->sc_ah->msi_reg = 0;
9877368160fSRussell Hu 
988285f2ddaSSujith 	ath9k_hw_name(sc->sc_ah, hw_name, sizeof(hw_name));
989061115fbSDongliang Mu 	wiphy_info(hw->wiphy, "%s mem=0x%p, irq=%d\n",
990061115fbSDongliang Mu 		   hw_name, sc->mem, pdev->irq);
991203c4805SLuis R. Rodriguez 
992203c4805SLuis R. Rodriguez 	return 0;
993285f2ddaSSujith 
994285f2ddaSSujith err_init:
995285f2ddaSSujith 	free_irq(sc->irq, sc);
996285f2ddaSSujith err_irq:
997203c4805SLuis R. Rodriguez 	ieee80211_free_hw(hw);
998203c4805SLuis R. Rodriguez 	return ret;
999203c4805SLuis R. Rodriguez }
1000203c4805SLuis R. Rodriguez 
ath_pci_remove(struct pci_dev * pdev)1001203c4805SLuis R. Rodriguez static void ath_pci_remove(struct pci_dev *pdev)
1002203c4805SLuis R. Rodriguez {
1003203c4805SLuis R. Rodriguez 	struct ieee80211_hw *hw = pci_get_drvdata(pdev);
10049ac58615SFelix Fietkau 	struct ath_softc *sc = hw->priv;
1005203c4805SLuis R. Rodriguez 
1006d584747bSRajkumar Manoharan 	if (!is_ath9k_unloaded)
1007d584747bSRajkumar Manoharan 		sc->sc_ah->ah_flags |= AH_UNPLUGGED;
1008285f2ddaSSujith 	ath9k_deinit_device(sc);
1009285f2ddaSSujith 	free_irq(sc->irq, sc);
1010285f2ddaSSujith 	ieee80211_free_hw(sc->hw);
1011203c4805SLuis R. Rodriguez }
1012203c4805SLuis R. Rodriguez 
101388427588SHauke Mehrtens #ifdef CONFIG_PM_SLEEP
1014203c4805SLuis R. Rodriguez 
ath_pci_suspend(struct device * device)1015f0e94b47SRafael J. Wysocki static int ath_pci_suspend(struct device *device)
1016203c4805SLuis R. Rodriguez {
10175d7e4b49SChuhong Yuan 	struct ieee80211_hw *hw = dev_get_drvdata(device);
10189ac58615SFelix Fietkau 	struct ath_softc *sc = hw->priv;
1019249943a2SSujith Manoharan 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
1020203c4805SLuis R. Rodriguez 
1021249943a2SSujith Manoharan 	if (test_bit(ATH_OP_WOW_ENABLED, &common->op_flags)) {
10225d7e4b49SChuhong Yuan 		dev_info(device, "WOW is enabled, bypassing PCI suspend\n");
10234a17a50dSMohammed Shafi Shajakhan 		return 0;
1024249943a2SSujith Manoharan 	}
10254a17a50dSMohammed Shafi Shajakhan 
1026c31eb8e9SRajkumar Manoharan 	/* The device has to be moved to FULLSLEEP forcibly.
1027c31eb8e9SRajkumar Manoharan 	 * Otherwise the chip never moved to full sleep,
1028c31eb8e9SRajkumar Manoharan 	 * when no interface is up.
1029c31eb8e9SRajkumar Manoharan 	 */
1030e19f15acSRajkumar Manoharan 	ath9k_stop_btcoex(sc);
1031c0c11741SFelix Fietkau 	ath9k_hw_disable(sc->sc_ah);
10321c48f988SRajkumar Manoharan 	del_timer_sync(&sc->sleep_timer);
1033c31eb8e9SRajkumar Manoharan 	ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_FULL_SLEEP);
1034c31eb8e9SRajkumar Manoharan 
1035203c4805SLuis R. Rodriguez 	return 0;
1036203c4805SLuis R. Rodriguez }
1037203c4805SLuis R. Rodriguez 
ath_pci_resume(struct device * device)1038f0e94b47SRafael J. Wysocki static int ath_pci_resume(struct device *device)
1039203c4805SLuis R. Rodriguez {
1040f0e94b47SRafael J. Wysocki 	struct pci_dev *pdev = to_pci_dev(device);
104193170516SFelix Fietkau 	struct ieee80211_hw *hw = pci_get_drvdata(pdev);
104293170516SFelix Fietkau 	struct ath_softc *sc = hw->priv;
1043ceb26a60SFelix Fietkau 	struct ath_hw *ah = sc->sc_ah;
1044ceb26a60SFelix Fietkau 	struct ath_common *common = ath9k_hw_common(ah);
1045f0214843SJouni Malinen 	u32 val;
1046523c36fcSSujith 
1047f0214843SJouni Malinen 	/*
1048f0214843SJouni Malinen 	 * Suspend/Resume resets the PCI configuration space, so we have to
1049f0214843SJouni Malinen 	 * re-disable the RETRY_TIMEOUT register (0x41) to keep
1050f0214843SJouni Malinen 	 * PCI Tx retries from interfering with C3 CPU state
1051f0214843SJouni Malinen 	 */
1052f0214843SJouni Malinen 	pci_read_config_dword(pdev, 0x40, &val);
1053f0214843SJouni Malinen 	if ((val & 0x0000ff00) != 0)
1054f0214843SJouni Malinen 		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
1055203c4805SLuis R. Rodriguez 
105693170516SFelix Fietkau 	ath_pci_aspm_init(common);
1057ceb26a60SFelix Fietkau 	ah->reset_power_on = false;
105893170516SFelix Fietkau 
1059203c4805SLuis R. Rodriguez 	return 0;
1060203c4805SLuis R. Rodriguez }
1061203c4805SLuis R. Rodriguez 
106288427588SHauke Mehrtens static SIMPLE_DEV_PM_OPS(ath9k_pm_ops, ath_pci_suspend, ath_pci_resume);
1063f0e94b47SRafael J. Wysocki 
1064f0e94b47SRafael J. Wysocki #define ATH9K_PM_OPS	(&ath9k_pm_ops)
1065f0e94b47SRafael J. Wysocki 
106688427588SHauke Mehrtens #else /* !CONFIG_PM_SLEEP */
1067f0e94b47SRafael J. Wysocki 
1068f0e94b47SRafael J. Wysocki #define ATH9K_PM_OPS	NULL
1069f0e94b47SRafael J. Wysocki 
107088427588SHauke Mehrtens #endif /* !CONFIG_PM_SLEEP */
1071f0e94b47SRafael J. Wysocki 
1072203c4805SLuis R. Rodriguez 
1073203c4805SLuis R. Rodriguez MODULE_DEVICE_TABLE(pci, ath_pci_id_table);
1074203c4805SLuis R. Rodriguez 
1075203c4805SLuis R. Rodriguez static struct pci_driver ath_pci_driver = {
1076203c4805SLuis R. Rodriguez 	.name       = "ath9k",
1077203c4805SLuis R. Rodriguez 	.id_table   = ath_pci_id_table,
1078203c4805SLuis R. Rodriguez 	.probe      = ath_pci_probe,
1079203c4805SLuis R. Rodriguez 	.remove     = ath_pci_remove,
1080f0e94b47SRafael J. Wysocki 	.driver.pm  = ATH9K_PM_OPS,
1081203c4805SLuis R. Rodriguez };
1082203c4805SLuis R. Rodriguez 
ath_pci_init(void)1083203c4805SLuis R. Rodriguez int ath_pci_init(void)
1084203c4805SLuis R. Rodriguez {
1085203c4805SLuis R. Rodriguez 	return pci_register_driver(&ath_pci_driver);
1086203c4805SLuis R. Rodriguez }
1087203c4805SLuis R. Rodriguez 
ath_pci_exit(void)1088203c4805SLuis R. Rodriguez void ath_pci_exit(void)
1089203c4805SLuis R. Rodriguez {
1090203c4805SLuis R. Rodriguez 	pci_unregister_driver(&ath_pci_driver);
1091203c4805SLuis R. Rodriguez }
1092