summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2022-05-13 08:48:41 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2022-05-13 08:48:41 +0000
commiteb8af16af73e2b4c4dc56a950fb92a7ff98f6848 (patch)
tree53f8f1706e613d1ec9a2e30569dab23ddbee9f55
parent1538e4228883322cf4a12e0abbed7c967782ee8d (diff)
Show the iwx(4) firmware filename if 'ifconfig iwx0 debug' is active.
This should help with diagnosing device matching bugs. The matching logic has become increasingly complex. Knowing which firmware file was selected is useful information which cannot be inferred from the PCI device ID alone anymore.
-rw-r--r--sys/dev/pci/if_iwx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c
index 3c5564850fa..b663f902731 100644
--- a/sys/dev/pci/if_iwx.c
+++ b/sys/dev/pci/if_iwx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwx.c,v 1.147 2022/05/13 05:06:56 stsp Exp $ */
+/* $OpenBSD: if_iwx.c,v 1.148 2022/05/13 08:48:40 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -1173,6 +1173,7 @@ iwx_fw_info_free(struct iwx_fw_info *fw)
int
iwx_read_firmware(struct iwx_softc *sc)
{
+ struct ieee80211com *ic = &sc->sc_ic;
struct iwx_fw_info *fw = &sc->sc_fw;
struct iwx_tlv_ucode_header *uhdr;
struct iwx_ucode_tlv tlv;
@@ -1199,6 +1200,9 @@ iwx_read_firmware(struct iwx_softc *sc)
goto out;
}
+ if (ic->ic_if.if_flags & IFF_DEBUG)
+ printf("%s: using firmware %s\n", DEVNAME(sc), sc->sc_fwname);
+
sc->sc_capaflags = 0;
sc->sc_capa_n_scan_channels = IWX_DEFAULT_SCAN_CHANNELS;
memset(sc->sc_enabled_capa, 0, sizeof(sc->sc_enabled_capa));