* [PATCH] fixed hwsim beacon delta calculation
@ 2016-11-11 16:37 Benjamin Beichler
2016-11-15 13:42 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Beichler @ 2016-11-11 16:37 UTC (permalink / raw)
To: linux-wireless, johannes; +Cc: Benjamin Beichler
Due to the cast from uint32_t to int64_t, a wrong next beacon timing is
calculated and effectively the beacon timer stops to work. This is
especially bad for 802.11s mesh networks, because discovery breaks
without beacons.
Signed-off-by: Benjamin Beichler <benjamin.beichler@uni-rostock.de>
---
drivers/net/wireless/mac80211_hwsim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 8f366cc..8d7b0c6 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -819,7 +819,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));
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fixed hwsim beacon delta calculation
2016-11-11 16:37 [PATCH] fixed hwsim beacon delta calculation Benjamin Beichler
@ 2016-11-15 13:42 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2016-11-15 13:42 UTC (permalink / raw)
To: Benjamin Beichler, linux-wireless
On Fri, 2016-11-11 at 17:37 +0100, Benjamin Beichler wrote:
> Due to the cast from uint32_t to int64_t, a wrong next beacon timing
> is
> calculated and effectively the beacon timer stops to work. This is
> especially bad for 802.11s mesh networks, because discovery breaks
> without beacons.
>
Applied. Please note how I changed the commit subject, and use that
scheme in the future.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-15 13:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-11 16:37 [PATCH] fixed hwsim beacon delta calculation Benjamin Beichler
2016-11-15 13:42 ` Johannes Berg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.