Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bwn/if_bwnvar.h
Show All 28 Lines | |||||
* THE POSSIBILITY OF SUCH DAMAGES. | * THE POSSIBILITY OF SUCH DAMAGES. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _IF_BWNVAR_H | #ifndef _IF_BWNVAR_H | ||||
#define _IF_BWNVAR_H | #define _IF_BWNVAR_H | ||||
struct siba_dev_softc; | #include "if_bwn_siba.h" | ||||
struct bwn_softc; | struct bwn_softc; | ||||
struct bwn_mac; | struct bwn_mac; | ||||
extern driver_t bwn_driver; | |||||
int bwn_attach(device_t dev); | |||||
int bwn_detach(device_t dev); | |||||
#define N(a) (sizeof(a) / sizeof(a[0])) | #define N(a) (sizeof(a) / sizeof(a[0])) | ||||
#define BWN_ALIGN 0x1000 | #define BWN_ALIGN 0x1000 | ||||
#define BWN_BUS_SPACE_MAXADDR_30BIT 0x3fffffff | #define BWN_BUS_SPACE_MAXADDR_30BIT 0x3fffffff | ||||
#define BWN_RETRY_SHORT 7 | #define BWN_RETRY_SHORT 7 | ||||
#define BWN_RETRY_LONG 4 | #define BWN_RETRY_LONG 4 | ||||
#define BWN_STAID_MAX 64 | #define BWN_STAID_MAX 64 | ||||
#define BWN_TXPWR_IGNORE_TIME (1 << 0) | #define BWN_TXPWR_IGNORE_TIME (1 << 0) | ||||
#define BWN_TXPWR_IGNORE_TSSI (1 << 1) | #define BWN_TXPWR_IGNORE_TSSI (1 << 1) | ||||
▲ Show 20 Lines • Show All 951 Lines • ▼ Show 20 Lines | struct bwn_vap { | ||||
int (*bv_newstate)(struct ieee80211vap *, | int (*bv_newstate)(struct ieee80211vap *, | ||||
enum ieee80211_state, int); | enum ieee80211_state, int); | ||||
}; | }; | ||||
#define BWN_VAP(vap) ((struct bwn_vap *)(vap)) | #define BWN_VAP(vap) ((struct bwn_vap *)(vap)) | ||||
#define BWN_VAP_CONST(vap) ((const struct mwl_vap *)(vap)) | #define BWN_VAP_CONST(vap) ((const struct mwl_vap *)(vap)) | ||||
struct bwn_softc { | struct bwn_softc { | ||||
device_t sc_dev; | device_t sc_dev; | ||||
const struct bwn_bus_ops *sc_bus_ops; | |||||
#if !BWN_USE_SIBA | |||||
void *sc_bus_ctx; | |||||
struct bhnd_resource *sc_mem_res; | |||||
int sc_mem_rid; | |||||
#endif /* !BWN_USE_SIBA */ | |||||
struct mtx sc_mtx; | struct mtx sc_mtx; | ||||
struct ieee80211com sc_ic; | struct ieee80211com sc_ic; | ||||
struct mbufq sc_snd; | struct mbufq sc_snd; | ||||
unsigned sc_flags; | unsigned sc_flags; | ||||
#define BWN_FLAG_ATTACHED (1 << 0) | #define BWN_FLAG_ATTACHED (1 << 0) | ||||
#define BWN_FLAG_INVALID (1 << 1) | #define BWN_FLAG_INVALID (1 << 1) | ||||
#define BWN_FLAG_NEED_BEACON_TP (1 << 2) | #define BWN_FLAG_NEED_BEACON_TP (1 << 2) | ||||
#define BWN_FLAG_RUNNING (1 << 3) | #define BWN_FLAG_RUNNING (1 << 3) | ||||
▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | |||||
static inline int | static inline int | ||||
bwn_get_chan_power(struct bwn_mac *mac, struct ieee80211_channel *c) | bwn_get_chan_power(struct bwn_mac *mac, struct ieee80211_channel *c) | ||||
{ | { | ||||
/* return in dbm */ | /* return in dbm */ | ||||
return c->ic_maxpower / 2; | return c->ic_maxpower / 2; | ||||
} | } | ||||
/* | |||||
* For now there's no bhnd bus support. Places where it matters | |||||
* should call this routine so we can start logging things. | |||||
*/ | |||||
static inline int | |||||
bwn_is_bus_siba(struct bwn_mac *mac) | |||||
{ | |||||
return 1; | |||||
} | |||||
#endif /* !_IF_BWNVAR_H */ | #endif /* !_IF_BWNVAR_H */ |