X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/4cc2bb43c85f28f4dec00197bd75ff7cca978610..5082ee8d9816b9a69cc1a250942fb4dce5aa6357:/package/mac80211/patches/310-ath9k_pending_work.patch?ds=sidebyside diff --git a/package/mac80211/patches/310-ath9k_pending_work.patch b/package/mac80211/patches/310-ath9k_pending_work.patch index ec0a26197..eee9238b1 100644 --- a/package/mac80211/patches/310-ath9k_pending_work.patch +++ b/package/mac80211/patches/310-ath9k_pending_work.patch @@ -92,7 +92,49 @@ if (!ath9k_hw_private_ops(ah)->restore_chainmask) --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -1399,7 +1399,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st +@@ -491,6 +491,17 @@ static int __ath9k_hw_init(struct ath_hw + if (ah->hw_version.devid == AR5416_AR9100_DEVID) + ah->hw_version.macVersion = AR_SREV_VERSION_9100; + ++ ath9k_hw_read_revisions(ah); ++ ++ /* ++ * Read back AR_WA into a permanent copy and set bits 14 and 17. ++ * We need to do this to avoid RMW of this register. We cannot ++ * read the reg when chip is asleep. ++ */ ++ ah->WARegVal = REG_READ(ah, AR_WA); ++ ah->WARegVal |= (AR_WA_D3_L1_DISABLE | ++ AR_WA_ASPM_TIMER_BASED_DISABLE); ++ + if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) { + ath_err(common, "Couldn't reset chip\n"); + return -EIO; +@@ -559,14 +570,6 @@ static int __ath9k_hw_init(struct ath_hw + + ath9k_hw_init_mode_regs(ah); + +- /* +- * Read back AR_WA into a permanent copy and set bits 14 and 17. +- * We need to do this to avoid RMW of this register. We cannot +- * read the reg when chip is asleep. +- */ +- ah->WARegVal = REG_READ(ah, AR_WA); +- ah->WARegVal |= (AR_WA_D3_L1_DISABLE | +- AR_WA_ASPM_TIMER_BASED_DISABLE); + + if (ah->is_pciexpress) + ath9k_hw_configpcipowersave(ah, 0, 0); +@@ -1078,8 +1081,6 @@ static bool ath9k_hw_set_reset_power_on( + return false; + } + +- ath9k_hw_read_revisions(ah); +- + return ath9k_hw_set_reset(ah, ATH9K_RESET_WARM); + } + +@@ -1399,7 +1400,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st ath9k_hw_init_qos(ah); if (ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT) @@ -190,3 +232,39 @@ spin_unlock_bh(&txq->axq_lock); txok = !(txs.ts_status & ATH9K_TXERR_MASK); +--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c ++++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c +@@ -714,8 +714,7 @@ static void ath9k_set_hw_capab(struct at + IEEE80211_HW_HAS_RATE_CONTROL | + IEEE80211_HW_RX_INCLUDES_FCS | + IEEE80211_HW_SUPPORTS_PS | +- IEEE80211_HW_PS_NULLFUNC_STACK | +- IEEE80211_HW_NEED_DTIM_PERIOD; ++ IEEE80211_HW_PS_NULLFUNC_STACK; + + hw->wiphy->interface_modes = + BIT(NL80211_IFTYPE_STATION) | +--- a/drivers/net/wireless/ath/ath9k/init.c ++++ b/drivers/net/wireless/ath/ath9k/init.c +@@ -646,8 +646,7 @@ void ath9k_set_hw_capab(struct ath_softc + IEEE80211_HW_SUPPORTS_PS | + IEEE80211_HW_PS_NULLFUNC_STACK | + IEEE80211_HW_SPECTRUM_MGMT | +- IEEE80211_HW_REPORTS_TX_ACK_STATUS | +- IEEE80211_HW_NEED_DTIM_PERIOD; ++ IEEE80211_HW_REPORTS_TX_ACK_STATUS; + + if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) + hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION; +--- a/drivers/net/wireless/ath/ath9k/main.c ++++ b/drivers/net/wireless/ath/ath9k/main.c +@@ -285,7 +285,8 @@ int ath_set_channel(struct ath_softc *sc + ath9k_hw_set_interrupts(ah, ah->imask); + + if (!(sc->sc_flags & (SC_OP_OFFCHANNEL))) { +- ath_beacon_config(sc, NULL); ++ if (sc->sc_flags & SC_OP_BEACONS) ++ ath_beacon_config(sc, NULL); + ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); + ath_start_ani(common); + }