Changeset View
Changeset View
Standalone View
Standalone View
sys/net80211/ieee80211_freebsd.h
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
#define IEEE80211_TX_LOCK(_ic) mtx_lock(IEEE80211_TX_LOCK_OBJ(_ic)) | #define IEEE80211_TX_LOCK(_ic) mtx_lock(IEEE80211_TX_LOCK_OBJ(_ic)) | ||||
#define IEEE80211_TX_UNLOCK(_ic) mtx_unlock(IEEE80211_TX_LOCK_OBJ(_ic)) | #define IEEE80211_TX_UNLOCK(_ic) mtx_unlock(IEEE80211_TX_LOCK_OBJ(_ic)) | ||||
#define IEEE80211_TX_LOCK_ASSERT(_ic) \ | #define IEEE80211_TX_LOCK_ASSERT(_ic) \ | ||||
mtx_assert(IEEE80211_TX_LOCK_OBJ(_ic), MA_OWNED) | mtx_assert(IEEE80211_TX_LOCK_OBJ(_ic), MA_OWNED) | ||||
#define IEEE80211_TX_UNLOCK_ASSERT(_ic) \ | #define IEEE80211_TX_UNLOCK_ASSERT(_ic) \ | ||||
mtx_assert(IEEE80211_TX_LOCK_OBJ(_ic), MA_NOTOWNED) | mtx_assert(IEEE80211_TX_LOCK_OBJ(_ic), MA_NOTOWNED) | ||||
/* | /* | ||||
* Watchdog lock. | |||||
*/ | |||||
typedef struct { | |||||
char name[16]; /* e.g. "ath0_wt_lock" */ | |||||
struct mtx mtx; | |||||
} ieee80211_wt_lock_t; | |||||
#define IEEE80211_WT_LOCK_INIT(_ic, _name) do { \ | |||||
ieee80211_wt_lock_t *wl = &(_ic)->ic_wtlock; \ | |||||
snprintf(wl->name, sizeof(wl->name), "%s_wt_lock", _name); \ | |||||
mtx_init(&wl->mtx, wl->name, NULL, MTX_DEF); \ | |||||
} while (0) | |||||
#define IEEE80211_WT_LOCK_OBJ(_ic) (&(_ic)->ic_wtlock.mtx) | |||||
#define IEEE80211_WT_LOCK_DESTROY(_ic) mtx_destroy(IEEE80211_WT_LOCK_OBJ(_ic)) | |||||
#define IEEE80211_WT_LOCK(_ic) mtx_lock(IEEE80211_WT_LOCK_OBJ(_ic)) | |||||
#define IEEE80211_WT_UNLOCK(_ic) mtx_unlock(IEEE80211_WT_LOCK_OBJ(_ic)) | |||||
/* | |||||
* Node locking definitions. | * Node locking definitions. | ||||
*/ | */ | ||||
typedef struct { | typedef struct { | ||||
char name[16]; /* e.g. "ath0_node_lock" */ | char name[16]; /* e.g. "ath0_node_lock" */ | ||||
struct mtx mtx; | struct mtx mtx; | ||||
} ieee80211_node_lock_t; | } ieee80211_node_lock_t; | ||||
#define IEEE80211_NODE_LOCK_INIT(_nt, _name) do { \ | #define IEEE80211_NODE_LOCK_INIT(_nt, _name) do { \ | ||||
ieee80211_node_lock_t *nl = &(_nt)->nt_nodelock; \ | ieee80211_node_lock_t *nl = &(_nt)->nt_nodelock; \ | ||||
▲ Show 20 Lines • Show All 234 Lines • ▼ Show 20 Lines | |||||
void ieee80211_process_callback(struct ieee80211_node *, struct mbuf *, int); | void ieee80211_process_callback(struct ieee80211_node *, struct mbuf *, int); | ||||
#define NET80211_TAG_XMIT_PARAMS 1 | #define NET80211_TAG_XMIT_PARAMS 1 | ||||
/* See below; this is after the bpf_params definition */ | /* See below; this is after the bpf_params definition */ | ||||
#define NET80211_TAG_RECV_PARAMS 2 | #define NET80211_TAG_RECV_PARAMS 2 | ||||
struct ieee80211com; | struct ieee80211com; | ||||
void ieee80211_tx_watchdog_attach(struct ieee80211com *); | |||||
void ieee80211_tx_watchdog_refresh(struct ieee80211com *, int); | |||||
void ieee80211_tx_watchdog_stop(struct ieee80211com *); | |||||
void ieee80211_tx_watchdog_detach(struct ieee80211com *); | |||||
int ieee80211_parent_xmitpkt(struct ieee80211com *, struct mbuf *); | int ieee80211_parent_xmitpkt(struct ieee80211com *, struct mbuf *); | ||||
int ieee80211_vap_xmitpkt(struct ieee80211vap *, struct mbuf *); | int ieee80211_vap_xmitpkt(struct ieee80211vap *, struct mbuf *); | ||||
void get_random_bytes(void *, size_t); | void get_random_bytes(void *, size_t); | ||||
void ieee80211_sysctl_attach(struct ieee80211com *); | void ieee80211_sysctl_attach(struct ieee80211com *); | ||||
void ieee80211_sysctl_detach(struct ieee80211com *); | void ieee80211_sysctl_detach(struct ieee80211com *); | ||||
void ieee80211_sysctl_vattach(struct ieee80211vap *); | void ieee80211_sysctl_vattach(struct ieee80211vap *); | ||||
▲ Show 20 Lines • Show All 333 Lines • Show Last 20 Lines |