mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 05:41:55 +00:00
ath9k: Identify WB335 Antenna configuration
There are 2 types of WB335 cards, 1-antenna and 2-antenna. Identify them based on PCI subsystem IDs, this will be used for MCI/BTCOEX tweaks. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
10631336eb
commit
3fcdd0a12e
@ -625,13 +625,15 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs);
|
||||
/* Main driver core */
|
||||
/********************/
|
||||
|
||||
#define ATH9K_PCI_CUS198 0x0001
|
||||
#define ATH9K_PCI_CUS230 0x0002
|
||||
#define ATH9K_PCI_CUS217 0x0004
|
||||
#define ATH9K_PCI_CUS252 0x0008
|
||||
#define ATH9K_PCI_WOW 0x0010
|
||||
#define ATH9K_PCI_BT_ANT_DIV 0x0020
|
||||
#define ATH9K_PCI_D3_L1_WAR 0x0040
|
||||
#define ATH9K_PCI_CUS198 0x0001
|
||||
#define ATH9K_PCI_CUS230 0x0002
|
||||
#define ATH9K_PCI_CUS217 0x0004
|
||||
#define ATH9K_PCI_CUS252 0x0008
|
||||
#define ATH9K_PCI_WOW 0x0010
|
||||
#define ATH9K_PCI_BT_ANT_DIV 0x0020
|
||||
#define ATH9K_PCI_D3_L1_WAR 0x0040
|
||||
#define ATH9K_PCI_AR9565_1ANT 0x0080
|
||||
#define ATH9K_PCI_AR9565_2ANT 0x0100
|
||||
|
||||
/*
|
||||
* Default cache line size, in bytes.
|
||||
|
@ -550,6 +550,23 @@ static void ath9k_init_platform(struct ath_softc *sc)
|
||||
if (sc->driver_data & ATH9K_PCI_CUS252)
|
||||
ath_info(common, "CUS252 card detected\n");
|
||||
|
||||
if (sc->driver_data & ATH9K_PCI_AR9565_1ANT)
|
||||
ath_info(common, "WB335 1-ANT card detected\n");
|
||||
|
||||
if (sc->driver_data & ATH9K_PCI_AR9565_2ANT)
|
||||
ath_info(common, "WB335 2-ANT card detected\n");
|
||||
|
||||
/*
|
||||
* Some WB335 cards do not support antenna diversity. Since
|
||||
* we use a hardcoded value for AR9565 instead of using the
|
||||
* EEPROM/OTP data, remove the combining feature from
|
||||
* the HW capabilities bitmap.
|
||||
*/
|
||||
if (sc->driver_data & (ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_AR9565_2ANT)) {
|
||||
if (!(sc->driver_data & ATH9K_PCI_BT_ANT_DIV))
|
||||
pCap->hw_caps &= ~ATH9K_HW_CAP_ANT_DIV_COMB;
|
||||
}
|
||||
|
||||
if (sc->driver_data & ATH9K_PCI_BT_ANT_DIV) {
|
||||
pCap->hw_caps |= ATH9K_HW_CAP_BT_ANT_DIV;
|
||||
ath_info(common, "Set BT/WLAN RX diversity capability\n");
|
||||
|
@ -275,12 +275,184 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_ATHEROS,
|
||||
0x3028),
|
||||
.driver_data = ATH9K_PCI_CUS252 | ATH9K_PCI_BT_ANT_DIV },
|
||||
.driver_data = ATH9K_PCI_CUS252 |
|
||||
ATH9K_PCI_AR9565_2ANT |
|
||||
ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_AZWAVE,
|
||||
0x2176),
|
||||
.driver_data = ATH9K_PCI_CUS252 | ATH9K_PCI_BT_ANT_DIV },
|
||||
.driver_data = ATH9K_PCI_CUS252 |
|
||||
ATH9K_PCI_AR9565_2ANT |
|
||||
ATH9K_PCI_BT_ANT_DIV },
|
||||
|
||||
/* WB335 1-ANT */
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_FOXCONN,
|
||||
0xE068),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x185F, /* WNC */
|
||||
0xA119),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x11AD, /* LITEON */
|
||||
0x0632),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x11AD, /* LITEON */
|
||||
0x6671),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x1B9A, /* XAVI */
|
||||
0x2811),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x1B9A, /* XAVI */
|
||||
0x2812),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT },
|
||||
|
||||
/* WB335 1-ANT / Antenna Diversity */
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_ATHEROS,
|
||||
0x3025),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_ATHEROS,
|
||||
0x3026),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_ATHEROS,
|
||||
0x302B),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_FOXCONN,
|
||||
0xE069),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x185F, /* WNC */
|
||||
0x3028),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x11AD, /* LITEON */
|
||||
0x0622),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x11AD, /* LITEON */
|
||||
0x0672),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x11AD, /* LITEON */
|
||||
0x0662),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_AZWAVE,
|
||||
0x213A),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_LENOVO,
|
||||
0x3026),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_HP,
|
||||
0x18E3),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_HP,
|
||||
0x217F),
|
||||
.driver_data = ATH9K_PCI_AR9565_1ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
|
||||
/* WB335 2-ANT */
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_SAMSUNG,
|
||||
0x411A),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_SAMSUNG,
|
||||
0x411B),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_SAMSUNG,
|
||||
0x411C),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_SAMSUNG,
|
||||
0x411D),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_SAMSUNG,
|
||||
0x411E),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT },
|
||||
|
||||
/* WB335 2-ANT / Antenna-Diversity */
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_ATHEROS,
|
||||
0x3027),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_ATHEROS,
|
||||
0x302C),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x11AD, /* LITEON */
|
||||
0x0642),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x11AD, /* LITEON */
|
||||
0x0652),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x11AD, /* LITEON */
|
||||
0x0612),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
PCI_VENDOR_ID_AZWAVE,
|
||||
0x2130),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x144F, /* ASKEY */
|
||||
0x7202),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x1B9A, /* XAVI */
|
||||
0x2810),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
|
||||
0x0036,
|
||||
0x185F, /* WNC */
|
||||
0x3027),
|
||||
.driver_data = ATH9K_PCI_AR9565_2ANT | ATH9K_PCI_BT_ANT_DIV },
|
||||
|
||||
/* PCI-E AR9565 (WB335) */
|
||||
{ PCI_VDEVICE(ATHEROS, 0x0036),
|
||||
|
Loading…
Reference in New Issue
Block a user