Commit 204bb852 authored by Kees Cook's avatar Kees Cook Committed by Johannes Berg
Browse files

wifi: brcmfmac: cyw: Fix __counted_by to be LE variant



In brcmf_cyw_mgmt_tx() the "len" counter of the struct
brcmf_mf_params_le::data flexible array is stored as little-endian via
cpu_to_le16() so the __counted_by_le() variant must be used:

	struct brcmf_mf_params_le *mf_params;
	...
	mf_params_len = offsetof(struct brcmf_mf_params_le, data) +
			(len - DOT11_MGMT_HDR_LEN);
	mf_params = kzalloc(mf_params_len, GFP_KERNEL);
	...
        mf_params->len = cpu_to_le16(len - DOT11_MGMT_HDR_LEN);

Fixes: 66f90930 ("wifi: brcmfmac: cyw: support external SAE authentication in station mode")
Signed-off-by: default avatarKees Cook <kees@kernel.org>
Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com&gt;>
Link: https://patch.msgid.link/20250721181810.work.575-kees@kernel.org


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 708243c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment