summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mac80211_hwsim.c
diff options
context:
space:
mode:
authorBenjamin Beichler <benjamin.beichler@uni-rostock.de>2016-11-11 17:37:56 +0100
committerJohannes Berg <johannes.berg@intel.com>2016-11-15 14:39:56 +0100
commit4fb7f8af1f4c14a2a6cee7c9ff0cf999d918c72d (patch)
tree440ea6c901cb1367be2592041196b08f9efe097b /drivers/net/wireless/mac80211_hwsim.c
parenta786f96da0d657bf8bd56d8eebb3f31cc45605bb (diff)
downloadop-kernel-dev-4fb7f8af1f4c14a2a6cee7c9ff0cf999d918c72d.zip
op-kernel-dev-4fb7f8af1f4c14a2a6cee7c9ff0cf999d918c72d.tar.gz
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>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 431f13b..d3bad57 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);
}
}
OpenPOWER on IntegriCloud