Home | History | Annotate | Line # | Download | only in net80211
ieee80211_netbsd.h revision 1.1.2.2
      1 #ifdef __FreeBSD__
      2 typedef struct mtx ieee80211_node_lock_t;
      3 #define	IEEE80211_NODE_LOCK_INIT(_ic, _name) \
      4 	mtx_init(&(_ic)->ic_nodelock, _name, "802.11 node table", MTX_DEF)
      5 #define	IEEE80211_NODE_LOCK_DESTROY(_ic)	mtx_destroy(&(_ic)->ic_nodelock)
      6 #define	IEEE80211_NODE_LOCK(_ic)		mtx_lock(&(_ic)->ic_nodelock)
      7 #define	IEEE80211_NODE_UNLOCK(_ic)		mtx_unlock(&(_ic)->ic_nodelock)
      8 #define	IEEE80211_NODE_LOCK_ASSERT(_ic) \
      9 	mtx_assert(&(_ic)->ic_nodelock, MA_OWNED)
     10 #else
     11 typedef int ieee80211_node_lock_t;
     12 #define	IEEE80211_NODE_LOCK_INIT(_ic, _name)
     13 #define	IEEE80211_NODE_LOCK_DESTROY(_ic)
     14 #define	IEEE80211_NODE_LOCK(_ic)		(_ic)->ic_nodelock = splnet()
     15 #define	IEEE80211_NODE_UNLOCK(_ic)		splx((_ic)->ic_nodelock)
     16 #define	IEEE80211_NODE_LOCK_ASSERT(_ic)
     17 #endif
     18 #define	IEEE80211_NODE_LOCK_BH		IEEE80211_NODE_LOCK
     19 #define	IEEE80211_NODE_UNLOCK_BH	IEEE80211_NODE_UNLOCK
     20