ath9k: Add QCA953x WMAC platform support
PATCH 1/3 ath9k: Add QCA953x WMAC platform support
From: Sujith Manoharan <[email protected]>
Signed-off-by Sujith Manoharan <[email protected]>
--- drivers/net/wireless/ath/ath9k/ahb.c | 4 ++++ drivers/net/wireless/ath/ath9k/hw.c | 1 + 2 files changed, 5 insertions(+)
drivers/net/wireless/ath/ath9k/ahb.c +4 -0
@@ -39,6 +39,10 @@ static const struct platform_device_id ath9k_platform_id_table[] = { .name = "qca955x_wmac", .driver_data = AR9300_DEVID_QCA955X, }, + { + .name = "qca953x_wmac", + .driver_data = AR9300_DEVID_AR953X, + }, {}, };
drivers/net/wireless/ath/ath9k/hw.c +1 -0
@@ -3047,6 +3047,7 @@ static struct { { AR_SREV_VERSION_9462, "9462" }, { AR_SREV_VERSION_9550, "9550" }, { AR_SREV_VERSION_9565, "9565" }, + { AR_SREV_VERSION_9531, "9531" }, };/* For devices with external radios */
Signature · 1 line
1.9.0
PATCH 2/3 ath9k: Disable AR_INTR_SYNC_HOST1_FATAL for QCA953x
From: Sujith Manoharan <[email protected]>
Along with AR9340 and AR955x, this is also needed for the QCA953x SoC.
Signed-off-by Sujith Manoharan <[email protected]>
--- drivers/net/wireless/ath/ath9k/hw.c | 2 +- drivers/net/wireless/ath/ath9k/mac.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath9k/hw.c +1 -1
@@ -882,7 +882,7 @@ static void ath9k_hw_init_interrupt_masks(struct ath_hw *ah,AR_IMR_RXORN |AR_IMR_BCNMISC ; -if (AR_SREV_9340 (ah) ||AR_SREV_9550 (ah)) +if (AR_SREV_9340 (ah) ||AR_SREV_9550 (ah) ||AR_SREV_9531 (ah)) sync_default &= ~AR_INTR_SYNC_HOST1_FATAL ;if (AR_SREV_9300_20_OR_LATER (ah)) {
drivers/net/wireless/ath/ath9k/mac.c +1 -1
@@ -827,7 +827,7 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah)return ; } -if (AR_SREV_9340 (ah) ||AR_SREV_9550 (ah)) +if (AR_SREV_9340 (ah) ||AR_SREV_9550 (ah) ||AR_SREV_9531 (ah)) sync_default &= ~AR_INTR_SYNC_HOST1_FATAL ; async_mask =AR_INTR_MAC_IRQ ;
Signature · 1 line
1.9.0
PATCH 3/3 ath9k: Fix temperature compensation
In reply to Sujith ManoharanFrom: Sujith Manoharan <[email protected]>
The registers for temperature compensation need to be programmed only for active chains. Use the TX chainmask to make sure that this is done properly for QCA953x.
Signed-off-by Sujith Manoharan <[email protected]>
--- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 59 +++++++++++++++----------- 1 file changed, 35 insertions(+), 24 deletions(-)
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +35 -24
@@ -4792,43 +4792,54 @@ static void ar9003_hw_power_control_override(struct ath_hw *ah, tempslope:if (AR_SREV_9550 (ah) ||AR_SREV_9531 (ah)) { +u8 txmask = (eep->baseEepHeader.txrxMask &0xf0 ) >>4 ; +/* * AR955x has tempSlope register for each chain. * Check whether temp_compensation feature is enabled or not. */ if (eep->baseEepHeader.featureEnable &0x1 ) {if (frequency <4000 ) { -REG_RMW_FIELD (ah,AR_PHY_TPC_19 , -AR_PHY_TPC_19_ALPHA_THERM , - eep->base_ext2.tempSlopeLow); -REG_RMW_FIELD (ah,AR_PHY_TPC_19_B1 , -AR_PHY_TPC_19_ALPHA_THERM , - temp_slope); -REG_RMW_FIELD (ah,AR_PHY_TPC_19_B2 , -AR_PHY_TPC_19_ALPHA_THERM , - eep->base_ext2.tempSlopeHigh); +if (txmask &BIT (0 )) +REG_RMW_FIELD (ah,AR_PHY_TPC_19 , +AR_PHY_TPC_19_ALPHA_THERM , + eep->base_ext2.tempSlopeLow); +if (txmask &BIT (1 )) +REG_RMW_FIELD (ah,AR_PHY_TPC_19_B1 , +AR_PHY_TPC_19_ALPHA_THERM , + temp_slope); +if (txmask &BIT (2 )) +REG_RMW_FIELD (ah,AR_PHY_TPC_19_B2 , +AR_PHY_TPC_19_ALPHA_THERM , + eep->base_ext2.tempSlopeHigh); }else { -REG_RMW_FIELD (ah,AR_PHY_TPC_19 , -AR_PHY_TPC_19_ALPHA_THERM , - temp_slope); -REG_RMW_FIELD (ah,AR_PHY_TPC_19_B1 , -AR_PHY_TPC_19_ALPHA_THERM , - temp_slope1); -REG_RMW_FIELD (ah,AR_PHY_TPC_19_B2 , -AR_PHY_TPC_19_ALPHA_THERM , - temp_slope2); +if (txmask &BIT (0 )) +REG_RMW_FIELD (ah,AR_PHY_TPC_19 , +AR_PHY_TPC_19_ALPHA_THERM , + temp_slope); +if (txmask &BIT (1 )) +REG_RMW_FIELD (ah,AR_PHY_TPC_19_B1 , +AR_PHY_TPC_19_ALPHA_THERM , + temp_slope1); +if (txmask &BIT (2 )) +REG_RMW_FIELD (ah,AR_PHY_TPC_19_B2 , +AR_PHY_TPC_19_ALPHA_THERM , + temp_slope2); } }else {/* * If temp compensation is not enabled, * set all registers to 0. */ -REG_RMW_FIELD (ah,AR_PHY_TPC_19 , -AR_PHY_TPC_19_ALPHA_THERM ,0 ); -REG_RMW_FIELD (ah,AR_PHY_TPC_19_B1 , -AR_PHY_TPC_19_ALPHA_THERM ,0 ); -REG_RMW_FIELD (ah,AR_PHY_TPC_19_B2 , -AR_PHY_TPC_19_ALPHA_THERM ,0 ); +if (txmask &BIT (0 )) +REG_RMW_FIELD (ah,AR_PHY_TPC_19 , +AR_PHY_TPC_19_ALPHA_THERM ,0 ); +if (txmask &BIT (1 )) +REG_RMW_FIELD (ah,AR_PHY_TPC_19_B1 , +AR_PHY_TPC_19_ALPHA_THERM ,0 ); +if (txmask &BIT (2 )) +REG_RMW_FIELD (ah,AR_PHY_TPC_19_B2 , +AR_PHY_TPC_19_ALPHA_THERM ,0 ); } }else { REG_RMW_FIELD(ah, AR_PHY_TPC_19,
Signature · 1 line
1.9.0