summaryrefslogtreecommitdiffstats
path: root/sys/dev/an
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/an')
-rw-r--r--sys/dev/an/if_an.c4
-rw-r--r--sys/dev/an/if_anreg.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c
index 15cd3e0..ec96d95 100644
--- a/sys/dev/an/if_an.c
+++ b/sys/dev/an/if_an.c
@@ -833,6 +833,8 @@ an_rxeof(sc)
struct an_card_rx_desc an_rx_desc;
u_int8_t *buf;
+ AN_LOCK_ASSERT(sc);
+
ifp = &sc->arpcom.ac_if;
if (!sc->mpi350) {
@@ -981,7 +983,9 @@ an_rxeof(sc)
rx_frame.an_rx_signal_strength,
rx_frame.an_rsvd0);
#endif
+ AN_UNLOCK(sc);
(*ifp->if_input)(ifp, m);
+ AN_LOCK(sc);
}
} else { /* MPI-350 */
diff --git a/sys/dev/an/if_anreg.h b/sys/dev/an/if_anreg.h
index 86b5efa..6ed2bf9 100644
--- a/sys/dev/an/if_anreg.h
+++ b/sys/dev/an/if_anreg.h
@@ -502,6 +502,7 @@ struct an_softc {
#define AN_LOCK(_sc) mtx_lock(&(_sc)->an_mtx)
#define AN_UNLOCK(_sc) mtx_unlock(&(_sc)->an_mtx)
+#define AN_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->an_mtx, MA_OWNED)
void an_release_resources (device_t);
int an_alloc_port (device_t, int, int);
OpenPOWER on IntegriCloud