ath9k: Add PCI IDs for CUS217
PATCH 1/3 ath9k: Add PCI IDs for CUS217
From: Sujith Manoharan <[email protected]>
CUS217 is a card based on AR9462.
Signed-off-by Sujith Manoharan <[email protected]>
--- drivers/net/wireless/ath/ath9k/ath9k.h | 1 + drivers/net/wireless/ath/ath9k/init.c | 2 ++ drivers/net/wireless/ath/ath9k/pci.c | 13 +++++++++++++ 3 files changed, 16 insertions(+)
drivers/net/wireless/ath/ath9k/ath9k.h +1 -0
@@ -633,6 +633,7 @@ void ath_ant_comb_update(struct ath_softc *sc);#define ATH9K_PCI_CUS198 0x0001#define ATH9K_PCI_CUS230 0x0002 +#define ATH9K_PCI_CUS217 0x0004/* * Default cache line size, in bytes.
drivers/net/wireless/ath/ath9k/init.c +2 -0
@@ -529,6 +529,8 @@ static void ath9k_init_platform(struct ath_softc *sc)ath_info (common,"Set parameters for %s\n" , (sc->driver_data &ATH9K_PCI_CUS198 ) ?"CUS198" :"CUS230" ); + }else if (sc->driver_data &ATH9K_PCI_CUS217 ) { +ath_info (common,"CUS217 card detected\n" ); } }
drivers/net/wireless/ath/ath9k/pci.c +13 -0
@@ -66,6 +66,19 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = { { PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E AR9485 */ { PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E AR9580 */ + +/* PCI-E CUS217 */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, +0x0034 , +PCI_VENDOR_ID_AZWAVE , +0x2116 ), + .driver_data = ATH9K_PCI_CUS217 }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, +0x0034 , +0x11AD ,/* LITEON */ +0x6661 ), + .driver_data = ATH9K_PCI_CUS217 }, + { PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E AR9462 */ { PCI_VDEVICE(ATHEROS, 0x0037) }, /* PCI-E AR1111/AR9485 */ { PCI_VDEVICE(ATHEROS, 0x0036) }, /* PCI-E AR9565 */
Signature · 1 line
1.8.3.1
PATCH 2/3 ath9k: Add initvals required for CUS217
From: Sujith Manoharan <[email protected]>
Signed-off-by Sujith Manoharan <[email protected]>
--- drivers/net/wireless/ath/ath9k/ar9462_2p0_initvals.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/net/wireless/ath/ath9k/ar9462_2p0_initvals.h +15 -0
@@ -1714,4 +1714,19 @@ static const u32 ar9462_2p0_5g_xlna_only_rxgain[][2] = { {0x0000b1fc, 0x00000196}, }; +static const u32 ar9462_2p0_baseband_core_mix_rxgain[][2] = { + /* Addr allmodes */ + {0x00009fd0, 0x0a2d6b93}, +}; + +static const u32 ar9462_2p0_baseband_postamble_mix_rxgain[][5] = { + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + {0x00009820, 0x206a022e, 0x206a022e, 0x206a01ae, 0x206a01ae}, + {0x00009824, 0x63c640de, 0x5ac640d0, 0x63c640da, 0x63c640da}, + {0x00009828, 0x0796be89, 0x0696b081, 0x0916be81, 0x0916be81}, + {0x00009e0c, 0x6c4000e2, 0x6d4000e2, 0x6d4000d8, 0x6c4000d8}, + {0x00009e10, 0x92c88d2e, 0x7ec88d2e, 0x7ec86d2e, 0x7ec86d2e}, + {0x00009e14, 0x37b95d5e, 0x37b9605e, 0x3236605e, 0x32395c5e}, +}; + #endif /* INITVALS_9462_2P0_H */
Signature · 1 line
1.8.3.1
PATCH 3/3 ath9k: Program initvals for CUS217
In reply to Sujith ManoharanFrom: Sujith Manoharan <[email protected]>
Signed-off-by Sujith Manoharan <[email protected]>
--- drivers/net/wireless/ath/ath9k/ar9003_hw.c | 4 ++++ drivers/net/wireless/ath/ath9k/ar9003_phy.c | 10 ++++++++++ drivers/net/wireless/ath/ath9k/hw.h | 2 ++ 3 files changed, 16 insertions(+)
drivers/net/wireless/ath/ath9k/ar9003_hw.c +4 -0
@@ -630,6 +630,10 @@ static void ar9003_rx_gain_table_mode2(struct ath_hw *ah)if (AR_SREV_9462_20 (ah)) {INIT_INI_ARRAY (&ah->iniModesRxGain, ar9462_common_mixed_rx_gain_table_2p0); +INIT_INI_ARRAY (&ah->ini_modes_rxgain_bb_core, + ar9462_2p0_baseband_core_mix_rxgain); +INIT_INI_ARRAY (&ah->ini_modes_rxgain_bb_postamble, + ar9462_2p0_baseband_postamble_mix_rxgain);INIT_INI_ARRAY (&ah->ini_modes_rxgain_5g_xlna, ar9462_2p0_baseband_postamble_5g_xlna); }
drivers/net/wireless/ath/ath9k/ar9003_phy.c +10 -0
@@ -756,6 +756,16 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,if (AR_SREV_9462_20 (ah)) {/* +* CUS217 mix LNA mode. +*/ +if (ar9003_hw_get_rx_gain_idx (ah) ==2 ) { +REG_WRITE_ARRAY (&ah->ini_modes_rxgain_bb_core, +1 , regWrites); +REG_WRITE_ARRAY (&ah->ini_modes_rxgain_bb_postamble, + modesIndex, regWrites); + } + +/* * 5G-XLNA */ if ((ar9003_hw_get_rx_gain_idx(ah) == 2) ||
drivers/net/wireless/ath/ath9k/hw.h +2 -0
@@ -893,6 +893,8 @@ struct ath_hw {struct ar5416IniArray iniModes_9271_ANI_reg;struct ar5416IniArray ini_radio_post_sys2ant;struct ar5416IniArray ini_modes_rxgain_5g_xlna; +struct ar5416IniArray ini_modes_rxgain_bb_core; +struct ar5416IniArray ini_modes_rxgain_bb_postamble;struct ar5416IniArray iniMac[ATH_INI_NUM_SPLIT ];struct ar5416IniArray iniBB[ATH_INI_NUM_SPLIT ];
Signature · 1 line
1.8.3.1