提交 4fb7f8af 编写于 作者: B Benjamin Beichler 提交者: Johannes Berg

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: NBenjamin Beichler <benjamin.beichler@uni-rostock.de>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 a786f96d
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册