aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/571-ath9k_fix_adhoc_nexttbtt.patch
blob: 544c7a9c9f1fef2b0d272b1b0d1705ea3a5669fa (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -654,7 +654,7 @@ static void ath_beacon_config_adhoc(stru
 			delta = (tsf - sc->beacon.bc_tstamp);
 		else
 			delta = (tsf + 1 + (~0U - sc->beacon.bc_tstamp));
-		nexttbtt = tsf + roundup(delta, intval);
+		nexttbtt = tsf + intval - (delta % intval);
 	}
 
 	ath_dbg(common, ATH_DBG_BEACON,