On Tue, Aug 10, 2021 at 10:47:45PM +0000, Mikolaj Kucharski wrote:
> Just got kernel panic, with above change committed while ago, panic says
> now:
>
> ieee80211_encrypt: key unset for sw crypto: id=0 cipher=0 flags=0x0
This looks like we're trying to use a key which has been zeroed out.
I am not sure what the reason could be.
Could there be a race between the software beacon alert (SWBA) interrupt
firing and ic_bss getting cleared?
Could you please run with 'ifconfig athn0 debug' enabled to see whether
interface state changes are related to this panic?
Perhaps ignoring the SWBA interrupt while we're not in RUN state will help?
diff 890267c38467536339d2a8e108a0aa0e83e8bdcc /usr/src
blob - ea1f278ed8f363012fc1922c04adf311b50d38e9
file + sys/dev/ic/ar5008.c
--- sys/dev/ic/ar5008.c
+++ sys/dev/ic/ar5008.c
@@ -1245,6 +1245,10 @@ ar5008_swba_intr(struct athn_softc *sc)
uint8_t ridx, hwrate;
int error, totlen;
+ if (ic->ic_opmode != IEEE80211_M_HOSTAP ||
+ ic->ic_state != IEEE80211_S_RUN)
+ return (ENOTSUP);
+
if (ic->ic_tim_mcast_pending &&
mq_empty(&ni->ni_savedq) &&
SIMPLEQ_EMPTY(&sc->txq[ATHN_QID_CAB].head))