from iwm(4), which also looks at the TX_MGMT_ONLY flag. We don't expect
that flag to be ever set for bwfm(4), but it shouldn't hurt and it keeps
things consistent across drivers.
This fixes issues with suspend/resume (including firmware crashes seen on
the M2 Macbook Air).
ok patrick@, stsp@
-/* $OpenBSD: bwfm.c,v 1.105 2022/06/30 19:57:40 stsp Exp $ */
+/* $OpenBSD: bwfm.c,v 1.106 2022/12/30 16:49:34 kettenis Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
* Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se>
bwfm_start(struct ifnet *ifp)
{
struct bwfm_softc *sc = ifp->if_softc;
+ struct ieee80211com *ic = &sc->sc_ic;
struct mbuf *m;
if (!(ifp->if_flags & IFF_RUNNING))
break;
}
+ if (ic->ic_state != IEEE80211_S_RUN ||
+ (ic->ic_xflags & IEEE80211_F_TX_MGMT_ONLY))
+ break;
+
m = ifq_dequeue(&ifp->if_snd);
if (m == NULL)
break;