mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 21:44:23 -04:00
staging: wfx: fix wrong bytes order
The field wakeup_period_max from struct hif_mib_beacon_wake_up_period is a u8. So, assigning it a __le16 produces a nasty bug on big-endian architectures. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200512150414.267198-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
095e86c86a
commit
9b3bc20d98
@@ -32,7 +32,7 @@ int hif_set_beacon_wakeup_period(struct wfx_vif *wvif,
|
||||
struct hif_mib_beacon_wake_up_period val = {
|
||||
.wakeup_period_min = dtim_interval,
|
||||
.receive_dtim = 0,
|
||||
.wakeup_period_max = cpu_to_le16(listen_interval),
|
||||
.wakeup_period_max = listen_interval,
|
||||
};
|
||||
|
||||
if (dtim_interval > 0xFF || listen_interval > 0xFFFF)
|
||||
|
||||
Reference in New Issue
Block a user