The branch main has been updated by kevlo: URL: https://cgit.FreeBSD.org/src/commit/?id=19d0dd87189e7daf665be9eeafed93f0d1a3ed25
commit 19d0dd87189e7daf665be9eeafed93f0d1a3ed25 Author: Kevin Lo <ke...@freebsd.org> AuthorDate: 2025-06-19 05:42:39 +0000 Commit: Kevin Lo <ke...@freebsd.org> CommitDate: 2025-06-19 05:42:39 +0000 mtw: fix display of the MAC revision Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D50542 --- sys/dev/usb/wlan/if_mtw.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/wlan/if_mtw.c b/sys/dev/usb/wlan/if_mtw.c index 1eb7869decfa..137590651948 100644 --- a/sys/dev/usb/wlan/if_mtw.c +++ b/sys/dev/usb/wlan/if_mtw.c @@ -516,7 +516,7 @@ mtw_attach(device_t self) struct ieee80211com *ic = &sc->sc_ic; uint32_t ver; int i, ret; - // uint32_t tmp; + uint32_t tmp; uint8_t iface_index; int ntries, error; @@ -579,6 +579,11 @@ mtw_attach(device_t self) goto detach; } + + if (mtw_read(sc, MTW_MAC_VER_ID, &tmp) != 0) + goto detach; + sc->mac_rev = tmp & 0xffff; + mtw_load_microcode(sc); ret = msleep(&sc->fwloading, &sc->sc_mtx, 0, "fwload", 3 * hz); if (ret == EWOULDBLOCK || sc->fwloading != 1) {