From: stsp Date: Fri, 13 May 2022 08:48:40 +0000 (+0000) Subject: Show the iwx(4) firmware filename if 'ifconfig iwx0 debug' is active. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=10a7ada3eefefc112842cc7d1db4720128540da7;p=openbsd 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. --- 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 @@ -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));