diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2023-03-06 11:33:58 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2023-03-06 11:33:58 +0000 |
commit | 474627b1bea306d651b1b2375eb2475c9e5114d7 (patch) | |
tree | 94e2c87c6efce4e3bf07b35e48b39992ce39a88d | |
parent | 94a3398e9b571274eedf6337cfbbc98a9471fb37 (diff) |
Avoid trying to remove keys if the station is not active in iwx firmware.
Fixes a firmware panic I encountered while working on firmware upgrades.
-rw-r--r-- | sys/dev/pci/if_iwx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index b0f217634d7..b1d8498a5fb 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.166 2023/03/06 11:30:46 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.167 2023/03/06 11:33:57 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -8577,6 +8577,9 @@ iwx_delete_key(struct ieee80211com *ic, struct ieee80211_node *ni, struct iwx_softc *sc = ic->ic_softc; struct iwx_add_sta_key_cmd cmd; + if ((sc->sc_flags & IWX_FLAG_STA_ACTIVE) == 0) + return; + if (k->k_cipher != IEEE80211_CIPHER_CCMP) { /* Fallback to software crypto for other ciphers. */ ieee80211_delete_key(ic, ni, k); |