1
0
Fork 0

mac80211_hwsim: fix beacon delta calculation

Due to the cast from uint32_t to int64_t, a wrong next beacon timing is
calculated and effectively the beacon timer stops working. This is
especially bad for 802.11s mesh networks, because discovery breaks
without beacons.

Signed-off-by: Benjamin Beichler <benjamin.beichler@uni-rostock.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
hifive-unleashed-5.1
Benjamin Beichler 2016-11-11 17:37:56 +01:00 committed by Johannes Berg
parent a786f96da0
commit 4fb7f8af1f
1 changed files with 1 additions and 1 deletions

View File

@ -826,7 +826,7 @@ static void mac80211_hwsim_set_tsf(struct ieee80211_hw *hw,
data->bcn_delta = do_div(delta, bcn_int);
} else {
data->tsf_offset -= delta;
data->bcn_delta = -do_div(delta, bcn_int);
data->bcn_delta = -(s64)do_div(delta, bcn_int);
}
}