aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2025-06-19 05:42:39 +0000
committerKevin Lo <kevlo@FreeBSD.org>2025-06-19 05:42:39 +0000
commit19d0dd87189e7daf665be9eeafed93f0d1a3ed25 (patch)
treeaccd8bca6ac5e9f042e418fac0bbbd023ba0bec7
parentf51c794cbc80682931d47264e3c18329bae0a2c1 (diff)
mtw: fix display of the MAC revision
Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D50542
-rw-r--r--sys/dev/usb/wlan/if_mtw.c7
1 files changed, 6 insertions, 1 deletions
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) {