Skip to content

Commit 05020d2

Browse files
Sujithlinvjw
Sujith
authored andcommitted
ath9k_hw: add HTC init hardware call for special resets for AR9271
AR9271 needs a full reset only upon the first reset, add a call for the driver to enable these special resets. We can optimize this out later without an export. Signed-off-by: Sujith <[email protected]> Signed-off-by: Vasanthakumar Thiagarajan <[email protected]> Signed-off-by: Luis R. Rodriguez <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent 25e2ab1 commit 05020d2

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

drivers/net/wireless/ath/ath9k/hw.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,6 +1951,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
19511951

19521952
ath9k_hw_mark_phy_inactive(ah);
19531953

1954+
/* Only required on the first reset */
19541955
if (AR_SREV_9271(ah) && ah->htc_reset_init) {
19551956
REG_WRITE(ah,
19561957
AR9271_RESET_POWER_DOWN_CONTROL,
@@ -1963,6 +1964,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
19631964
return -EINVAL;
19641965
}
19651966

1967+
/* Only required on the first reset */
19661968
if (AR_SREV_9271(ah) && ah->htc_reset_init) {
19671969
ah->htc_reset_init = false;
19681970
REG_WRITE(ah,
@@ -3857,6 +3859,16 @@ void ath_gen_timer_isr(struct ath_hw *ah)
38573859
}
38583860
EXPORT_SYMBOL(ath_gen_timer_isr);
38593861

3862+
/********/
3863+
/* HTC */
3864+
/********/
3865+
3866+
void ath9k_hw_htc_resetinit(struct ath_hw *ah)
3867+
{
3868+
ah->htc_reset_init = true;
3869+
}
3870+
EXPORT_SYMBOL(ath9k_hw_htc_resetinit);
3871+
38603872
static struct {
38613873
u32 version;
38623874
const char * name;

drivers/net/wireless/ath/ath9k/hw.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,9 @@ u32 ath9k_hw_gettsf32(struct ath_hw *ah);
707707

708708
void ath9k_hw_name(struct ath_hw *ah, char *hw_name, size_t len);
709709

710+
/* HTC */
711+
void ath9k_hw_htc_resetinit(struct ath_hw *ah);
712+
710713
#define ATH_PCIE_CAP_LINK_CTRL 0x70
711714
#define ATH_PCIE_CAP_LINK_L0S 1
712715
#define ATH_PCIE_CAP_LINK_L1 2

0 commit comments

Comments
 (0)