mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
wifi: mac80211: fix beacon interval calculation overflow
[ Upstream commit 7a3750ff0f2e8fee338a9c168f429f6c37f0e820 ]
As we are converting from TU to usecs, a beacon interval of
100*1024 usecs will lead to integer wrapping. To fix change
to use a u32.
Fixes: 057d5f4ba1 ("mac80211: sync dtim_count to TSF")
Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Link: https://patch.msgid.link/20250621123209.511796-1-lachlan.hodges@morsemicro.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
5925f9f229
commit
14f42b7be2
1 changed files with 1 additions and 1 deletions
|
|
@ -3807,7 +3807,7 @@ void ieee80211_recalc_dtim(struct ieee80211_local *local,
|
|||
{
|
||||
u64 tsf = drv_get_tsf(local, sdata);
|
||||
u64 dtim_count = 0;
|
||||
u16 beacon_int = sdata->vif.bss_conf.beacon_int * 1024;
|
||||
u32 beacon_int = sdata->vif.bss_conf.beacon_int * 1024;
|
||||
u8 dtim_period = sdata->vif.bss_conf.dtim_period;
|
||||
struct ps_data *ps;
|
||||
u8 bcns_from_dtim;
|
||||
|
|
|
|||
Loading…
Reference in a new issue