The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=dead34f82219b4017effc3a2e50ae3476870f6ab
commit dead34f82219b4017effc3a2e50ae3476870f6ab Author: Adrian Chadd <adr...@freebsd.org> AuthorDate: 2021-03-31 03:30:24 +0000 Commit: Adrian Chadd <adr...@freebsd.org> CommitDate: 2021-04-19 05:49:54 +0000 [ath_hal] ar9300: save TSF across full chip reset This saves the TSF across a a full reset. The TSF is otherwise cleared and subsequent beaconing stops until the TSF catches up to nexttbtt. --- sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c index 96a0e8741592..97276398c4d4 100644 --- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c +++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c @@ -4538,7 +4538,7 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch u_int8_t clk_25mhz = AH9300(ah)->clk_25mhz; HAL_BOOL stopped, cal_ret; HAL_BOOL apply_last_iqcorr = AH_FALSE; - + uint64_t tsf; if (OS_REG_READ(ah, AR_IER) == AR_IER_ENABLE) { HALDEBUG(AH_NULL, HAL_DEBUG_UNMASKABLE, "** Reset called with WLAN " @@ -4869,10 +4869,15 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch /* Mark PHY inactive prior to reset, to be undone in ar9300_init_bb () */ ar9300_mark_phy_inactive(ah); + /* Save/restore TSF across a potentially full reset */ + /* XXX TODO: only do this if we do a cold reset */ + tsf = ar9300_get_tsf64(ah); if (!ar9300_chip_reset(ah, chan, reset_type)) { HALDEBUG(ah, HAL_DEBUG_RESET, "%s: chip reset failed\n", __func__); FAIL(HAL_EIO); } + if (tsf != 0) + ar9300_set_tsf64(ah, tsf); OS_MARK(ah, AH_MARK_RESET_LINE, __LINE__); _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"