Same fix as applied to iwx(4) in March. Since iwm(4) does not use a task
for key installation and removal the same race might not manifest here.
However, trying to delete a key while the station is not in firmware
is wrong in any case. And this code might get moved into a task later.
-/* $OpenBSD: if_iwm.c,v 1.409 2023/09/02 08:57:46 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.410 2023/09/02 09:02:18 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
return;
}
+ if ((sc->sc_flags & IWM_FLAG_STA_ACTIVE) == 0)
+ return;
+
if (!isset(sc->sc_ucode_api, IWM_UCODE_TLV_API_TKIP_MIC_KEYS))
return iwm_delete_key_v1(ic, ni, k);