Skip to content
Commit 84f23fb1 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

wifi: brcmfmac: work around a GCC 12 -Warray-bounds warning



GCC 12 really doesn't like partial struct allocations:

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:2202:32: warning: array subscript ‘struct brcmf_ext_join_params_le[0]’ is partly outside array bounds of ‘void[70]’ [-Warray-bounds]
 2202 |                 ext_join_params->scan_le.passive_time =
      |                                ^~

brcmfmac is trying to save 2 bytes at the end by either allocating
or not allocating a channel member. Let's keep @join_params_size
the "right" size but kmalloc() the full structure.

Acked-by: default avatarKalle Valo <kvalo@kernel.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent af3cdfd3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment