diff options
author | Benjamin Beichler <benjamin.beichler@uni-rostock.de> | 2016-11-11 19:37:56 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-11-15 16:39:56 +0300 |
commit | 4fb7f8af1f4c14a2a6cee7c9ff0cf999d918c72d (patch) | |
tree | 440ea6c901cb1367be2592041196b08f9efe097b | |
parent | a786f96da0d657bf8bd56d8eebb3f31cc45605bb (diff) | |
download | linux-4fb7f8af1f4c14a2a6cee7c9ff0cf999d918c72d.tar.xz |
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>
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 431f13b4faf6..d3bad5779376 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -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); } } |