git: d6cce475cb5f - main - mtw: Pass the right pointer to the constructed command in mtw_mcu_radio
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Feb 2025 22:17:16 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d6cce475cb5f5c449532984e9c661596950fa26e commit d6cce475cb5f5c449532984e9c661596950fa26e Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2025-02-12 22:13:33 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2025-02-12 22:17:00 +0000 mtw: Pass the right pointer to the constructed command in mtw_mcu_radio This was just using random stack garbage before. Reported by: GCC -Wunused-but-set-variable --- sys/dev/usb/wlan/if_mtw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/usb/wlan/if_mtw.c b/sys/dev/usb/wlan/if_mtw.c index ecd4693e2361..d7970af5d876 100644 --- a/sys/dev/usb/wlan/if_mtw.c +++ b/sys/dev/usb/wlan/if_mtw.c @@ -4384,7 +4384,7 @@ mtw_mcu_radio(struct mtw_softc *sc, int func, uint32_t val) cmd.r2 = htole32(val); cmd.r3 = 0; cmd.r4 = 0; - return (mtw_mcu_cmd(sc, 8, &val, sizeof(struct mtw_mcu_cmd_16))); + return (mtw_mcu_cmd(sc, 8, &cmd, sizeof(struct mtw_mcu_cmd_16))); } static void mtw_init_locked(struct mtw_softc *sc)