mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
wifi: mwifiex: fix endianness handling in mwifiex_send_rgpower_table
The length of the host command is a u16 stored in little endian byte
order, which needs byte order conversion to work correctly on big endian
systems.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-wireless/aLqZI4FfOI4iJZtf@stanley.mountain
Fixes: 7b6f16a258 ("wifi: mwifiex: add rgpower table loading support")
Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://patch.msgid.link/20250910-for-next-v1-1-3ee311706231@pengutronix.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
6f4f8abad4
commit
1b2e9feb35
|
|
@ -1537,7 +1537,7 @@ int mwifiex_send_rgpower_table(struct mwifiex_private *priv, const u8 *data,
|
|||
}
|
||||
|
||||
if (*pos == '}' && start_raw) {
|
||||
memcpy(&hostcmd->len, &hostcmd->cmd[2], sizeof(u16));
|
||||
hostcmd->len = get_unaligned_le16(&hostcmd->cmd[2]);
|
||||
ret = mwifiex_send_cmd(priv, 0, 0, 0, hostcmd, false);
|
||||
if (ret) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user