70889d69d68c4599762a1aaa85aefc61e61a5c8d
[openwrt.git] / package / mac80211 / patches / 542-ath9k_ar9280_cold_reset.patch
1 --- a/drivers/net/wireless/ath/ath9k/hw.c
2 +++ b/drivers/net/wireless/ath/ath9k/hw.c
3 @@ -1394,10 +1394,16 @@ static bool ath9k_hw_set_reset_reg(struc
4 static bool ath9k_hw_chip_reset(struct ath_hw *ah,
5 struct ath9k_channel *chan)
6 {
7 - if (AR_SREV_9280(ah) && ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL)) {
8 - if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON))
9 - return false;
10 - } else if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_WARM))
11 + int reset_type = ATH9K_RESET_WARM;
12 +
13 + if (AR_SREV_9280(ah)) {
14 + if (ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
15 + reset_type = ATH9K_RESET_POWER_ON;
16 + else
17 + reset_type = ATH9K_RESET_COLD;
18 + }
19 +
20 + if (!ath9k_hw_set_reset_reg(ah, reset_type))
21 return false;
22
23 if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
This page took 0.03811 seconds and 3 git commands to generate.