From 0e63b5929af6fb1557bc2fd7c2a477f1eb2a6a82 Mon Sep 17 00:00:00 2001 From: stsp Date: Fri, 9 Jul 2021 10:45:17 +0000 Subject: [PATCH] Reset sc_ucode_api flags before iwm(4) loads firmware. Fixes firmware re-loading after an initial attempt to load firmware failed. --- sys/dev/pci/if_iwm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 1c03b37e63a..47353683270 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.344 2021/07/09 10:42:35 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.345 2021/07/09 10:45:17 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -697,6 +697,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode_type ucode_type) sc->sc_capaflags = 0; sc->sc_capa_n_scan_channels = IWM_DEFAULT_SCAN_CHANNELS; memset(sc->sc_enabled_capa, 0, sizeof(sc->sc_enabled_capa)); + memset(sc->sc_ucode_api, 0, sizeof(sc->sc_ucode_api)); sc->n_cmd_versions = 0; uhdr = (void *)fw->fw_rawdata; -- 2.20.1