summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_wxvar.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci/if_wxvar.h')
-rw-r--r--sys/pci/if_wxvar.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/pci/if_wxvar.h b/sys/pci/if_wxvar.h
index 71fec0e..c665ef0 100644
--- a/sys/pci/if_wxvar.h
+++ b/sys/pci/if_wxvar.h
@@ -375,8 +375,12 @@ typedef struct wx_softc {
wxtd_t *tdescriptors; /* transmit descriptor ring */
u_int16_t tnxtfree; /* next free index (circular) */
u_int16_t tactive; /* # active */
+ struct mtx wx_mtx;
} wx_softc_t;
+#define WX_LOCK(_sc) mtx_enter(&(_sc)->wx_mtx, MTX_DEF)
+#define WX_UNLOCK(_sc) mtx_exit(&(_sc)->wx_mtx, MTX_DEF)
+
/*
* We offset the the receive frame header by two bytes so that the actual
* payload is 32 bit aligned. On platforms that require strict structure
OpenPOWER on IntegriCloud