1 --- a/drivers/net/wireless/ath/ath9k/beacon.c
2 +++ b/drivers/net/wireless/ath/ath9k/beacon.c
3 @@ -654,7 +654,7 @@ static void ath_beacon_config_adhoc(stru
4 delta = (tsf - sc->beacon.bc_tstamp);
6 delta = (tsf + 1 + (~0U - sc->beacon.bc_tstamp));
7 - nexttbtt = tsf + roundup(delta, intval);
8 + nexttbtt = tsf + intval - (delta % intval);
11 ath_dbg(common, ATH_DBG_BEACON,