18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright (c) 2008-2011 Atheros Communications Inc. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any 58c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above 68c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 98c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 108c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 118c2ecf20Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 128c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 138c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 148c2ecf20Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 158c2ecf20Sopenharmony_ci */ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#include <linux/nl80211.h> 208c2ecf20Sopenharmony_ci#include <linux/pci.h> 218c2ecf20Sopenharmony_ci#include <linux/module.h> 228c2ecf20Sopenharmony_ci#include "ath9k.h" 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciextern int ath9k_use_msi; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_cistatic const struct pci_device_id ath_pci_id_table[] = { 278c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x0023) }, /* PCI */ 288c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x0024) }, /* PCI-E */ 298c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x0027) }, /* PCI */ 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#ifdef CONFIG_ATH9K_PCOEM 328c2ecf20Sopenharmony_ci /* Mini PCI AR9220 MB92 cards: Compex WLM200NX, Wistron DNMA-92 */ 338c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 348c2ecf20Sopenharmony_ci 0x0029, 358c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ATHEROS, 368c2ecf20Sopenharmony_ci 0x2096), 378c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_LED_ACT_HI }, 388c2ecf20Sopenharmony_ci#endif 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */ 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#ifdef CONFIG_ATH9K_PCOEM 438c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 448c2ecf20Sopenharmony_ci 0x002A, 458c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 468c2ecf20Sopenharmony_ci 0x1C71), 478c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_D3_L1_WAR }, 488c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 498c2ecf20Sopenharmony_ci 0x002A, 508c2ecf20Sopenharmony_ci PCI_VENDOR_ID_FOXCONN, 518c2ecf20Sopenharmony_ci 0xE01F), 528c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_D3_L1_WAR }, 538c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 548c2ecf20Sopenharmony_ci 0x002A, 558c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 568c2ecf20Sopenharmony_ci 0x6632), 578c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_D3_L1_WAR }, 588c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 598c2ecf20Sopenharmony_ci 0x002A, 608c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 618c2ecf20Sopenharmony_ci 0x6642), 628c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_D3_L1_WAR }, 638c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 648c2ecf20Sopenharmony_ci 0x002A, 658c2ecf20Sopenharmony_ci PCI_VENDOR_ID_QMI, 668c2ecf20Sopenharmony_ci 0x0306), 678c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_D3_L1_WAR }, 688c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 698c2ecf20Sopenharmony_ci 0x002A, 708c2ecf20Sopenharmony_ci 0x185F, /* WNC */ 718c2ecf20Sopenharmony_ci 0x309D), 728c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_D3_L1_WAR }, 738c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 748c2ecf20Sopenharmony_ci 0x002A, 758c2ecf20Sopenharmony_ci 0x10CF, /* Fujitsu */ 768c2ecf20Sopenharmony_ci 0x147C), 778c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_D3_L1_WAR }, 788c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 798c2ecf20Sopenharmony_ci 0x002A, 808c2ecf20Sopenharmony_ci 0x10CF, /* Fujitsu */ 818c2ecf20Sopenharmony_ci 0x147D), 828c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_D3_L1_WAR }, 838c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 848c2ecf20Sopenharmony_ci 0x002A, 858c2ecf20Sopenharmony_ci 0x10CF, /* Fujitsu */ 868c2ecf20Sopenharmony_ci 0x1536), 878c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_D3_L1_WAR }, 888c2ecf20Sopenharmony_ci#endif 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */ 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci#ifdef CONFIG_ATH9K_PCOEM 938c2ecf20Sopenharmony_ci /* AR9285 card for Asus */ 948c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 958c2ecf20Sopenharmony_ci 0x002B, 968c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 978c2ecf20Sopenharmony_ci 0x2C37), 988c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 998c2ecf20Sopenharmony_ci#endif 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x002B) }, /* PCI-E */ 1028c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x002C) }, /* PCI-E 802.11n bonded out */ 1038c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI */ 1048c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */ 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci /* Killer Wireless (3x3) */ 1078c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1088c2ecf20Sopenharmony_ci 0x0030, 1098c2ecf20Sopenharmony_ci 0x1A56, 1108c2ecf20Sopenharmony_ci 0x2000), 1118c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_KILLER }, 1128c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1138c2ecf20Sopenharmony_ci 0x0030, 1148c2ecf20Sopenharmony_ci 0x1A56, 1158c2ecf20Sopenharmony_ci 0x2001), 1168c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_KILLER }, 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x0030) }, /* PCI-E AR9300 */ 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci#ifdef CONFIG_ATH9K_PCOEM 1218c2ecf20Sopenharmony_ci /* PCI-E CUS198 */ 1228c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1238c2ecf20Sopenharmony_ci 0x0032, 1248c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 1258c2ecf20Sopenharmony_ci 0x2086), 1268c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_CUS198 | ATH9K_PCI_BT_ANT_DIV }, 1278c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1288c2ecf20Sopenharmony_ci 0x0032, 1298c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 1308c2ecf20Sopenharmony_ci 0x1237), 1318c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_CUS198 | ATH9K_PCI_BT_ANT_DIV }, 1328c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1338c2ecf20Sopenharmony_ci 0x0032, 1348c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 1358c2ecf20Sopenharmony_ci 0x2126), 1368c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_CUS198 | ATH9K_PCI_BT_ANT_DIV }, 1378c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1388c2ecf20Sopenharmony_ci 0x0032, 1398c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 1408c2ecf20Sopenharmony_ci 0x126A), 1418c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_CUS198 | ATH9K_PCI_BT_ANT_DIV }, 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci /* PCI-E CUS230 */ 1448c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1458c2ecf20Sopenharmony_ci 0x0032, 1468c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 1478c2ecf20Sopenharmony_ci 0x2152), 1488c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_CUS230 | ATH9K_PCI_BT_ANT_DIV }, 1498c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1508c2ecf20Sopenharmony_ci 0x0032, 1518c2ecf20Sopenharmony_ci PCI_VENDOR_ID_FOXCONN, 1528c2ecf20Sopenharmony_ci 0xE075), 1538c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_CUS230 | ATH9K_PCI_BT_ANT_DIV }, 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_ci /* WB225 */ 1568c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1578c2ecf20Sopenharmony_ci 0x0032, 1588c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ATHEROS, 1598c2ecf20Sopenharmony_ci 0x3119), 1608c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 1618c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1628c2ecf20Sopenharmony_ci 0x0032, 1638c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ATHEROS, 1648c2ecf20Sopenharmony_ci 0x3122), 1658c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 1668c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1678c2ecf20Sopenharmony_ci 0x0032, 1688c2ecf20Sopenharmony_ci 0x185F, /* WNC */ 1698c2ecf20Sopenharmony_ci 0x3119), 1708c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 1718c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1728c2ecf20Sopenharmony_ci 0x0032, 1738c2ecf20Sopenharmony_ci 0x185F, /* WNC */ 1748c2ecf20Sopenharmony_ci 0x3027), 1758c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 1768c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1778c2ecf20Sopenharmony_ci 0x0032, 1788c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 1798c2ecf20Sopenharmony_ci 0x4105), 1808c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 1818c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1828c2ecf20Sopenharmony_ci 0x0032, 1838c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 1848c2ecf20Sopenharmony_ci 0x4106), 1858c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 1868c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1878c2ecf20Sopenharmony_ci 0x0032, 1888c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 1898c2ecf20Sopenharmony_ci 0x410D), 1908c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 1918c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1928c2ecf20Sopenharmony_ci 0x0032, 1938c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 1948c2ecf20Sopenharmony_ci 0x410E), 1958c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 1968c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 1978c2ecf20Sopenharmony_ci 0x0032, 1988c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 1998c2ecf20Sopenharmony_ci 0x410F), 2008c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 2018c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2028c2ecf20Sopenharmony_ci 0x0032, 2038c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 2048c2ecf20Sopenharmony_ci 0xC706), 2058c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 2068c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2078c2ecf20Sopenharmony_ci 0x0032, 2088c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 2098c2ecf20Sopenharmony_ci 0xC680), 2108c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 2118c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2128c2ecf20Sopenharmony_ci 0x0032, 2138c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 2148c2ecf20Sopenharmony_ci 0xC708), 2158c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 2168c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2178c2ecf20Sopenharmony_ci 0x0032, 2188c2ecf20Sopenharmony_ci PCI_VENDOR_ID_LENOVO, 2198c2ecf20Sopenharmony_ci 0x3218), 2208c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 2218c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2228c2ecf20Sopenharmony_ci 0x0032, 2238c2ecf20Sopenharmony_ci PCI_VENDOR_ID_LENOVO, 2248c2ecf20Sopenharmony_ci 0x3219), 2258c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_ci /* AR9485 cards with PLL power-save disabled by default. */ 2288c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2298c2ecf20Sopenharmony_ci 0x0032, 2308c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 2318c2ecf20Sopenharmony_ci 0x2C97), 2328c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2338c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2348c2ecf20Sopenharmony_ci 0x0032, 2358c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 2368c2ecf20Sopenharmony_ci 0x2100), 2378c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2388c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2398c2ecf20Sopenharmony_ci 0x0032, 2408c2ecf20Sopenharmony_ci 0x1C56, /* ASKEY */ 2418c2ecf20Sopenharmony_ci 0x4001), 2428c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2438c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2448c2ecf20Sopenharmony_ci 0x0032, 2458c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 2468c2ecf20Sopenharmony_ci 0x6627), 2478c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2488c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2498c2ecf20Sopenharmony_ci 0x0032, 2508c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 2518c2ecf20Sopenharmony_ci 0x6628), 2528c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2538c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2548c2ecf20Sopenharmony_ci 0x0032, 2558c2ecf20Sopenharmony_ci PCI_VENDOR_ID_FOXCONN, 2568c2ecf20Sopenharmony_ci 0xE04E), 2578c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2588c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2598c2ecf20Sopenharmony_ci 0x0032, 2608c2ecf20Sopenharmony_ci PCI_VENDOR_ID_FOXCONN, 2618c2ecf20Sopenharmony_ci 0xE04F), 2628c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2638c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2648c2ecf20Sopenharmony_ci 0x0032, 2658c2ecf20Sopenharmony_ci 0x144F, /* ASKEY */ 2668c2ecf20Sopenharmony_ci 0x7197), 2678c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2688c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2698c2ecf20Sopenharmony_ci 0x0032, 2708c2ecf20Sopenharmony_ci 0x1B9A, /* XAVI */ 2718c2ecf20Sopenharmony_ci 0x2000), 2728c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2738c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2748c2ecf20Sopenharmony_ci 0x0032, 2758c2ecf20Sopenharmony_ci 0x1B9A, /* XAVI */ 2768c2ecf20Sopenharmony_ci 0x2001), 2778c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2788c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2798c2ecf20Sopenharmony_ci 0x0032, 2808c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 2818c2ecf20Sopenharmony_ci 0x1186), 2828c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2838c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2848c2ecf20Sopenharmony_ci 0x0032, 2858c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 2868c2ecf20Sopenharmony_ci 0x1F86), 2878c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2888c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2898c2ecf20Sopenharmony_ci 0x0032, 2908c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 2918c2ecf20Sopenharmony_ci 0x1195), 2928c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2938c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2948c2ecf20Sopenharmony_ci 0x0032, 2958c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 2968c2ecf20Sopenharmony_ci 0x1F95), 2978c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 2988c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 2998c2ecf20Sopenharmony_ci 0x0032, 3008c2ecf20Sopenharmony_ci 0x1B9A, /* XAVI */ 3018c2ecf20Sopenharmony_ci 0x1C00), 3028c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 3038c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3048c2ecf20Sopenharmony_ci 0x0032, 3058c2ecf20Sopenharmony_ci 0x1B9A, /* XAVI */ 3068c2ecf20Sopenharmony_ci 0x1C01), 3078c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 3088c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3098c2ecf20Sopenharmony_ci 0x0032, 3108c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ASUSTEK, 3118c2ecf20Sopenharmony_ci 0x850D), 3128c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_NO_PLL_PWRSAVE }, 3138c2ecf20Sopenharmony_ci#endif 3148c2ecf20Sopenharmony_ci 3158c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E AR9485 */ 3168c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E AR9580 */ 3178c2ecf20Sopenharmony_ci 3188c2ecf20Sopenharmony_ci#ifdef CONFIG_ATH9K_PCOEM 3198c2ecf20Sopenharmony_ci /* PCI-E CUS217 */ 3208c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3218c2ecf20Sopenharmony_ci 0x0034, 3228c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 3238c2ecf20Sopenharmony_ci 0x2116), 3248c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_CUS217 }, 3258c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3268c2ecf20Sopenharmony_ci 0x0034, 3278c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 3288c2ecf20Sopenharmony_ci 0x6661), 3298c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_CUS217 }, 3308c2ecf20Sopenharmony_ci 3318c2ecf20Sopenharmony_ci /* AR9462 with WoW support */ 3328c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3338c2ecf20Sopenharmony_ci 0x0034, 3348c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ATHEROS, 3358c2ecf20Sopenharmony_ci 0x3117), 3368c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3378c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3388c2ecf20Sopenharmony_ci 0x0034, 3398c2ecf20Sopenharmony_ci PCI_VENDOR_ID_LENOVO, 3408c2ecf20Sopenharmony_ci 0x3214), 3418c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3428c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3438c2ecf20Sopenharmony_ci 0x0034, 3448c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ATTANSIC, 3458c2ecf20Sopenharmony_ci 0x0091), 3468c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3478c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3488c2ecf20Sopenharmony_ci 0x0034, 3498c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 3508c2ecf20Sopenharmony_ci 0x2110), 3518c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3528c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3538c2ecf20Sopenharmony_ci 0x0034, 3548c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ASUSTEK, 3558c2ecf20Sopenharmony_ci 0x850E), 3568c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3578c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3588c2ecf20Sopenharmony_ci 0x0034, 3598c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 3608c2ecf20Sopenharmony_ci 0x6631), 3618c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3628c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3638c2ecf20Sopenharmony_ci 0x0034, 3648c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 3658c2ecf20Sopenharmony_ci 0x6641), 3668c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3678c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3688c2ecf20Sopenharmony_ci 0x0034, 3698c2ecf20Sopenharmony_ci PCI_VENDOR_ID_HP, 3708c2ecf20Sopenharmony_ci 0x1864), 3718c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3728c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3738c2ecf20Sopenharmony_ci 0x0034, 3748c2ecf20Sopenharmony_ci 0x14CD, /* USI */ 3758c2ecf20Sopenharmony_ci 0x0063), 3768c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3778c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3788c2ecf20Sopenharmony_ci 0x0034, 3798c2ecf20Sopenharmony_ci 0x14CD, /* USI */ 3808c2ecf20Sopenharmony_ci 0x0064), 3818c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3828c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3838c2ecf20Sopenharmony_ci 0x0034, 3848c2ecf20Sopenharmony_ci 0x10CF, /* Fujitsu */ 3858c2ecf20Sopenharmony_ci 0x1783), 3868c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3878c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3888c2ecf20Sopenharmony_ci 0x0034, 3898c2ecf20Sopenharmony_ci PCI_VENDOR_ID_DELL, 3908c2ecf20Sopenharmony_ci 0x020B), 3918c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3928c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 3938c2ecf20Sopenharmony_ci 0x0034, 3948c2ecf20Sopenharmony_ci PCI_VENDOR_ID_DELL, 3958c2ecf20Sopenharmony_ci 0x0300), 3968c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_WOW }, 3978c2ecf20Sopenharmony_ci 3988c2ecf20Sopenharmony_ci /* Killer Wireless (2x2) */ 3998c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4008c2ecf20Sopenharmony_ci 0x0030, 4018c2ecf20Sopenharmony_ci 0x1A56, 4028c2ecf20Sopenharmony_ci 0x2003), 4038c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_KILLER }, 4048c2ecf20Sopenharmony_ci 4058c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E AR9462 */ 4068c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x0037) }, /* PCI-E AR1111/AR9485 */ 4078c2ecf20Sopenharmony_ci 4088c2ecf20Sopenharmony_ci /* CUS252 */ 4098c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4108c2ecf20Sopenharmony_ci 0x0036, 4118c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ATHEROS, 4128c2ecf20Sopenharmony_ci 0x3028), 4138c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_CUS252 | 4148c2ecf20Sopenharmony_ci ATH9K_PCI_AR9565_2ANT | 4158c2ecf20Sopenharmony_ci ATH9K_PCI_BT_ANT_DIV }, 4168c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4178c2ecf20Sopenharmony_ci 0x0036, 4188c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 4198c2ecf20Sopenharmony_ci 0x2176), 4208c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_CUS252 | 4218c2ecf20Sopenharmony_ci ATH9K_PCI_AR9565_2ANT | 4228c2ecf20Sopenharmony_ci ATH9K_PCI_BT_ANT_DIV }, 4238c2ecf20Sopenharmony_ci 4248c2ecf20Sopenharmony_ci /* WB335 1-ANT */ 4258c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4268c2ecf20Sopenharmony_ci 0x0036, 4278c2ecf20Sopenharmony_ci PCI_VENDOR_ID_FOXCONN, 4288c2ecf20Sopenharmony_ci 0xE068), 4298c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4308c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4318c2ecf20Sopenharmony_ci 0x0036, 4328c2ecf20Sopenharmony_ci 0x185F, /* WNC */ 4338c2ecf20Sopenharmony_ci 0xA119), 4348c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4358c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4368c2ecf20Sopenharmony_ci 0x0036, 4378c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 4388c2ecf20Sopenharmony_ci 0x0632), 4398c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4408c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4418c2ecf20Sopenharmony_ci 0x0036, 4428c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 4438c2ecf20Sopenharmony_ci 0x06B2), 4448c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4458c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4468c2ecf20Sopenharmony_ci 0x0036, 4478c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 4488c2ecf20Sopenharmony_ci 0x0842), 4498c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4508c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4518c2ecf20Sopenharmony_ci 0x0036, 4528c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 4538c2ecf20Sopenharmony_ci 0x1842), 4548c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4558c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4568c2ecf20Sopenharmony_ci 0x0036, 4578c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 4588c2ecf20Sopenharmony_ci 0x6671), 4598c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4608c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4618c2ecf20Sopenharmony_ci 0x0036, 4628c2ecf20Sopenharmony_ci 0x1B9A, /* XAVI */ 4638c2ecf20Sopenharmony_ci 0x2811), 4648c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4658c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4668c2ecf20Sopenharmony_ci 0x0036, 4678c2ecf20Sopenharmony_ci 0x1B9A, /* XAVI */ 4688c2ecf20Sopenharmony_ci 0x2812), 4698c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4708c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4718c2ecf20Sopenharmony_ci 0x0036, 4728c2ecf20Sopenharmony_ci 0x1B9A, /* XAVI */ 4738c2ecf20Sopenharmony_ci 0x28A1), 4748c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4758c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4768c2ecf20Sopenharmony_ci 0x0036, 4778c2ecf20Sopenharmony_ci 0x1B9A, /* XAVI */ 4788c2ecf20Sopenharmony_ci 0x28A3), 4798c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4808c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4818c2ecf20Sopenharmony_ci 0x0036, 4828c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 4838c2ecf20Sopenharmony_ci 0x218A), 4848c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4858c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4868c2ecf20Sopenharmony_ci 0x0036, 4878c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 4888c2ecf20Sopenharmony_ci 0x2F8A), 4898c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT }, 4908c2ecf20Sopenharmony_ci 4918c2ecf20Sopenharmony_ci /* WB335 1-ANT / Antenna Diversity */ 4928c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4938c2ecf20Sopenharmony_ci 0x0036, 4948c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ATHEROS, 4958c2ecf20Sopenharmony_ci 0x3025), 4968c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 4978c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 4988c2ecf20Sopenharmony_ci 0x0036, 4998c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ATHEROS, 5008c2ecf20Sopenharmony_ci 0x3026), 5018c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5028c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5038c2ecf20Sopenharmony_ci 0x0036, 5048c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ATHEROS, 5058c2ecf20Sopenharmony_ci 0x302B), 5068c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5078c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5088c2ecf20Sopenharmony_ci 0x0036, 5098c2ecf20Sopenharmony_ci PCI_VENDOR_ID_FOXCONN, 5108c2ecf20Sopenharmony_ci 0xE069), 5118c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5128c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5138c2ecf20Sopenharmony_ci 0x0036, 5148c2ecf20Sopenharmony_ci 0x185F, /* WNC */ 5158c2ecf20Sopenharmony_ci 0x3028), 5168c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5178c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5188c2ecf20Sopenharmony_ci 0x0036, 5198c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 5208c2ecf20Sopenharmony_ci 0x0622), 5218c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5228c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5238c2ecf20Sopenharmony_ci 0x0036, 5248c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 5258c2ecf20Sopenharmony_ci 0x0672), 5268c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5278c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5288c2ecf20Sopenharmony_ci 0x0036, 5298c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 5308c2ecf20Sopenharmony_ci 0x0662), 5318c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5328c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5338c2ecf20Sopenharmony_ci 0x0036, 5348c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 5358c2ecf20Sopenharmony_ci 0x06A2), 5368c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5378c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5388c2ecf20Sopenharmony_ci 0x0036, 5398c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 5408c2ecf20Sopenharmony_ci 0x0682), 5418c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5428c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5438c2ecf20Sopenharmony_ci 0x0036, 5448c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 5458c2ecf20Sopenharmony_ci 0x213A), 5468c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5478c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5488c2ecf20Sopenharmony_ci 0x0036, 5498c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 5508c2ecf20Sopenharmony_ci 0x213C), 5518c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5528c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5538c2ecf20Sopenharmony_ci 0x0036, 5548c2ecf20Sopenharmony_ci PCI_VENDOR_ID_HP, 5558c2ecf20Sopenharmony_ci 0x18E3), 5568c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5578c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5588c2ecf20Sopenharmony_ci 0x0036, 5598c2ecf20Sopenharmony_ci PCI_VENDOR_ID_HP, 5608c2ecf20Sopenharmony_ci 0x217F), 5618c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5628c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5638c2ecf20Sopenharmony_ci 0x0036, 5648c2ecf20Sopenharmony_ci PCI_VENDOR_ID_HP, 5658c2ecf20Sopenharmony_ci 0x2005), 5668c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5678c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5688c2ecf20Sopenharmony_ci 0x0036, 5698c2ecf20Sopenharmony_ci PCI_VENDOR_ID_DELL, 5708c2ecf20Sopenharmony_ci 0x020C), 5718c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV }, 5728c2ecf20Sopenharmony_ci 5738c2ecf20Sopenharmony_ci /* WB335 2-ANT / Antenna-Diversity */ 5748c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5758c2ecf20Sopenharmony_ci 0x0036, 5768c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 5778c2ecf20Sopenharmony_ci 0x411A), 5788c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 5798c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5808c2ecf20Sopenharmony_ci 0x0036, 5818c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 5828c2ecf20Sopenharmony_ci 0x411B), 5838c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 5848c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5858c2ecf20Sopenharmony_ci 0x0036, 5868c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 5878c2ecf20Sopenharmony_ci 0x411C), 5888c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 5898c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5908c2ecf20Sopenharmony_ci 0x0036, 5918c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 5928c2ecf20Sopenharmony_ci 0x411D), 5938c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 5948c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 5958c2ecf20Sopenharmony_ci 0x0036, 5968c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 5978c2ecf20Sopenharmony_ci 0x411E), 5988c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 5998c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6008c2ecf20Sopenharmony_ci 0x0036, 6018c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 6028c2ecf20Sopenharmony_ci 0x4129), 6038c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6048c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6058c2ecf20Sopenharmony_ci 0x0036, 6068c2ecf20Sopenharmony_ci PCI_VENDOR_ID_SAMSUNG, 6078c2ecf20Sopenharmony_ci 0x412A), 6088c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6098c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6108c2ecf20Sopenharmony_ci 0x0036, 6118c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ATHEROS, 6128c2ecf20Sopenharmony_ci 0x3027), 6138c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6148c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6158c2ecf20Sopenharmony_ci 0x0036, 6168c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ATHEROS, 6178c2ecf20Sopenharmony_ci 0x302C), 6188c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6198c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6208c2ecf20Sopenharmony_ci 0x0036, 6218c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 6228c2ecf20Sopenharmony_ci 0x0642), 6238c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6248c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6258c2ecf20Sopenharmony_ci 0x0036, 6268c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 6278c2ecf20Sopenharmony_ci 0x0652), 6288c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6298c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6308c2ecf20Sopenharmony_ci 0x0036, 6318c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 6328c2ecf20Sopenharmony_ci 0x0612), 6338c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6348c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6358c2ecf20Sopenharmony_ci 0x0036, 6368c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 6378c2ecf20Sopenharmony_ci 0x0832), 6388c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6398c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6408c2ecf20Sopenharmony_ci 0x0036, 6418c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 6428c2ecf20Sopenharmony_ci 0x1832), 6438c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6448c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6458c2ecf20Sopenharmony_ci 0x0036, 6468c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 6478c2ecf20Sopenharmony_ci 0x0692), 6488c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6498c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6508c2ecf20Sopenharmony_ci 0x0036, 6518c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 6528c2ecf20Sopenharmony_ci 0x0803), 6538c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6548c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6558c2ecf20Sopenharmony_ci 0x0036, 6568c2ecf20Sopenharmony_ci 0x11AD, /* LITEON */ 6578c2ecf20Sopenharmony_ci 0x0813), 6588c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6598c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6608c2ecf20Sopenharmony_ci 0x0036, 6618c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 6628c2ecf20Sopenharmony_ci 0x2130), 6638c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6648c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6658c2ecf20Sopenharmony_ci 0x0036, 6668c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 6678c2ecf20Sopenharmony_ci 0x213B), 6688c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6698c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6708c2ecf20Sopenharmony_ci 0x0036, 6718c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 6728c2ecf20Sopenharmony_ci 0x2182), 6738c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6748c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6758c2ecf20Sopenharmony_ci 0x0036, 6768c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 6778c2ecf20Sopenharmony_ci 0x218B), 6788c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6798c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6808c2ecf20Sopenharmony_ci 0x0036, 6818c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 6828c2ecf20Sopenharmony_ci 0x218C), 6838c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6848c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6858c2ecf20Sopenharmony_ci 0x0036, 6868c2ecf20Sopenharmony_ci PCI_VENDOR_ID_AZWAVE, 6878c2ecf20Sopenharmony_ci 0x2F82), 6888c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6898c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6908c2ecf20Sopenharmony_ci 0x0036, 6918c2ecf20Sopenharmony_ci 0x144F, /* ASKEY */ 6928c2ecf20Sopenharmony_ci 0x7202), 6938c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6948c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 6958c2ecf20Sopenharmony_ci 0x0036, 6968c2ecf20Sopenharmony_ci 0x1B9A, /* XAVI */ 6978c2ecf20Sopenharmony_ci 0x2810), 6988c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 6998c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7008c2ecf20Sopenharmony_ci 0x0036, 7018c2ecf20Sopenharmony_ci 0x1B9A, /* XAVI */ 7028c2ecf20Sopenharmony_ci 0x2813), 7038c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7048c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7058c2ecf20Sopenharmony_ci 0x0036, 7068c2ecf20Sopenharmony_ci 0x1B9A, /* XAVI */ 7078c2ecf20Sopenharmony_ci 0x28A2), 7088c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7098c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7108c2ecf20Sopenharmony_ci 0x0036, 7118c2ecf20Sopenharmony_ci 0x1B9A, /* XAVI */ 7128c2ecf20Sopenharmony_ci 0x28A4), 7138c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7148c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7158c2ecf20Sopenharmony_ci 0x0036, 7168c2ecf20Sopenharmony_ci 0x185F, /* WNC */ 7178c2ecf20Sopenharmony_ci 0x3027), 7188c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7198c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7208c2ecf20Sopenharmony_ci 0x0036, 7218c2ecf20Sopenharmony_ci 0x185F, /* WNC */ 7228c2ecf20Sopenharmony_ci 0xA120), 7238c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7248c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7258c2ecf20Sopenharmony_ci 0x0036, 7268c2ecf20Sopenharmony_ci PCI_VENDOR_ID_FOXCONN, 7278c2ecf20Sopenharmony_ci 0xE07F), 7288c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7298c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7308c2ecf20Sopenharmony_ci 0x0036, 7318c2ecf20Sopenharmony_ci PCI_VENDOR_ID_FOXCONN, 7328c2ecf20Sopenharmony_ci 0xE08F), 7338c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7348c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7358c2ecf20Sopenharmony_ci 0x0036, 7368c2ecf20Sopenharmony_ci PCI_VENDOR_ID_FOXCONN, 7378c2ecf20Sopenharmony_ci 0xE081), 7388c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7398c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7408c2ecf20Sopenharmony_ci 0x0036, 7418c2ecf20Sopenharmony_ci PCI_VENDOR_ID_FOXCONN, 7428c2ecf20Sopenharmony_ci 0xE091), 7438c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7448c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7458c2ecf20Sopenharmony_ci 0x0036, 7468c2ecf20Sopenharmony_ci PCI_VENDOR_ID_FOXCONN, 7478c2ecf20Sopenharmony_ci 0xE099), 7488c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7498c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7508c2ecf20Sopenharmony_ci 0x0036, 7518c2ecf20Sopenharmony_ci PCI_VENDOR_ID_LENOVO, 7528c2ecf20Sopenharmony_ci 0x3026), 7538c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7548c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7558c2ecf20Sopenharmony_ci 0x0036, 7568c2ecf20Sopenharmony_ci PCI_VENDOR_ID_LENOVO, 7578c2ecf20Sopenharmony_ci 0x4026), 7588c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7598c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7608c2ecf20Sopenharmony_ci 0x0036, 7618c2ecf20Sopenharmony_ci PCI_VENDOR_ID_ASUSTEK, 7628c2ecf20Sopenharmony_ci 0x85F2), 7638c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV }, 7648c2ecf20Sopenharmony_ci { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 7658c2ecf20Sopenharmony_ci 0x0036, 7668c2ecf20Sopenharmony_ci PCI_VENDOR_ID_DELL, 7678c2ecf20Sopenharmony_ci 0x020E), 7688c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_AR9565_2ANT | 7698c2ecf20Sopenharmony_ci ATH9K_PCI_BT_ANT_DIV | 7708c2ecf20Sopenharmony_ci ATH9K_PCI_LED_ACT_HI}, 7718c2ecf20Sopenharmony_ci 7728c2ecf20Sopenharmony_ci /* PCI-E AR9565 (WB335) */ 7738c2ecf20Sopenharmony_ci { PCI_VDEVICE(ATHEROS, 0x0036), 7748c2ecf20Sopenharmony_ci .driver_data = ATH9K_PCI_BT_ANT_DIV }, 7758c2ecf20Sopenharmony_ci#endif 7768c2ecf20Sopenharmony_ci 7778c2ecf20Sopenharmony_ci { 0 } 7788c2ecf20Sopenharmony_ci}; 7798c2ecf20Sopenharmony_ci 7808c2ecf20Sopenharmony_ci 7818c2ecf20Sopenharmony_ci/* return bus cachesize in 4B word units */ 7828c2ecf20Sopenharmony_cistatic void ath_pci_read_cachesize(struct ath_common *common, int *csz) 7838c2ecf20Sopenharmony_ci{ 7848c2ecf20Sopenharmony_ci struct ath_softc *sc = (struct ath_softc *) common->priv; 7858c2ecf20Sopenharmony_ci u8 u8tmp; 7868c2ecf20Sopenharmony_ci 7878c2ecf20Sopenharmony_ci pci_read_config_byte(to_pci_dev(sc->dev), PCI_CACHE_LINE_SIZE, &u8tmp); 7888c2ecf20Sopenharmony_ci *csz = (int)u8tmp; 7898c2ecf20Sopenharmony_ci 7908c2ecf20Sopenharmony_ci /* 7918c2ecf20Sopenharmony_ci * This check was put in to avoid "unpleasant" consequences if 7928c2ecf20Sopenharmony_ci * the bootrom has not fully initialized all PCI devices. 7938c2ecf20Sopenharmony_ci * Sometimes the cache line size register is not set 7948c2ecf20Sopenharmony_ci */ 7958c2ecf20Sopenharmony_ci 7968c2ecf20Sopenharmony_ci if (*csz == 0) 7978c2ecf20Sopenharmony_ci *csz = DEFAULT_CACHELINE >> 2; /* Use the default size */ 7988c2ecf20Sopenharmony_ci} 7998c2ecf20Sopenharmony_ci 8008c2ecf20Sopenharmony_cistatic bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data) 8018c2ecf20Sopenharmony_ci{ 8028c2ecf20Sopenharmony_ci struct ath_hw *ah = (struct ath_hw *) common->ah; 8038c2ecf20Sopenharmony_ci 8048c2ecf20Sopenharmony_ci common->ops->read(ah, AR5416_EEPROM_OFFSET + (off << AR5416_EEPROM_S)); 8058c2ecf20Sopenharmony_ci 8068c2ecf20Sopenharmony_ci if (!ath9k_hw_wait(ah, 8078c2ecf20Sopenharmony_ci AR_EEPROM_STATUS_DATA, 8088c2ecf20Sopenharmony_ci AR_EEPROM_STATUS_DATA_BUSY | 8098c2ecf20Sopenharmony_ci AR_EEPROM_STATUS_DATA_PROT_ACCESS, 0, 8108c2ecf20Sopenharmony_ci AH_WAIT_TIMEOUT)) { 8118c2ecf20Sopenharmony_ci return false; 8128c2ecf20Sopenharmony_ci } 8138c2ecf20Sopenharmony_ci 8148c2ecf20Sopenharmony_ci *data = MS(common->ops->read(ah, AR_EEPROM_STATUS_DATA), 8158c2ecf20Sopenharmony_ci AR_EEPROM_STATUS_DATA_VAL); 8168c2ecf20Sopenharmony_ci 8178c2ecf20Sopenharmony_ci return true; 8188c2ecf20Sopenharmony_ci} 8198c2ecf20Sopenharmony_ci 8208c2ecf20Sopenharmony_ci/* Need to be called after we discover btcoex capabilities */ 8218c2ecf20Sopenharmony_cistatic void ath_pci_aspm_init(struct ath_common *common) 8228c2ecf20Sopenharmony_ci{ 8238c2ecf20Sopenharmony_ci struct ath_softc *sc = (struct ath_softc *) common->priv; 8248c2ecf20Sopenharmony_ci struct ath_hw *ah = sc->sc_ah; 8258c2ecf20Sopenharmony_ci struct pci_dev *pdev = to_pci_dev(sc->dev); 8268c2ecf20Sopenharmony_ci struct pci_dev *parent; 8278c2ecf20Sopenharmony_ci u16 aspm; 8288c2ecf20Sopenharmony_ci int ret; 8298c2ecf20Sopenharmony_ci 8308c2ecf20Sopenharmony_ci if (!ah->is_pciexpress) 8318c2ecf20Sopenharmony_ci return; 8328c2ecf20Sopenharmony_ci 8338c2ecf20Sopenharmony_ci parent = pdev->bus->self; 8348c2ecf20Sopenharmony_ci if (!parent) 8358c2ecf20Sopenharmony_ci return; 8368c2ecf20Sopenharmony_ci 8378c2ecf20Sopenharmony_ci if ((ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) && 8388c2ecf20Sopenharmony_ci (AR_SREV_9285(ah))) { 8398c2ecf20Sopenharmony_ci /* Bluetooth coexistence requires disabling ASPM. */ 8408c2ecf20Sopenharmony_ci pcie_capability_clear_word(pdev, PCI_EXP_LNKCTL, 8418c2ecf20Sopenharmony_ci PCI_EXP_LNKCTL_ASPM_L0S | PCI_EXP_LNKCTL_ASPM_L1); 8428c2ecf20Sopenharmony_ci 8438c2ecf20Sopenharmony_ci /* 8448c2ecf20Sopenharmony_ci * Both upstream and downstream PCIe components should 8458c2ecf20Sopenharmony_ci * have the same ASPM settings. 8468c2ecf20Sopenharmony_ci */ 8478c2ecf20Sopenharmony_ci pcie_capability_clear_word(parent, PCI_EXP_LNKCTL, 8488c2ecf20Sopenharmony_ci PCI_EXP_LNKCTL_ASPM_L0S | PCI_EXP_LNKCTL_ASPM_L1); 8498c2ecf20Sopenharmony_ci 8508c2ecf20Sopenharmony_ci ath_info(common, "Disabling ASPM since BTCOEX is enabled\n"); 8518c2ecf20Sopenharmony_ci return; 8528c2ecf20Sopenharmony_ci } 8538c2ecf20Sopenharmony_ci 8548c2ecf20Sopenharmony_ci /* 8558c2ecf20Sopenharmony_ci * 0x70c - Ack Frequency Register. 8568c2ecf20Sopenharmony_ci * 8578c2ecf20Sopenharmony_ci * Bits 27:29 - DEFAULT_L1_ENTRANCE_LATENCY. 8588c2ecf20Sopenharmony_ci * 8598c2ecf20Sopenharmony_ci * 000 : 1 us 8608c2ecf20Sopenharmony_ci * 001 : 2 us 8618c2ecf20Sopenharmony_ci * 010 : 4 us 8628c2ecf20Sopenharmony_ci * 011 : 8 us 8638c2ecf20Sopenharmony_ci * 100 : 16 us 8648c2ecf20Sopenharmony_ci * 101 : 32 us 8658c2ecf20Sopenharmony_ci * 110/111 : 64 us 8668c2ecf20Sopenharmony_ci */ 8678c2ecf20Sopenharmony_ci if (AR_SREV_9462(ah)) 8688c2ecf20Sopenharmony_ci pci_read_config_dword(pdev, 0x70c, &ah->config.aspm_l1_fix); 8698c2ecf20Sopenharmony_ci 8708c2ecf20Sopenharmony_ci ret = pcie_capability_read_word(parent, PCI_EXP_LNKCTL, &aspm); 8718c2ecf20Sopenharmony_ci if (!ret && (aspm & (PCI_EXP_LNKCTL_ASPM_L0S | PCI_EXP_LNKCTL_ASPM_L1))) { 8728c2ecf20Sopenharmony_ci ah->aspm_enabled = true; 8738c2ecf20Sopenharmony_ci /* Initialize PCIe PM and SERDES registers. */ 8748c2ecf20Sopenharmony_ci ath9k_hw_configpcipowersave(ah, false); 8758c2ecf20Sopenharmony_ci ath_info(common, "ASPM enabled: 0x%x\n", aspm); 8768c2ecf20Sopenharmony_ci } 8778c2ecf20Sopenharmony_ci} 8788c2ecf20Sopenharmony_ci 8798c2ecf20Sopenharmony_cistatic const struct ath_bus_ops ath_pci_bus_ops = { 8808c2ecf20Sopenharmony_ci .ath_bus_type = ATH_PCI, 8818c2ecf20Sopenharmony_ci .read_cachesize = ath_pci_read_cachesize, 8828c2ecf20Sopenharmony_ci .eeprom_read = ath_pci_eeprom_read, 8838c2ecf20Sopenharmony_ci .aspm_init = ath_pci_aspm_init, 8848c2ecf20Sopenharmony_ci}; 8858c2ecf20Sopenharmony_ci 8868c2ecf20Sopenharmony_cistatic int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) 8878c2ecf20Sopenharmony_ci{ 8888c2ecf20Sopenharmony_ci struct ath_softc *sc; 8898c2ecf20Sopenharmony_ci struct ieee80211_hw *hw; 8908c2ecf20Sopenharmony_ci u8 csz; 8918c2ecf20Sopenharmony_ci u32 val; 8928c2ecf20Sopenharmony_ci int ret = 0; 8938c2ecf20Sopenharmony_ci char hw_name[64]; 8948c2ecf20Sopenharmony_ci int msi_enabled = 0; 8958c2ecf20Sopenharmony_ci 8968c2ecf20Sopenharmony_ci if (pcim_enable_device(pdev)) 8978c2ecf20Sopenharmony_ci return -EIO; 8988c2ecf20Sopenharmony_ci 8998c2ecf20Sopenharmony_ci ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); 9008c2ecf20Sopenharmony_ci if (ret) { 9018c2ecf20Sopenharmony_ci pr_err("32-bit DMA not available\n"); 9028c2ecf20Sopenharmony_ci return ret; 9038c2ecf20Sopenharmony_ci } 9048c2ecf20Sopenharmony_ci 9058c2ecf20Sopenharmony_ci ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); 9068c2ecf20Sopenharmony_ci if (ret) { 9078c2ecf20Sopenharmony_ci pr_err("32-bit DMA consistent DMA enable failed\n"); 9088c2ecf20Sopenharmony_ci return ret; 9098c2ecf20Sopenharmony_ci } 9108c2ecf20Sopenharmony_ci 9118c2ecf20Sopenharmony_ci /* 9128c2ecf20Sopenharmony_ci * Cache line size is used to size and align various 9138c2ecf20Sopenharmony_ci * structures used to communicate with the hardware. 9148c2ecf20Sopenharmony_ci */ 9158c2ecf20Sopenharmony_ci pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &csz); 9168c2ecf20Sopenharmony_ci if (csz == 0) { 9178c2ecf20Sopenharmony_ci /* 9188c2ecf20Sopenharmony_ci * Linux 2.4.18 (at least) writes the cache line size 9198c2ecf20Sopenharmony_ci * register as a 16-bit wide register which is wrong. 9208c2ecf20Sopenharmony_ci * We must have this setup properly for rx buffer 9218c2ecf20Sopenharmony_ci * DMA to work so force a reasonable value here if it 9228c2ecf20Sopenharmony_ci * comes up zero. 9238c2ecf20Sopenharmony_ci */ 9248c2ecf20Sopenharmony_ci csz = L1_CACHE_BYTES / sizeof(u32); 9258c2ecf20Sopenharmony_ci pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, csz); 9268c2ecf20Sopenharmony_ci } 9278c2ecf20Sopenharmony_ci /* 9288c2ecf20Sopenharmony_ci * The default setting of latency timer yields poor results, 9298c2ecf20Sopenharmony_ci * set it to the value used by other systems. It may be worth 9308c2ecf20Sopenharmony_ci * tweaking this setting more. 9318c2ecf20Sopenharmony_ci */ 9328c2ecf20Sopenharmony_ci pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xa8); 9338c2ecf20Sopenharmony_ci 9348c2ecf20Sopenharmony_ci pci_set_master(pdev); 9358c2ecf20Sopenharmony_ci 9368c2ecf20Sopenharmony_ci /* 9378c2ecf20Sopenharmony_ci * Disable the RETRY_TIMEOUT register (0x41) to keep 9388c2ecf20Sopenharmony_ci * PCI Tx retries from interfering with C3 CPU state. 9398c2ecf20Sopenharmony_ci */ 9408c2ecf20Sopenharmony_ci pci_read_config_dword(pdev, 0x40, &val); 9418c2ecf20Sopenharmony_ci if ((val & 0x0000ff00) != 0) 9428c2ecf20Sopenharmony_ci pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); 9438c2ecf20Sopenharmony_ci 9448c2ecf20Sopenharmony_ci ret = pcim_iomap_regions(pdev, BIT(0), "ath9k"); 9458c2ecf20Sopenharmony_ci if (ret) { 9468c2ecf20Sopenharmony_ci dev_err(&pdev->dev, "PCI memory region reserve error\n"); 9478c2ecf20Sopenharmony_ci return -ENODEV; 9488c2ecf20Sopenharmony_ci } 9498c2ecf20Sopenharmony_ci 9508c2ecf20Sopenharmony_ci ath9k_fill_chanctx_ops(); 9518c2ecf20Sopenharmony_ci hw = ieee80211_alloc_hw(sizeof(struct ath_softc), &ath9k_ops); 9528c2ecf20Sopenharmony_ci if (!hw) { 9538c2ecf20Sopenharmony_ci dev_err(&pdev->dev, "No memory for ieee80211_hw\n"); 9548c2ecf20Sopenharmony_ci return -ENOMEM; 9558c2ecf20Sopenharmony_ci } 9568c2ecf20Sopenharmony_ci 9578c2ecf20Sopenharmony_ci SET_IEEE80211_DEV(hw, &pdev->dev); 9588c2ecf20Sopenharmony_ci pci_set_drvdata(pdev, hw); 9598c2ecf20Sopenharmony_ci 9608c2ecf20Sopenharmony_ci sc = hw->priv; 9618c2ecf20Sopenharmony_ci sc->hw = hw; 9628c2ecf20Sopenharmony_ci sc->dev = &pdev->dev; 9638c2ecf20Sopenharmony_ci sc->mem = pcim_iomap_table(pdev)[0]; 9648c2ecf20Sopenharmony_ci sc->driver_data = id->driver_data; 9658c2ecf20Sopenharmony_ci 9668c2ecf20Sopenharmony_ci if (ath9k_use_msi) { 9678c2ecf20Sopenharmony_ci if (pci_enable_msi(pdev) == 0) { 9688c2ecf20Sopenharmony_ci msi_enabled = 1; 9698c2ecf20Sopenharmony_ci dev_err(&pdev->dev, "Using MSI\n"); 9708c2ecf20Sopenharmony_ci } else { 9718c2ecf20Sopenharmony_ci dev_err(&pdev->dev, "Using INTx\n"); 9728c2ecf20Sopenharmony_ci } 9738c2ecf20Sopenharmony_ci } 9748c2ecf20Sopenharmony_ci 9758c2ecf20Sopenharmony_ci if (!msi_enabled) 9768c2ecf20Sopenharmony_ci ret = request_irq(pdev->irq, ath_isr, IRQF_SHARED, "ath9k", sc); 9778c2ecf20Sopenharmony_ci else 9788c2ecf20Sopenharmony_ci ret = request_irq(pdev->irq, ath_isr, 0, "ath9k", sc); 9798c2ecf20Sopenharmony_ci 9808c2ecf20Sopenharmony_ci if (ret) { 9818c2ecf20Sopenharmony_ci dev_err(&pdev->dev, "request_irq failed\n"); 9828c2ecf20Sopenharmony_ci goto err_irq; 9838c2ecf20Sopenharmony_ci } 9848c2ecf20Sopenharmony_ci 9858c2ecf20Sopenharmony_ci sc->irq = pdev->irq; 9868c2ecf20Sopenharmony_ci 9878c2ecf20Sopenharmony_ci ret = ath9k_init_device(id->device, sc, &ath_pci_bus_ops); 9888c2ecf20Sopenharmony_ci if (ret) { 9898c2ecf20Sopenharmony_ci dev_err(&pdev->dev, "Failed to initialize device\n"); 9908c2ecf20Sopenharmony_ci goto err_init; 9918c2ecf20Sopenharmony_ci } 9928c2ecf20Sopenharmony_ci 9938c2ecf20Sopenharmony_ci sc->sc_ah->msi_enabled = msi_enabled; 9948c2ecf20Sopenharmony_ci sc->sc_ah->msi_reg = 0; 9958c2ecf20Sopenharmony_ci 9968c2ecf20Sopenharmony_ci ath9k_hw_name(sc->sc_ah, hw_name, sizeof(hw_name)); 9978c2ecf20Sopenharmony_ci wiphy_info(hw->wiphy, "%s mem=0x%p, irq=%d\n", 9988c2ecf20Sopenharmony_ci hw_name, sc->mem, pdev->irq); 9998c2ecf20Sopenharmony_ci 10008c2ecf20Sopenharmony_ci return 0; 10018c2ecf20Sopenharmony_ci 10028c2ecf20Sopenharmony_cierr_init: 10038c2ecf20Sopenharmony_ci free_irq(sc->irq, sc); 10048c2ecf20Sopenharmony_cierr_irq: 10058c2ecf20Sopenharmony_ci ieee80211_free_hw(hw); 10068c2ecf20Sopenharmony_ci return ret; 10078c2ecf20Sopenharmony_ci} 10088c2ecf20Sopenharmony_ci 10098c2ecf20Sopenharmony_cistatic void ath_pci_remove(struct pci_dev *pdev) 10108c2ecf20Sopenharmony_ci{ 10118c2ecf20Sopenharmony_ci struct ieee80211_hw *hw = pci_get_drvdata(pdev); 10128c2ecf20Sopenharmony_ci struct ath_softc *sc = hw->priv; 10138c2ecf20Sopenharmony_ci 10148c2ecf20Sopenharmony_ci if (!is_ath9k_unloaded) 10158c2ecf20Sopenharmony_ci sc->sc_ah->ah_flags |= AH_UNPLUGGED; 10168c2ecf20Sopenharmony_ci ath9k_deinit_device(sc); 10178c2ecf20Sopenharmony_ci free_irq(sc->irq, sc); 10188c2ecf20Sopenharmony_ci ieee80211_free_hw(sc->hw); 10198c2ecf20Sopenharmony_ci} 10208c2ecf20Sopenharmony_ci 10218c2ecf20Sopenharmony_ci#ifdef CONFIG_PM_SLEEP 10228c2ecf20Sopenharmony_ci 10238c2ecf20Sopenharmony_cistatic int ath_pci_suspend(struct device *device) 10248c2ecf20Sopenharmony_ci{ 10258c2ecf20Sopenharmony_ci struct ieee80211_hw *hw = dev_get_drvdata(device); 10268c2ecf20Sopenharmony_ci struct ath_softc *sc = hw->priv; 10278c2ecf20Sopenharmony_ci struct ath_common *common = ath9k_hw_common(sc->sc_ah); 10288c2ecf20Sopenharmony_ci 10298c2ecf20Sopenharmony_ci if (test_bit(ATH_OP_WOW_ENABLED, &common->op_flags)) { 10308c2ecf20Sopenharmony_ci dev_info(device, "WOW is enabled, bypassing PCI suspend\n"); 10318c2ecf20Sopenharmony_ci return 0; 10328c2ecf20Sopenharmony_ci } 10338c2ecf20Sopenharmony_ci 10348c2ecf20Sopenharmony_ci /* The device has to be moved to FULLSLEEP forcibly. 10358c2ecf20Sopenharmony_ci * Otherwise the chip never moved to full sleep, 10368c2ecf20Sopenharmony_ci * when no interface is up. 10378c2ecf20Sopenharmony_ci */ 10388c2ecf20Sopenharmony_ci ath9k_stop_btcoex(sc); 10398c2ecf20Sopenharmony_ci ath9k_hw_disable(sc->sc_ah); 10408c2ecf20Sopenharmony_ci del_timer_sync(&sc->sleep_timer); 10418c2ecf20Sopenharmony_ci ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_FULL_SLEEP); 10428c2ecf20Sopenharmony_ci 10438c2ecf20Sopenharmony_ci return 0; 10448c2ecf20Sopenharmony_ci} 10458c2ecf20Sopenharmony_ci 10468c2ecf20Sopenharmony_cistatic int ath_pci_resume(struct device *device) 10478c2ecf20Sopenharmony_ci{ 10488c2ecf20Sopenharmony_ci struct pci_dev *pdev = to_pci_dev(device); 10498c2ecf20Sopenharmony_ci struct ieee80211_hw *hw = pci_get_drvdata(pdev); 10508c2ecf20Sopenharmony_ci struct ath_softc *sc = hw->priv; 10518c2ecf20Sopenharmony_ci struct ath_hw *ah = sc->sc_ah; 10528c2ecf20Sopenharmony_ci struct ath_common *common = ath9k_hw_common(ah); 10538c2ecf20Sopenharmony_ci u32 val; 10548c2ecf20Sopenharmony_ci 10558c2ecf20Sopenharmony_ci /* 10568c2ecf20Sopenharmony_ci * Suspend/Resume resets the PCI configuration space, so we have to 10578c2ecf20Sopenharmony_ci * re-disable the RETRY_TIMEOUT register (0x41) to keep 10588c2ecf20Sopenharmony_ci * PCI Tx retries from interfering with C3 CPU state 10598c2ecf20Sopenharmony_ci */ 10608c2ecf20Sopenharmony_ci pci_read_config_dword(pdev, 0x40, &val); 10618c2ecf20Sopenharmony_ci if ((val & 0x0000ff00) != 0) 10628c2ecf20Sopenharmony_ci pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); 10638c2ecf20Sopenharmony_ci 10648c2ecf20Sopenharmony_ci ath_pci_aspm_init(common); 10658c2ecf20Sopenharmony_ci ah->reset_power_on = false; 10668c2ecf20Sopenharmony_ci 10678c2ecf20Sopenharmony_ci return 0; 10688c2ecf20Sopenharmony_ci} 10698c2ecf20Sopenharmony_ci 10708c2ecf20Sopenharmony_cistatic SIMPLE_DEV_PM_OPS(ath9k_pm_ops, ath_pci_suspend, ath_pci_resume); 10718c2ecf20Sopenharmony_ci 10728c2ecf20Sopenharmony_ci#define ATH9K_PM_OPS (&ath9k_pm_ops) 10738c2ecf20Sopenharmony_ci 10748c2ecf20Sopenharmony_ci#else /* !CONFIG_PM_SLEEP */ 10758c2ecf20Sopenharmony_ci 10768c2ecf20Sopenharmony_ci#define ATH9K_PM_OPS NULL 10778c2ecf20Sopenharmony_ci 10788c2ecf20Sopenharmony_ci#endif /* !CONFIG_PM_SLEEP */ 10798c2ecf20Sopenharmony_ci 10808c2ecf20Sopenharmony_ci 10818c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(pci, ath_pci_id_table); 10828c2ecf20Sopenharmony_ci 10838c2ecf20Sopenharmony_cistatic struct pci_driver ath_pci_driver = { 10848c2ecf20Sopenharmony_ci .name = "ath9k", 10858c2ecf20Sopenharmony_ci .id_table = ath_pci_id_table, 10868c2ecf20Sopenharmony_ci .probe = ath_pci_probe, 10878c2ecf20Sopenharmony_ci .remove = ath_pci_remove, 10888c2ecf20Sopenharmony_ci .driver.pm = ATH9K_PM_OPS, 10898c2ecf20Sopenharmony_ci}; 10908c2ecf20Sopenharmony_ci 10918c2ecf20Sopenharmony_ciint ath_pci_init(void) 10928c2ecf20Sopenharmony_ci{ 10938c2ecf20Sopenharmony_ci return pci_register_driver(&ath_pci_driver); 10948c2ecf20Sopenharmony_ci} 10958c2ecf20Sopenharmony_ci 10968c2ecf20Sopenharmony_civoid ath_pci_exit(void) 10978c2ecf20Sopenharmony_ci{ 10988c2ecf20Sopenharmony_ci pci_unregister_driver(&ath_pci_driver); 10998c2ecf20Sopenharmony_ci} 1100