Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/iwn/if_iwnvar.h
Show First 20 Lines • Show All 231 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
#define IWN_VAP(_vap) ((struct iwn_vap *)(_vap)) | #define IWN_VAP(_vap) ((struct iwn_vap *)(_vap)) | ||||
struct iwn_softc { | struct iwn_softc { | ||||
device_t sc_dev; | device_t sc_dev; | ||||
int sc_debug; | int sc_debug; | ||||
struct cdev *sc_cdev; | struct cdev *sc_cdev; | ||||
struct mtx sc_mtx; | struct mtx sc_mtx; | ||||
struct mtx sc_cmd_mtx; | |||||
struct ieee80211com sc_ic; | struct ieee80211com sc_ic; | ||||
struct ieee80211_ratectl_tx_status sc_txs; | struct ieee80211_ratectl_tx_status sc_txs; | ||||
u_int sc_flags; | u_int sc_flags; | ||||
#define IWN_FLAG_HAS_OTPROM (1 << 1) | #define IWN_FLAG_HAS_OTPROM (1 << 1) | ||||
#define IWN_FLAG_CALIB_DONE (1 << 2) | #define IWN_FLAG_CALIB_DONE (1 << 2) | ||||
#define IWN_FLAG_USE_ICT (1 << 3) | #define IWN_FLAG_USE_ICT (1 << 3) | ||||
#define IWN_FLAG_INTERNAL_PA (1 << 4) | #define IWN_FLAG_INTERNAL_PA (1 << 4) | ||||
▲ Show 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | |||||
#define IWN_LOCK_INIT(_sc) \ | #define IWN_LOCK_INIT(_sc) \ | ||||
mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ | mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ | ||||
MTX_NETWORK_LOCK, MTX_DEF) | MTX_NETWORK_LOCK, MTX_DEF) | ||||
#define IWN_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) | #define IWN_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) | ||||
#define IWN_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) | #define IWN_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) | ||||
#define IWN_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) | #define IWN_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) | ||||
#define IWN_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) | #define IWN_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) | ||||
#define IWN_CMD_LOCK_INIT(_sc) \ | |||||
mtx_init(&(_sc)->sc_cmd_mtx, device_get_nameunit((_sc)->sc_dev), \ | |||||
"iwncmd", MTX_DEF) | |||||
#define IWN_CMD_LOCK(_sc) mtx_lock(&(_sc)->sc_cmd_mtx) | |||||
#define IWN_CMD_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_cmd_mtx, MA_OWNED) | |||||
#define IWN_CMD_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_cmd_mtx) | |||||
#define IWN_CMD_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_cmd_mtx) |