FreeBSD kernel MWL device code
|
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/kernel.h>
#include <sys/errno.h>
#include <sys/bus.h>
#include <sys/endian.h>
#include <sys/linker.h>
#include <sys/firmware.h>
#include <machine/bus.h>
#include <dev/mwl/mwlhal.h>
#include <dev/mwl/mwlreg.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <net/if.h>
#include <dev/mwl/mwldiag.h>
Go to the source code of this file.
Data Structures | |
struct | mwl_hal_bastream |
struct | mwl_hal_vap |
struct | mwl_hal_priv |
Macros | |
#define | MWLHAL_DEBUG /* debug msgs */ |
#define | MWL_CMDBUF_SIZE 0x4000 /* size of f/w command buffer */ |
#define | MWL_BASTREAMS_MAX 7 /* max BA streams (NB: fw >3.3.5.9) */ |
#define | MWL_BAQID_MAX 8 /* max BA Q id's (NB: fw >3.3.5.9) */ |
#define | MWL_MBSS_AP_MAX 8 /* max ap vap's */ |
#define | MWL_MBSS_STA_MAX 24 /* max station/client vap's */ |
#define | MWL_MBSS_MAX (MWL_MBSS_AP_MAX+MWL_MBSS_STA_MAX) |
#define | IEEE80211_ADDR_LEN 6 /* XXX */ |
#define | IEEE80211_ADDR_COPY(_dst, _src) memcpy(_dst, _src, IEEE80211_ADDR_LEN) |
#define | IEEE80211_ADDR_EQ(_dst, _src) (memcmp(_dst, _src, IEEE80211_ADDR_LEN) == 0) |
#define | _CMD_SETUP(pCmd, type, cmd) |
#define | _VCMD_SETUP(vap, pCmd, type, cmd) |
#define | PWTAGETRATETABLE20M 14*4 |
#define | PWTAGETRATETABLE40M 9*4 |
#define | PWTAGETRATETABLE20M_5G 35*4 |
#define | PWTAGETRATETABLE40M_5G 16*4 |
#define | MVF_RUNNING 0x01 /* BSS_START issued */ |
#define | MVF_STATION 0x02 /* sta db entry created */ |
#define | MWLVAP(_vap) ((_vap)->mh) |
#define | MHF_CALDATA 0x0001 /* cal data retrieved */ |
#define | MHF_FWHANG 0x0002 /* fw appears hung */ |
#define | MHF_MBSS 0x0004 /* mbss enabled */ |
#define | MWLPRIV(_mh) ((struct mwl_hal_priv *)(_mh)) |
#define | RATEVAL(r) ((r) &~ RATE_MCS) |
#define | RATETYPE(r) (((r) & RATE_MCS) ? HT_RATE_TYPE : LEGACY_RATE_TYPE) |
#define | __DECONST(type, var) ((type)(uintptr_t)(const void *)(var)) |
#define | MAX_WAIT_FW_COMPLETE_ITERATIONS 10000 |
#define | FW_DOWNLOAD_BLOCK_SIZE 256 |
#define | FW_CHECK_USECS (5*1000) /* 5ms */ |
#define | FW_MAX_NUM_CHECKS 200 |
#define | CMD(x) case HostCmd_CMD_##x: return #x |
Enumerations | |
enum | wlantennamode_e { WL_ANTENNAMODE_RX = 0xffff , WL_ANTENNAMODE_TX = 2 } |
enum | wltxpowerlevel_e { WL_TX_POWERLEVEL_LOW = 5 , WL_TX_POWERLEVEL_MEDIUM = 10 , WL_TX_POWERLEVEL_HIGH = 15 } |
Functions | |
static int | mwl_hal_setmac_locked (struct mwl_hal_vap *, const uint8_t addr[IEEE80211_ADDR_LEN]) |
static int | mwlExecuteCmd (struct mwl_hal_priv *, unsigned short cmd) |
static int | mwlGetPwrCalTable (struct mwl_hal_priv *) |
static const char * | mwlcmdname (int cmd) |
static void | dumpresult (struct mwl_hal_priv *, int showresult) |
SYSCTL_DECL (_hw_mwl) | |
static | SYSCTL_NODE (_hw_mwl, OID_AUTO, hal, CTLFLAG_RD|CTLFLAG_MPSAFE, 0, "Marvell HAL parameters") |
static __inline void | MWL_HAL_LOCK (struct mwl_hal_priv *mh) |
static __inline void | MWL_HAL_LOCK_ASSERT (struct mwl_hal_priv *mh) |
static __inline void | MWL_HAL_UNLOCK (struct mwl_hal_priv *mh) |
static __inline uint32_t | RD4 (struct mwl_hal_priv *mh, bus_size_t off) |
static __inline void | WR4 (struct mwl_hal_priv *mh, bus_size_t off, uint32_t val) |
static void | mwl_hal_load_cb (void *arg, bus_dma_segment_t *segs, int nsegs, int error) |
struct mwl_hal * | mwl_hal_attach (device_t dev, uint16_t devid, bus_space_handle_t ioh, bus_space_tag_t iot, bus_dma_tag_t tag) |
void | mwl_hal_detach (struct mwl_hal *mh0) |
static int | mwlResetHalState (struct mwl_hal_priv *mh) |
struct mwl_hal_vap * | mwl_hal_newvap (struct mwl_hal *mh0, MWL_HAL_BSSTYPE type, const uint8_t mac[IEEE80211_ADDR_LEN]) |
void | mwl_hal_delvap (struct mwl_hal_vap *vap) |
void | mwl_hal_setdebug (struct mwl_hal *mh, int debug) |
int | mwl_hal_getdebug (struct mwl_hal *mh) |
void | mwl_hal_setbastreams (struct mwl_hal *mh, int mask) |
int | mwl_hal_getbastreams (struct mwl_hal *mh) |
int | mwl_hal_ismbsscapable (struct mwl_hal *mh) |
void | mwl_hal_intrset (struct mwl_hal *mh0, uint32_t mask) |
void | mwl_hal_cmddone (struct mwl_hal *mh0) |
int | mwl_hal_gethwspecs (struct mwl_hal *mh0, struct mwl_hal_hwspec *hw) |
int | mwl_hal_sethwdma (struct mwl_hal *mh0, const struct mwl_hal_txrxdma *dma) |
int | mwl_hal_gethwstats (struct mwl_hal *mh0, struct mwl_hal_hwstats *stats) |
int | mwl_hal_sethtgi (struct mwl_hal_vap *vap, int GIType) |
int | mwl_hal_setradio (struct mwl_hal *mh0, int onoff, MWL_HAL_PREAMBLE preamble) |
int | mwl_hal_setantenna (struct mwl_hal *mh0, MWL_HAL_ANTENNA dirSet, int ant) |
int | mwl_hal_setrtsthreshold (struct mwl_hal_vap *vap, int threshold) |
int | mwl_hal_setinframode (struct mwl_hal_vap *vap) |
int | mwl_hal_setradardetection (struct mwl_hal *mh0, MWL_HAL_RADAR action) |
static uint32_t | cvtChannelFlags (const MWL_HAL_CHANNEL *chan) |
int | mwl_hal_setchannelswitchie (struct mwl_hal *mh0, const MWL_HAL_CHANNEL *nextchan, uint32_t mode, uint32_t count) |
int | mwl_hal_setregioncode (struct mwl_hal *mh0, int regionCode) |
int | mwl_hal_settxrate (struct mwl_hal_vap *vap, MWL_HAL_TXRATE_HANDLING handling, const MWL_HAL_TXRATE *rate) |
int | mwl_hal_settxrate_auto (struct mwl_hal *mh0, const MWL_HAL_TXRATE *rate) |
int | mwl_hal_setslottime (struct mwl_hal *mh0, int usecs) |
int | mwl_hal_adjusttxpower (struct mwl_hal *mh0, uint32_t level) |
static const struct mwl_hal_channel * | findchannel (const struct mwl_hal_priv *mh, const MWL_HAL_CHANNEL *c) |
int | mwl_hal_settxpower (struct mwl_hal *mh0, const MWL_HAL_CHANNEL *c, uint8_t maxtxpow) |
int | mwl_hal_getchannelinfo (struct mwl_hal *mh0, int band, int chw, const MWL_HAL_CHANNELINFO **ci) |
int | mwl_hal_setmcast (struct mwl_hal *mh0, int nmc, const uint8_t macs[]) |
int | mwl_hal_keyset (struct mwl_hal_vap *vap, const MWL_HAL_KEYVAL *kv, const uint8_t mac[IEEE80211_ADDR_LEN]) |
int | mwl_hal_keyreset (struct mwl_hal_vap *vap, const MWL_HAL_KEYVAL *kv, const uint8_t mac[IEEE80211_ADDR_LEN]) |
int | mwl_hal_setmac (struct mwl_hal_vap *vap, const uint8_t addr[IEEE80211_ADDR_LEN]) |
int | mwl_hal_setbeacon (struct mwl_hal_vap *vap, const void *frame, size_t frameLen) |
int | mwl_hal_setpowersave_bss (struct mwl_hal_vap *vap, uint8_t nsta) |
int | mwl_hal_setpowersave_sta (struct mwl_hal_vap *vap, uint16_t aid, int ena) |
int | mwl_hal_setassocid (struct mwl_hal_vap *vap, const uint8_t bssId[IEEE80211_ADDR_LEN], uint16_t assocId) |
int | mwl_hal_setchannel (struct mwl_hal *mh0, const MWL_HAL_CHANNEL *chan) |
static int | bastream_check_available (struct mwl_hal_vap *vap, int qid, const uint8_t Macaddr[IEEE80211_ADDR_LEN], uint8_t Tid, uint8_t ParamInfo) |
const MWL_HAL_BASTREAM * | mwl_hal_bastream_alloc (struct mwl_hal_vap *vap, int ba_policy, const uint8_t Macaddr[IEEE80211_ADDR_LEN], uint8_t Tid, uint8_t ParamInfo, void *a1, void *a2) |
const MWL_HAL_BASTREAM * | mwl_hal_bastream_lookup (struct mwl_hal *mh0, int s) |
int | mwl_hal_bastream_create (struct mwl_hal_vap *vap, const MWL_HAL_BASTREAM *s, int BarThrs, int WindowSize, uint16_t seqno) |
int | mwl_hal_bastream_destroy (struct mwl_hal *mh0, const MWL_HAL_BASTREAM *s) |
int | mwl_hal_bastream_get_seqno (struct mwl_hal *mh0, const MWL_HAL_BASTREAM *s, const uint8_t Macaddr[IEEE80211_ADDR_LEN], uint16_t *pseqno) |
int | mwl_hal_getwatchdogbitmap (struct mwl_hal *mh0, uint8_t bitmap[1]) |
int | mwl_hal_setaggampduratemode (struct mwl_hal *mh0, int mode, int threshold) |
int | mwl_hal_getaggampduratemode (struct mwl_hal *mh0, int *mode, int *threshold) |
int | mwl_hal_setcfend (struct mwl_hal *mh0, int ena) |
int | mwl_hal_setdwds (struct mwl_hal *mh0, int ena) |
static void | cvtPeerInfo (PeerInfo_t *to, const MWL_HAL_PEERINFO *from) |
int | mwl_hal_newstation (struct mwl_hal_vap *vap, const uint8_t addr[IEEE80211_ADDR_LEN], uint16_t aid, uint16_t sid, const MWL_HAL_PEERINFO *peer, int isQosSta, int wmeInfo) |
int | mwl_hal_delstation (struct mwl_hal_vap *vap, const uint8_t addr[IEEE80211_ADDR_LEN]) |
int | mwl_hal_setkeepalive (struct mwl_hal *mh0) |
int | mwl_hal_setapmode (struct mwl_hal_vap *vap, MWL_HAL_APMODE ApMode) |
int | mwl_hal_stop (struct mwl_hal_vap *vap) |
int | mwl_hal_start (struct mwl_hal_vap *vap) |
int | mwl_hal_setgprot (struct mwl_hal *mh0, int prot) |
int | mwl_hal_setwmm (struct mwl_hal *mh0, int onoff) |
int | mwl_hal_setedcaparams (struct mwl_hal *mh0, uint8_t qnum, uint32_t CWmin, uint32_t CWmax, uint8_t AIFSN, uint16_t TXOPLimit) |
int | mwl_hal_setrateadaptmode (struct mwl_hal *mh0, uint16_t mode) |
int | mwl_hal_setcsmode (struct mwl_hal *mh0, MWL_HAL_CSMODE csmode) |
int | mwl_hal_setnprot (struct mwl_hal_vap *vap, MWL_HAL_HTPROTECT mode) |
int | mwl_hal_setnprotmode (struct mwl_hal_vap *vap, uint8_t mode) |
int | mwl_hal_setoptimizationlevel (struct mwl_hal *mh0, int level) |
int | mwl_hal_setmimops (struct mwl_hal *mh0, const uint8_t addr[IEEE80211_ADDR_LEN], uint8_t enable, uint8_t mode) |
static int | mwlGetCalTable (struct mwl_hal_priv *mh, uint8_t annex, uint8_t index) |
static void | setmaxtxpow (struct mwl_hal_channel *hc, int i, int maxix) |
static void | get5Ghz (MWL_HAL_CHANNELINFO *ci, const uint8_t table[], int len) |
static uint16_t | ieee2mhz (int chan) |
static void | get2Ghz (MWL_HAL_CHANNELINFO *ci, const uint8_t table[], int len) |
int | mwl_hal_getregioncode (struct mwl_hal *mh0, uint8_t *countryCode) |
int | mwl_hal_setpromisc (struct mwl_hal *mh0, int ena) |
int | mwl_hal_getpromisc (struct mwl_hal *mh0) |
int | mwl_hal_GetBeacon (struct mwl_hal *mh0, uint8_t *pBcn, uint16_t *pLen) |
int | mwl_hal_SetRifs (struct mwl_hal *mh0, uint8_t QNum) |
static int | getRFReg (struct mwl_hal_priv *mh, int flag, uint32_t reg, uint32_t *val) |
static int | getBBReg (struct mwl_hal_priv *mh, int flag, uint32_t reg, uint32_t *val) |
static u_int | mwl_hal_getregdump (struct mwl_hal_priv *mh, const MWL_DIAG_REGRANGE *regs, void *dstbuf, int space) |
int | mwl_hal_getdiagstate (struct mwl_hal *mh0, int request, const void *args, uint32_t argsize, void **result, uint32_t *resultsize) |
static void | mwlSendCmd (struct mwl_hal_priv *mh) |
static int | mwlWaitForCmdComplete (struct mwl_hal_priv *mh, uint16_t cmdCode) |
static void | mwlFwReset (struct mwl_hal_priv *mh) |
static void | mwlTriggerPciCmd (struct mwl_hal_priv *mh) |
static int | mwlWaitFor (struct mwl_hal_priv *mh, uint32_t val) |
static int | mwlSendBlock (struct mwl_hal_priv *mh, int bsize, const void *data, size_t dsize) |
static int | mwlSendBlock2 (struct mwl_hal_priv *mh, const void *data, size_t dsize) |
static void | mwlPokeSdramController (struct mwl_hal_priv *mh, int SDRAMSIZE_Addr) |
int | mwl_hal_fwload (struct mwl_hal *mh0, void *fwargs) |
Variables | |
static const int | ba2qid [MWL_BASTREAMS_MAX] |
static int | qid2ba [MWL_BAQID_MAX] |
#define __DECONST | ( | type, | |
var | |||
) | ((type)(uintptr_t)(const void *)(var)) |
#define _CMD_SETUP | ( | pCmd, | |
type, | |||
cmd | |||
) |
#define _VCMD_SETUP | ( | vap, | |
pCmd, | |||
type, | |||
cmd | |||
) |
#define CMD | ( | x | ) | case HostCmd_CMD_##x: return #x |
#define IEEE80211_ADDR_COPY | ( | _dst, | |
_src | |||
) | memcpy(_dst, _src, IEEE80211_ADDR_LEN) |
#define IEEE80211_ADDR_EQ | ( | _dst, | |
_src | |||
) | (memcmp(_dst, _src, IEEE80211_ADDR_LEN) == 0) |
#define MAX_WAIT_FW_COMPLETE_ITERATIONS 10000 |
#define MWL_BAQID_MAX 8 /* max BA Q id's (NB: fw >3.3.5.9) */ |
#define MWL_BASTREAMS_MAX 7 /* max BA streams (NB: fw >3.3.5.9) */ |
#define MWL_CMDBUF_SIZE 0x4000 /* size of f/w command buffer */ |
#define MWL_MBSS_MAX (MWL_MBSS_AP_MAX+MWL_MBSS_STA_MAX) |
#define MWLPRIV | ( | _mh | ) | ((struct mwl_hal_priv *)(_mh)) |
#define RATETYPE | ( | r | ) | (((r) & RATE_MCS) ? HT_RATE_TYPE : LEGACY_RATE_TYPE) |
enum wlantennamode_e |
enum wltxpowerlevel_e |
|
static |
Definition at line 1372 of file mwlhal.c.
References _VCMD_SETUP, BaCheckCreateStream, BASTREAM_FLAG_DIRECTION_UPSTREAM, BASTREAM_FLAG_IMMEDIATE_TYPE, HostCmd_CMD_BASTREAM, HostCmd_RESULT_OK, IEEE80211_ADDR_COPY, MWL_HAL_LOCK_ASSERT(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_hal_bastream_alloc().
|
static |
Definition at line 843 of file mwlhal.c.
References CH_10_MHz_WIDTH, CH_20_MHz_WIDTH, CH_40_MHz_WIDTH, MWL_HAL_CHANNEL::channelFlags, EXT_CH_ABOVE_CTRL_CH, EXT_CH_BELOW_CTRL_CH, EXT_CH_NONE, FREQ_BAND_2DOT4GHZ, FREQ_BAND_5GHZ, MWL_HAL_CHANNEL_FLAGS::FreqBand, MWL_CH_10_MHz_WIDTH, MWL_CH_20_MHz_WIDTH, MWL_CH_40_MHz_WIDTH, MWL_EXT_CH_ABOVE_CTRL_CH, MWL_EXT_CH_BELOW_CTRL_CH, MWL_EXT_CH_NONE, and MWL_FREQ_BAND_2DOT4GHZ.
Referenced by mwl_hal_setchannel(), and mwl_hal_setchannelswitchie().
|
static |
Definition at line 1670 of file mwlhal.c.
Referenced by mwl_hal_newstation().
|
static |
Definition at line 2746 of file mwlhal.c.
References HostCmd_RESULT_PARTIAL_DATA, mwl_hal_priv::mh_cmdbuf, mwl_hal_priv::mh_dev, and mwlcmdname().
Referenced by mwl_hal_cmddone(), and mwlExecuteCmd().
|
static |
Definition at line 1066 of file mwlhal.c.
References MWL_HAL_CHANNEL::channel, MWL_HAL_CHANNEL::channelFlags, MWL_HAL_CHANNELINFO::channels, MWL_HAL_CHANNEL_FLAGS::FreqBand, MWL_HAL_CHANNELINFO::mwl_hal_channel::ieee, mwl_hal_priv::mh_20M, mwl_hal_priv::mh_20M_5G, mwl_hal_priv::mh_40M, mwl_hal_priv::mh_40M_5G, MWL_CH_40_MHz_WIDTH, MWL_EXT_CH_BELOW_CTRL_CH, MWL_FREQ_BAND_2DOT4GHZ, MWL_FREQ_BAND_5GHZ, and MWL_HAL_CHANNELINFO::nchannels.
Referenced by mwl_hal_settxpower().
|
static |
Definition at line 2068 of file mwlhal.c.
References MWL_HAL_CHANNELINFO::channels, MWL_HAL_CHANNELINFO::freqHigh, MWL_HAL_CHANNELINFO::freqLow, MWL_HAL_CHANNELINFO::mwl_hal_channel::ieee, ieee2mhz(), MWL_HAL_CHANNELINFO::nchannels, and setmaxtxpow().
Referenced by mwlGetPwrCalTable().
|
static |
Definition at line 2025 of file mwlhal.c.
References MWL_HAL_CHANNELINFO::channels, MWL_HAL_CHANNELINFO::mwl_hal_channel::freq, MWL_HAL_CHANNELINFO::freqHigh, MWL_HAL_CHANNELINFO::freqLow, MWL_HAL_CHANNELINFO::nchannels, and setmaxtxpow().
Referenced by mwlGetPwrCalTable().
|
static |
Definition at line 2254 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_BBP_REG_ACCESS, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), and mwlExecuteCmd().
Referenced by mwl_hal_getregdump().
|
static |
Definition at line 2235 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_RF_REG_ACCESS, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), and mwlExecuteCmd().
Referenced by mwl_hal_getregdump().
|
static |
int mwl_hal_adjusttxpower | ( | struct mwl_hal * | mh0, |
uint32_t | level | ||
) |
Definition at line 1041 of file mwlhal.c.
References _CMD_SETUP, HostCmd_ACT_GEN_SET, HostCmd_CMD_802_11_RF_TX_POWER, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), MWLPRIV, WL_TX_POWERLEVEL_HIGH, WL_TX_POWERLEVEL_LOW, and WL_TX_POWERLEVEL_MEDIUM.
struct mwl_hal * mwl_hal_attach | ( | device_t | dev, |
uint16_t | devid, | ||
bus_space_handle_t | ioh, | ||
bus_space_tag_t | iot, | ||
bus_dma_tag_t | tag | ||
) |
Definition at line 245 of file mwlhal.c.
References ba2qid, mwl_hal_vap::bss_type, mwl_hal_vap::macid, mwl_hal_vap::mh, mwl_hal_priv::mh_cmdaddr, mwl_hal_priv::mh_cmdbuf, mwl_hal_priv::mh_dev, MWL_DIAG_REVS::mh_devid, mwl_hal_priv::mh_dmamap, mwl_hal_priv::mh_dmat, mwl_hal::mh_ioh, mwl_hal::mh_iot, mwl_hal_priv::mh_mtx, mwl_hal_priv::mh_mtxname, mwl_hal_priv::mh_revs, mwl_hal_priv::mh_SDRAMSIZE_Addr, mwl_hal_priv::mh_streams, mwl_hal_priv::mh_vaps, MWL_BAQID_MAX, MWL_BASTREAMS_MAX, MWL_CMDBUF_SIZE, MWL_HAL_AP, mwl_hal_load_cb(), MWL_HAL_STA, MWL_MBSS_AP_MAX, MWL_MBSS_MAX, mwl_hal_bastream::public, mwl_hal_priv::public, qid2ba, mwl_hal_bastream::stream, MWL_HAL_BASTREAM::txq, and mwl_hal_vap::vap_type.
Referenced by mwl_attach().
const MWL_HAL_BASTREAM * mwl_hal_bastream_alloc | ( | struct mwl_hal_vap * | vap, |
int | ba_policy, | ||
const uint8_t | Macaddr[IEEE80211_ADDR_LEN], | ||
uint8_t | Tid, | ||
uint8_t | ParamInfo, | ||
void * | a1, | ||
void * | a2 | ||
) |
Definition at line 1415 of file mwlhal.c.
References mwl_hal_bastream::ba_policy, bastream_check_available(), MWL_HAL_BASTREAM::data, IEEE80211_ADDR_COPY, mwl_hal_bastream::macaddr, mwl_hal_priv::mh_bastreams, mwl_hal_priv::mh_streams, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), MWLVAP, mwl_hal_bastream::paraminfo, mwl_hal_bastream::public, mwl_hal_bastream::setup, and mwl_hal_bastream::tid.
Referenced by mwl_addba_request().
int mwl_hal_bastream_create | ( | struct mwl_hal_vap * | vap, |
const MWL_HAL_BASTREAM * | s, | ||
int | BarThrs, | ||
int | WindowSize, | ||
uint16_t | seqno | ||
) |
Definition at line 1465 of file mwlhal.c.
References __DECONST, _VCMD_SETUP, mwl_hal_bastream::ba_policy, BaCreateStream, BASTREAM_FLAG_DIRECTION_UPSTREAM, BASTREAM_FLAG_IMMEDIATE_TYPE, HostCmd_CMD_BASTREAM, HostCmd_RESULT_OK, IEEE80211_ADDR_COPY, IEEE80211_ADDR_LEN, mwl_hal_bastream::macaddr, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), MWLVAP, mwl_hal_bastream::paraminfo, mwl_hal_bastream::setup, mwl_hal_bastream::stream, and mwl_hal_bastream::tid.
Referenced by mwl_addba_response().
int mwl_hal_bastream_destroy | ( | struct mwl_hal * | mh0, |
const MWL_HAL_BASTREAM * | s | ||
) |
Definition at line 1519 of file mwlhal.c.
References __DECONST, _CMD_SETUP, BaDestroyStream, MWL_HAL_BASTREAM::data, HostCmd_CMD_BASTREAM, mwl_hal_priv::mh_bastreams, MWL_BASTREAMS_MAX, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), MWLPRIV, mwl_hal_bastream::public, mwl_hal_bastream::setup, and mwl_hal_bastream::stream.
Referenced by mwl_addba_response(), and mwl_addba_stop().
int mwl_hal_bastream_get_seqno | ( | struct mwl_hal * | mh0, |
const MWL_HAL_BASTREAM * | s, | ||
const uint8_t | Macaddr[IEEE80211_ADDR_LEN], | ||
uint16_t * | pseqno | ||
) |
Definition at line 1550 of file mwlhal.c.
References __DECONST, _CMD_SETUP, HostCmd_CMD_GET_SEQNO, IEEE80211_ADDR_COPY, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), MWLPRIV, and mwl_hal_bastream::tid.
Referenced by mwl_addba_request().
const MWL_HAL_BASTREAM * mwl_hal_bastream_lookup | ( | struct mwl_hal * | mh0, |
int | s | ||
) |
Definition at line 1449 of file mwlhal.c.
References mwl_hal_priv::mh_bastreams, mwl_hal_priv::mh_streams, MWL_BASTREAMS_MAX, MWLPRIV, and mwl_hal_bastream::public.
Referenced by mwl_bawatchdog_proc().
void mwl_hal_cmddone | ( | struct mwl_hal * | mh0 | ) |
Definition at line 541 of file mwlhal.c.
References dumpresult(), mwl_hal_priv::mh_debug, mwl_hal_priv::mh_dev, MWL_HAL_DEBUG_CMDDONE, and MWLPRIV.
Referenced by mwl_intr().
int mwl_hal_delstation | ( | struct mwl_hal_vap * | vap, |
const uint8_t | addr[IEEE80211_ADDR_LEN] | ||
) |
Definition at line 1714 of file mwlhal.c.
References _VCMD_SETUP, mwl_hal_vap::flags, HostCmd_CMD_SET_NEW_STN, IEEE80211_ADDR_COPY, IEEE80211_ADDR_EQ, mwl_hal_vap::mac, MVF_STATION, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_node_cleanup(), and mwl_vap_delete().
void mwl_hal_delvap | ( | struct mwl_hal_vap * | vap | ) |
Definition at line 433 of file mwlhal.c.
References mwl_hal_vap::mh.
Referenced by mwl_vap_delete().
void mwl_hal_detach | ( | struct mwl_hal * | mh0 | ) |
Definition at line 371 of file mwlhal.c.
References mwl_hal_priv::mh_cmdbuf, mwl_hal_priv::mh_dmamap, mwl_hal_priv::mh_dmat, mwl_hal_priv::mh_mtx, and MWLPRIV.
Referenced by mwl_attach(), and mwl_detach().
int mwl_hal_fwload | ( | struct mwl_hal * | mh0, |
void * | fwargs | ||
) |
Set up sdram controller for superflyv2
Set up sdram controller for superflyv2
Definition at line 2525 of file mwlhal.c.
References FW_CHECK_USECS, FW_DOWNLOAD_BLOCK_SIZE, FW_MAX_NUM_CHECKS, HostCmd_SOFTAP_FWRDY_SIGNATURE, HostCmd_SOFTAP_MODE, HostCmd_STA_MODE, MACREG_A2HRIC_BIT_MASK, MACREG_REG_A2H_INTERRUPT_CAUSE, MACREG_REG_A2H_INTERRUPT_CLEAR_SEL, MACREG_REG_A2H_INTERRUPT_MASK, MACREG_REG_A2H_INTERRUPT_STATUS_MASK, MACREG_REG_GEN_PTR, MACREG_REG_INT_CODE, MACREG_REG_SCRATCH, mwl_hal_priv::mh_cmdbuf, mwl_hal_priv::mh_dev, mwl_hal_priv::mh_SDRAMSIZE_Addr, mwlFwReset(), mwlPokeSdramController(), MWLPRIV, mwlResetHalState(), mwlSendBlock(), mwlSendBlock2(), mwlTriggerPciCmd(), RD4(), and WR4().
Referenced by mwl_attach(), and mwl_hal_getdiagstate().
int mwl_hal_getaggampduratemode | ( | struct mwl_hal * | mh0, |
int * | mode, | ||
int * | threshold | ||
) |
Definition at line 1616 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_AMPDU_RETRY_RATEDROP_MODE, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
int mwl_hal_getbastreams | ( | struct mwl_hal * | mh | ) |
Definition at line 464 of file mwlhal.c.
References mwl_hal_vap::mh, and MWLPRIV.
int mwl_hal_GetBeacon | ( | struct mwl_hal * | mh0, |
uint8_t * | pBcn, | ||
uint16_t * | pLen | ||
) |
Definition at line 2194 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_GET_BEACON, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
int mwl_hal_getchannelinfo | ( | struct mwl_hal * | mh0, |
int | band, | ||
int | chw, | ||
const MWL_HAL_CHANNELINFO ** | ci | ||
) |
Definition at line 1137 of file mwlhal.c.
References mwl_hal_priv::mh_20M, mwl_hal_priv::mh_20M_5G, mwl_hal_priv::mh_40M, mwl_hal_priv::mh_40M_5G, MWL_CH_20_MHz_WIDTH, MWL_FREQ_BAND_2DOT4GHZ, MWL_FREQ_BAND_5GHZ, and MWLPRIV.
Referenced by getchannels(), and mwl_setregdomain().
int mwl_hal_getdebug | ( | struct mwl_hal * | mh | ) |
Definition at line 452 of file mwlhal.c.
References mwl_hal_vap::mh, and MWLPRIV.
int mwl_hal_getdiagstate | ( | struct mwl_hal * | mh0, |
int | request, | ||
const void * | args, | ||
uint32_t | argsize, | ||
void ** | result, | ||
uint32_t * | resultsize | ||
) |
Definition at line 2306 of file mwlhal.c.
References __DECONST, mwl_hal_priv::mh_cmdbuf, mwl_hal_priv::mh_dev, mwl_hal_priv::mh_revs, MWL_DIAG_CMD_FWLOAD, MWL_DIAG_CMD_HOSTCMD, MWL_DIAG_CMD_REGS, MWL_DIAG_CMD_REVS, mwl_hal_fwload(), mwl_hal_getregdump(), MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
int mwl_hal_gethwspecs | ( | struct mwl_hal * | mh0, |
struct mwl_hal_hwspec * | hw | ||
) |
Definition at line 560 of file mwlhal.c.
References _CMD_SETUP, mwl_hal_hwspec::fwReleaseNumber, HostCmd_CMD_GET_HW_SPEC, mwl_hal_hwspec::hostInterface, mwl_hal_hwspec::hwVersion, IEEE80211_ADDR_COPY, IEEE80211_ADDR_LEN, mwl_hal_hwspec::macAddr, mwl_hal_hwspec::maxNumMCAddr, mwl_hal_hwspec::maxNumWCB, mwl_hal_priv::mh_bastreams, mwl_hal_priv::mh_cmdaddr, MWL_DIAG_REVS::mh_macRev, MWL_DIAG_REVS::mh_phyRev, mwl_hal_priv::mh_revs, MWL_BASTREAMS_MAX, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), MWLPRIV, mwl_hal_hwspec::numAntennas, mwl_hal_hwspec::regionCode, mwl_hal_hwspec::rxDescRead, mwl_hal_hwspec::rxDescWrite, and mwl_hal_hwspec::wcbBase.
Referenced by mwl_attach().
int mwl_hal_gethwstats | ( | struct mwl_hal * | mh0, |
struct mwl_hal_hwstats * | stats | ||
) |
Definition at line 649 of file mwlhal.c.
References _CMD_SETUP, mwl_hal_hwstats::FCSErrorCount, HostCmd_CMD_802_11_GET_STAT, mwl_hal_priv::mh_FCSErrorCount, mwl_hal_priv::mh_RTSFailures, mwl_hal_priv::mh_RTSSuccesses, mwl_hal_priv::mh_RxDuplicateFrames, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), MWLPRIV, RD4(), mwl_hal_hwstats::RTSFailures, mwl_hal_hwstats::RTSSuccesses, mwl_hal_hwstats::RxDuplicateFrames, and mwl_hal_hwstats::TxRetrySuccesses.
Referenced by mwl_ioctl().
int mwl_hal_getpromisc | ( | struct mwl_hal * | mh0 | ) |
Definition at line 2182 of file mwlhal.c.
References MACREG_REG_PROMISCUOUS, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), MWLPRIV, and RD4().
|
static |
Definition at line 2273 of file mwlhal.c.
References MWL_DIAG_REGRANGE::end, getBBReg(), getRFReg(), HostCmd_ACT_GEN_READ, MACREG_REG_FW_PRESENT, MWL_DIAG_BASE_BB, MWL_DIAG_BASE_RF, MWL_DIAG_ISBB, MWL_DIAG_ISMAC, MWL_DIAG_ISRF, RD4(), and MWL_DIAG_REGRANGE::start.
Referenced by mwl_hal_getdiagstate().
int mwl_hal_getregioncode | ( | struct mwl_hal * | mh0, |
uint8_t * | countryCode | ||
) |
Definition at line 2152 of file mwlhal.c.
References mwl_hal_priv::mh_cmdbuf, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlGetCalTable(), and MWLPRIV.
int mwl_hal_getwatchdogbitmap | ( | struct mwl_hal * | mh0, |
uint8_t | bitmap[1] | ||
) |
Definition at line 1572 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_GET_WATCHDOG_BITMAP, MWL_BAQID_MAX, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), MWLPRIV, and qid2ba.
Referenced by mwl_bawatchdog_proc().
void mwl_hal_intrset | ( | struct mwl_hal * | mh0, |
uint32_t | mask | ||
) |
Definition at line 505 of file mwlhal.c.
References MACREG_REG_A2H_INTERRUPT_MASK, MACREG_REG_INT_CODE, mwl_hal::mh_imask, MWLPRIV, mwl_hal_priv::public, RD4(), and WR4().
Referenced by mwl_chan_set(), mwl_ext_free(), mwl_init(), mwl_reset(), mwl_rx_proc(), and mwl_vap_delete().
int mwl_hal_ismbsscapable | ( | struct mwl_hal * | mh | ) |
Definition at line 470 of file mwlhal.c.
References mwl_hal_vap::mh, MHF_MBSS, and MWLPRIV.
Referenced by assign_address(), and mwl_announce().
int mwl_hal_keyreset | ( | struct mwl_hal_vap * | vap, |
const MWL_HAL_KEYVAL * | kv, | ||
const uint8_t | mac[IEEE80211_ADDR_LEN] | ||
) |
Definition at line 1229 of file mwlhal.c.
References _VCMD_SETUP, EncrActionTypeRemoveKey, HostCmd_CMD_UPDATE_ENCRYPTION, IEEE80211_ADDR_COPY, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_key_delete().
int mwl_hal_keyset | ( | struct mwl_hal_vap * | vap, |
const MWL_HAL_KEYVAL * | kv, | ||
const uint8_t | mac[IEEE80211_ADDR_LEN] | ||
) |
Definition at line 1179 of file mwlhal.c.
References _VCMD_SETUP, EncrActionTypeSetGroupKey, EncrActionTypeSetKey, HostCmd_CMD_UPDATE_ENCRYPTION, IEEE80211_ADDR_COPY, KEY_FLAG_RXGROUPKEY, KEY_FLAG_TXGROUPKEY, KEY_TYPE_ID_AES, KEY_TYPE_ID_TKIP, KEY_TYPE_ID_WEP, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by _mwl_key_set().
|
static |
Definition at line 229 of file mwlhal.c.
Referenced by mwl_hal_attach().
|
static |
Definition at line 199 of file mwlhal.c.
References mwl_hal_priv::mh_mtx.
Referenced by getBBReg(), getRFReg(), mwl_hal_adjusttxpower(), mwl_hal_bastream_alloc(), mwl_hal_bastream_create(), mwl_hal_bastream_destroy(), mwl_hal_bastream_get_seqno(), mwl_hal_delstation(), mwl_hal_getaggampduratemode(), mwl_hal_GetBeacon(), mwl_hal_getdiagstate(), mwl_hal_gethwspecs(), mwl_hal_gethwstats(), mwl_hal_getpromisc(), mwl_hal_getregioncode(), mwl_hal_getwatchdogbitmap(), mwl_hal_keyreset(), mwl_hal_keyset(), mwl_hal_newstation(), mwl_hal_newvap(), mwl_hal_setaggampduratemode(), mwl_hal_setantenna(), mwl_hal_setapmode(), mwl_hal_setassocid(), mwl_hal_setbeacon(), mwl_hal_setcfend(), mwl_hal_setchannel(), mwl_hal_setchannelswitchie(), mwl_hal_setcsmode(), mwl_hal_setdwds(), mwl_hal_setedcaparams(), mwl_hal_setgprot(), mwl_hal_sethtgi(), mwl_hal_sethwdma(), mwl_hal_setinframode(), mwl_hal_setkeepalive(), mwl_hal_setmac(), mwl_hal_setmcast(), mwl_hal_setmimops(), mwl_hal_setnprot(), mwl_hal_setnprotmode(), mwl_hal_setoptimizationlevel(), mwl_hal_setpowersave_bss(), mwl_hal_setpowersave_sta(), mwl_hal_setpromisc(), mwl_hal_setradardetection(), mwl_hal_setradio(), mwl_hal_setrateadaptmode(), mwl_hal_setregioncode(), mwl_hal_SetRifs(), mwl_hal_setrtsthreshold(), mwl_hal_setslottime(), mwl_hal_settxpower(), mwl_hal_settxrate(), mwl_hal_settxrate_auto(), mwl_hal_setwmm(), mwl_hal_start(), mwl_hal_stop(), and mwlGetPwrCalTable().
|
static |
Definition at line 205 of file mwlhal.c.
References mwl_hal_priv::mh_mtx.
Referenced by bastream_check_available(), mwlExecuteCmd(), and mwlGetCalTable().
int mwl_hal_newstation | ( | struct mwl_hal_vap * | vap, |
const uint8_t | addr[IEEE80211_ADDR_LEN], | ||
uint16_t | aid, | ||
uint16_t | sid, | ||
const MWL_HAL_PEERINFO * | peer, | ||
int | isQosSta, | ||
int | wmeInfo | ||
) |
Definition at line 1685 of file mwlhal.c.
References _VCMD_SETUP, cvtPeerInfo(), mwl_hal_vap::flags, HostCmd_CMD_SET_NEW_STN, IEEE80211_ADDR_COPY, IEEE80211_ADDR_EQ, mwl_hal_vap::mac, MVF_STATION, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_localstadb(), and mwl_peerstadb().
struct mwl_hal_vap * mwl_hal_newvap | ( | struct mwl_hal * | mh0, |
MWL_HAL_BSSTYPE | type, | ||
const uint8_t | mac[IEEE80211_ADDR_LEN] | ||
) |
Definition at line 411 of file mwlhal.c.
References mwl_hal_vap::mac, mwl_hal_vap::mh, mwl_hal_priv::mh_vaps, MWL_HAL_LOCK(), mwl_hal_setmac_locked(), MWL_HAL_UNLOCK(), MWL_MBSS_MAX, MWLPRIV, and mwl_hal_vap::vap_type.
Referenced by mwl_vap_create().
int mwl_hal_setaggampduratemode | ( | struct mwl_hal * | mh0, |
int | mode, | ||
int | threshold | ||
) |
Definition at line 1597 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_AMPDU_RETRY_RATEDROP_MODE, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_hal_reset().
int mwl_hal_setantenna | ( | struct mwl_hal * | mh0, |
MWL_HAL_ANTENNA | dirSet, | ||
int | ant | ||
) |
Definition at line 750 of file mwlhal.c.
References _CMD_SETUP, _HostCmd_DS_802_11_RF_ANTENNA::Action, _HostCmd_DS_802_11_RF_ANTENNA::AntennaMode, HostCmd_CMD_802_11_RF_ANTENNA, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), MWLPRIV, WL_ANTENNATYPE_RX, and WL_ANTENNATYPE_TX.
Referenced by mwl_hal_reset().
int mwl_hal_setapmode | ( | struct mwl_hal_vap * | vap, |
MWL_HAL_APMODE | ApMode | ||
) |
Definition at line 1763 of file mwlhal.c.
References _VCMD_SETUP, HostCmd_CMD_SET_APMODE, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_setapmode().
int mwl_hal_setassocid | ( | struct mwl_hal_vap * | vap, |
const uint8_t | bssId[IEEE80211_ADDR_LEN], | ||
uint16_t | assocId | ||
) |
Definition at line 1336 of file mwlhal.c.
References _VCMD_SETUP, HostCmd_CMD_SET_AID, IEEE80211_ADDR_COPY, mwl_hal_priv::mh_cmdbuf, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_newstate().
void mwl_hal_setbastreams | ( | struct mwl_hal * | mh, |
int | mask | ||
) |
Definition at line 458 of file mwlhal.c.
References mwl_hal_vap::mh, MWL_BASTREAMS_MAX, and MWLPRIV.
int mwl_hal_setbeacon | ( | struct mwl_hal_vap * | vap, |
const void * | frame, | ||
size_t | frameLen | ||
) |
Definition at line 1282 of file mwlhal.c.
References _VCMD_SETUP, HostCmd_CMD_SET_BEACON, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_beacon_setup().
int mwl_hal_setcfend | ( | struct mwl_hal * | mh0, |
int | ena | ||
) |
Definition at line 1638 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_CFEND_ENABLE, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_hal_reset().
int mwl_hal_setchannel | ( | struct mwl_hal * | mh0, |
const MWL_HAL_CHANNEL * | chan | ||
) |
Definition at line 1354 of file mwlhal.c.
References _CMD_SETUP, MWL_HAL_CHANNEL::channel, cvtChannelFlags(), HostCmd_ACT_GEN_SET, HostCmd_CMD_SET_RF_CHANNEL, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_chan_set().
int mwl_hal_setchannelswitchie | ( | struct mwl_hal * | mh0, |
const MWL_HAL_CHANNEL * | nextchan, | ||
uint32_t | mode, | ||
uint32_t | count | ||
) |
Definition at line 886 of file mwlhal.c.
References _CMD_SETUP, MWL_HAL_CHANNEL::channel, cvtChannelFlags(), HostCmd_CMD_SET_SWITCH_CHANNEL, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_startcsa().
int mwl_hal_setcsmode | ( | struct mwl_hal * | mh0, |
MWL_HAL_CSMODE | csmode | ||
) |
Definition at line 1901 of file mwlhal.c.
References _CMD_SETUP, HostCmd_ACT_GEN_SET, HostCmd_CMD_SET_LINKADAPT_CS_MODE, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_newstate().
void mwl_hal_setdebug | ( | struct mwl_hal * | mh, |
int | debug | ||
) |
Definition at line 446 of file mwlhal.c.
References mwl_hal_vap::mh, and MWLPRIV.
int mwl_hal_setdwds | ( | struct mwl_hal * | mh0, |
int | ena | ||
) |
Definition at line 1655 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_DWDS_ENABLE, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_newstate().
int mwl_hal_setedcaparams | ( | struct mwl_hal * | mh0, |
uint8_t | qnum, | ||
uint32_t | CWmin, | ||
uint32_t | CWmax, | ||
uint8_t | AIFSN, | ||
uint16_t | TXOPLimit | ||
) |
Definition at line 1854 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_SET_EDCA_PARAMS, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_txq_update().
int mwl_hal_setgprot | ( | struct mwl_hal * | mh0, |
int | prot | ||
) |
Definition at line 1820 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_SET_G_PROTECT_FLAG, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_updateslot().
int mwl_hal_sethtgi | ( | struct mwl_hal_vap * | vap, |
int | GIType | ||
) |
Definition at line 692 of file mwlhal.c.
References _VCMD_SETUP, GI_TYPE_LONG, GI_TYPE_SHORT, HostCmd_ACT_GEN_SET, HostCmd_CMD_HT_GUARD_INTERVAL, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_reset_vap().
int mwl_hal_sethwdma | ( | struct mwl_hal * | mh0, |
const struct mwl_hal_txrxdma * | dma | ||
) |
Definition at line 608 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_SET_HW_SPEC, mwl_hal_txrxdma::maxNumTxWcb, mwl_hal_txrxdma::maxNumWCB, mwl_hal_priv::mh_flags, MWL_DIAG_REVS::mh_macRev, mwl_hal_priv::mh_revs, MHF_MBSS, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), MWLPRIV, mwl_hal_txrxdma::rxDescRead, SET_HW_SPEC_DISABLEMBSS, SET_HW_SPEC_HOST_POWERSAVE, SET_HW_SPEC_HOSTFORM_BEACON, SET_HW_SPEC_HOSTFORM_PROBERESP, and mwl_hal_txrxdma::wcbBase.
Referenced by mwl_setupdma().
int mwl_hal_setinframode | ( | struct mwl_hal_vap * | vap | ) |
Definition at line 799 of file mwlhal.c.
References _VCMD_SETUP, HostCmd_CMD_SET_INFRA_MODE, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_newstate().
int mwl_hal_setkeepalive | ( | struct mwl_hal * | mh0 | ) |
Definition at line 1742 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_SET_KEEP_ALIVE, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_agestations(), and mwl_watchdog().
int mwl_hal_setmac | ( | struct mwl_hal_vap * | vap, |
const uint8_t | addr[IEEE80211_ADDR_LEN] | ||
) |
Definition at line 1270 of file mwlhal.c.
References MWL_HAL_LOCK(), mwl_hal_setmac_locked(), MWL_HAL_UNLOCK(), and MWLVAP.
|
static |
Definition at line 1254 of file mwlhal.c.
References _VCMD_SETUP, mwl_hal_vap::bss_type, HostCmd_CMD_SET_MAC_ADDR, IEEE80211_ADDR_COPY, mwl_hal_vap::mac, mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_hal_newvap(), and mwl_hal_setmac().
int mwl_hal_setmcast | ( | struct mwl_hal * | mh0, |
int | nmc, | ||
const uint8_t | macs[] | ||
) |
Definition at line 1157 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_MAC_MULTICAST_ADR, IEEE80211_ADDR_LEN, MWL_HAL_LOCK(), MWL_HAL_MCAST_MAX, MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_setmcastfilter().
int mwl_hal_setmimops | ( | struct mwl_hal * | mh0, |
const uint8_t | addr[IEEE80211_ADDR_LEN], | ||
uint8_t | enable, | ||
uint8_t | mode | ||
) |
Definition at line 1971 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_SET_MIMOPSHT, IEEE80211_ADDR_COPY, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_recv_action().
int mwl_hal_setnprot | ( | struct mwl_hal_vap * | vap, |
MWL_HAL_HTPROTECT | mode | ||
) |
Definition at line 1919 of file mwlhal.c.
References _VCMD_SETUP, HostCmd_CMD_SET_N_PROTECT_FLAG, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_reset_vap().
int mwl_hal_setnprotmode | ( | struct mwl_hal_vap * | vap, |
uint8_t | mode | ||
) |
Definition at line 1937 of file mwlhal.c.
References _VCMD_SETUP, HostCmd_CMD_SET_N_PROTECT_OPMODE, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_beacon_update(), and mwl_reset_vap().
int mwl_hal_setoptimizationlevel | ( | struct mwl_hal * | mh0, |
int | level | ||
) |
Definition at line 1954 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_SET_OPTIMIZATION_LEVEL, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_hal_reset().
int mwl_hal_setpowersave_bss | ( | struct mwl_hal_vap * | vap, |
uint8_t | nsta | ||
) |
Definition at line 1302 of file mwlhal.c.
References _VCMD_SETUP, HostCmd_CMD_SET_POWERSAVESTATION, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
int mwl_hal_setpowersave_sta | ( | struct mwl_hal_vap * | vap, |
uint16_t | aid, | ||
int | ena | ||
) |
Definition at line 1319 of file mwlhal.c.
References _VCMD_SETUP, HostCmd_CMD_SET_TIM, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
int mwl_hal_setpromisc | ( | struct mwl_hal * | mh0, |
int | ena | ||
) |
Definition at line 2169 of file mwlhal.c.
References MACREG_REG_PROMISCUOUS, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), MWLPRIV, RD4(), and WR4().
Referenced by mwl_mode_init(), and mwl_update_promisc().
int mwl_hal_setradardetection | ( | struct mwl_hal * | mh0, |
MWL_HAL_RADAR | action | ||
) |
Definition at line 818 of file mwlhal.c.
References _CMD_SETUP, DOMAIN_CODE_ETSI_131, HostCmd_CMD_802_11H_DETECT_RADAR, mwl_hal_priv::mh_regioncode, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_newstate().
int mwl_hal_setradio | ( | struct mwl_hal * | mh0, |
int | onoff, | ||
MWL_HAL_PREAMBLE | preamble | ||
) |
Definition at line 722 of file mwlhal.c.
References _CMD_SETUP, HostCmd_ACT_GEN_SET, HostCmd_CMD_802_11_RADIO_CONTROL, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_hal_reset().
int mwl_hal_setrateadaptmode | ( | struct mwl_hal * | mh0, |
uint16_t | mode | ||
) |
Definition at line 1883 of file mwlhal.c.
References _CMD_SETUP, HostCmd_ACT_GEN_SET, HostCmd_CMD_SET_RATE_ADAPT_MODE, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_hal_reset().
int mwl_hal_setregioncode | ( | struct mwl_hal * | mh0, |
int | regionCode | ||
) |
Definition at line 910 of file mwlhal.c.
References _CMD_SETUP, DOMAIN_CODE_ETSI, DOMAIN_CODE_ETSI_131, HostCmd_CMD_SET_REGION_CODE, mwl_hal_priv::mh_regioncode, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_hal_reset().
int mwl_hal_SetRifs | ( | struct mwl_hal * | mh0, |
uint8_t | QNum | ||
) |
Definition at line 2215 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_SET_RIFS, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
int mwl_hal_setrtsthreshold | ( | struct mwl_hal_vap * | vap, |
int | threshold | ||
) |
Definition at line 778 of file mwlhal.c.
References _VCMD_SETUP, HostCmd_ACT_GEN_SET, HostCmd_CMD_802_11_RTS_THSD, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_newstate(), and mwl_reset_vap().
int mwl_hal_setslottime | ( | struct mwl_hal * | mh0, |
int | usecs | ||
) |
Definition at line 1020 of file mwlhal.c.
References _CMD_SETUP, HostCmd_ACT_GEN_SET, HostCmd_CMD_802_11_SET_SLOT, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
int mwl_hal_settxpower | ( | struct mwl_hal * | mh0, |
const MWL_HAL_CHANNEL * | c, | ||
uint8_t | maxtxpow | ||
) |
Definition at line 1100 of file mwlhal.c.
References _CMD_SETUP, MWL_HAL_CHANNEL::channel, MWL_HAL_CHANNEL::channelFlags, findchannel(), MWL_HAL_CHANNEL_FLAGS::FreqBand, HostCmd_ACT_GEN_SET_LIST, HostCmd_CMD_802_11_RF_TX_POWER, mwl_hal_priv::mh_dev, MWL_FREQ_BAND_5GHZ, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_chan_set().
int mwl_hal_settxrate | ( | struct mwl_hal_vap * | vap, |
MWL_HAL_TXRATE_HANDLING | handling, | ||
const MWL_HAL_TXRATE * | rate | ||
) |
Definition at line 940 of file mwlhal.c.
References _VCMD_SETUP, FIXED_RATE_WITH_AUTO_RATE_DROP, FIXED_RATE_WITHOUT_AUTORATE_DROP, HostCmd_ACT_GEN_SET, HostCmd_ACT_NOT_USE_FIXED_RATE, HostCmd_CMD_SET_FIXED_RATE, MWL_HAL_TXRATE::McastRate, MWL_HAL_TXRATE::MgtRate, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), MWLVAP, MWL_HAL_TXRATE::Rate, RATE_FIXED, RATE_FIXED_DROP, MWL_HAL_TXRATE::RateSeries, RATETYPE, RATEVAL, RETRY_COUNT_VALID, and MWL_HAL_TXRATE::TryCount.
Referenced by mwl_setrates().
int mwl_hal_settxrate_auto | ( | struct mwl_hal * | mh0, |
const MWL_HAL_TXRATE * | rate | ||
) |
Definition at line 994 of file mwlhal.c.
References _CMD_SETUP, HostCmd_ACT_NOT_USE_FIXED_RATE, HostCmd_CMD_SET_FIXED_RATE, MWL_HAL_TXRATE::McastRate, MWL_HAL_TXRATE::MgtRate, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), MWLPRIV, RATETYPE, and RATEVAL.
Referenced by mwl_setcurchanrates().
int mwl_hal_setwmm | ( | struct mwl_hal * | mh0, |
int | onoff | ||
) |
Definition at line 1837 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_SET_WMM_MODE, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLPRIV.
Referenced by mwl_hal_reset().
int mwl_hal_start | ( | struct mwl_hal_vap * | vap | ) |
Definition at line 1802 of file mwlhal.c.
References _VCMD_SETUP, mwl_hal_vap::flags, HostCmd_ACT_GEN_ON, HostCmd_CMD_BSS_START, MVF_RUNNING, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_newstate().
int mwl_hal_stop | ( | struct mwl_hal_vap * | vap | ) |
Definition at line 1781 of file mwlhal.c.
References _VCMD_SETUP, mwl_hal_vap::flags, HostCmd_ACT_GEN_OFF, HostCmd_CMD_BSS_START, MVF_RUNNING, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlExecuteCmd(), and MWLVAP.
Referenced by mwl_newstate().
|
static |
Definition at line 211 of file mwlhal.c.
References mwl_hal_priv::mh_mtx.
Referenced by getBBReg(), getRFReg(), mwl_hal_adjusttxpower(), mwl_hal_bastream_alloc(), mwl_hal_bastream_create(), mwl_hal_bastream_destroy(), mwl_hal_bastream_get_seqno(), mwl_hal_delstation(), mwl_hal_getaggampduratemode(), mwl_hal_GetBeacon(), mwl_hal_getdiagstate(), mwl_hal_gethwspecs(), mwl_hal_gethwstats(), mwl_hal_getpromisc(), mwl_hal_getregioncode(), mwl_hal_getwatchdogbitmap(), mwl_hal_keyreset(), mwl_hal_keyset(), mwl_hal_newstation(), mwl_hal_newvap(), mwl_hal_setaggampduratemode(), mwl_hal_setantenna(), mwl_hal_setapmode(), mwl_hal_setassocid(), mwl_hal_setbeacon(), mwl_hal_setcfend(), mwl_hal_setchannel(), mwl_hal_setchannelswitchie(), mwl_hal_setcsmode(), mwl_hal_setdwds(), mwl_hal_setedcaparams(), mwl_hal_setgprot(), mwl_hal_sethtgi(), mwl_hal_sethwdma(), mwl_hal_setinframode(), mwl_hal_setkeepalive(), mwl_hal_setmac(), mwl_hal_setmcast(), mwl_hal_setmimops(), mwl_hal_setnprot(), mwl_hal_setnprotmode(), mwl_hal_setoptimizationlevel(), mwl_hal_setpowersave_bss(), mwl_hal_setpowersave_sta(), mwl_hal_setpromisc(), mwl_hal_setradardetection(), mwl_hal_setradio(), mwl_hal_setrateadaptmode(), mwl_hal_setregioncode(), mwl_hal_SetRifs(), mwl_hal_setrtsthreshold(), mwl_hal_setslottime(), mwl_hal_settxpower(), mwl_hal_settxrate(), mwl_hal_settxrate_auto(), mwl_hal_setwmm(), mwl_hal_start(), mwl_hal_stop(), and mwlGetPwrCalTable().
|
static |
Definition at line 2686 of file mwlhal.c.
References CMD.
Referenced by dumpresult(), and mwlExecuteCmd().
|
static |
Definition at line 2375 of file mwlhal.c.
References dumpresult(), MACREG_REG_INT_CODE, mwl_hal_priv::mh_debug, mwl_hal_priv::mh_dev, mwl_hal_priv::mh_dmamap, mwl_hal_priv::mh_dmat, mwl_hal_priv::mh_flags, MHF_FWHANG, MWL_HAL_DEBUG_CMDDONE, MWL_HAL_DEBUG_IGNHANG, MWL_HAL_DEBUG_SENDCMD, MWL_HAL_LOCK_ASSERT(), mwlcmdname(), mwlSendCmd(), mwlWaitForCmdComplete(), and RD4().
Referenced by bastream_check_available(), getBBReg(), getRFReg(), mwl_hal_adjusttxpower(), mwl_hal_bastream_create(), mwl_hal_bastream_destroy(), mwl_hal_bastream_get_seqno(), mwl_hal_delstation(), mwl_hal_getaggampduratemode(), mwl_hal_GetBeacon(), mwl_hal_getdiagstate(), mwl_hal_gethwspecs(), mwl_hal_gethwstats(), mwl_hal_getwatchdogbitmap(), mwl_hal_keyreset(), mwl_hal_keyset(), mwl_hal_newstation(), mwl_hal_setaggampduratemode(), mwl_hal_setantenna(), mwl_hal_setapmode(), mwl_hal_setassocid(), mwl_hal_setbeacon(), mwl_hal_setcfend(), mwl_hal_setchannel(), mwl_hal_setchannelswitchie(), mwl_hal_setcsmode(), mwl_hal_setdwds(), mwl_hal_setedcaparams(), mwl_hal_setgprot(), mwl_hal_sethtgi(), mwl_hal_sethwdma(), mwl_hal_setinframode(), mwl_hal_setkeepalive(), mwl_hal_setmac_locked(), mwl_hal_setmcast(), mwl_hal_setmimops(), mwl_hal_setnprot(), mwl_hal_setnprotmode(), mwl_hal_setoptimizationlevel(), mwl_hal_setpowersave_bss(), mwl_hal_setpowersave_sta(), mwl_hal_setradardetection(), mwl_hal_setradio(), mwl_hal_setrateadaptmode(), mwl_hal_setregioncode(), mwl_hal_SetRifs(), mwl_hal_setrtsthreshold(), mwl_hal_setslottime(), mwl_hal_settxpower(), mwl_hal_settxrate(), mwl_hal_settxrate_auto(), mwl_hal_setwmm(), mwl_hal_start(), mwl_hal_stop(), and mwlGetCalTable().
|
static |
Definition at line 2435 of file mwlhal.c.
References ISR_RESET, MACREG_REG_H2A_INTERRUPT_EVENTS, MACREG_REG_INT_CODE, mwl_hal_priv::mh_dev, mwl_hal_priv::mh_flags, RD4(), and WR4().
Referenced by mwl_hal_fwload().
|
static |
Definition at line 1990 of file mwlhal.c.
References _CMD_SETUP, HostCmd_CMD_GET_CALTABLE, MWL_HAL_LOCK_ASSERT(), and mwlExecuteCmd().
Referenced by mwl_hal_getregioncode(), and mwlGetPwrCalTable().
|
static |
Definition at line 2099 of file mwlhal.c.
References get2Ghz(), get5Ghz(), mwl_hal_priv::mh_20M, mwl_hal_priv::mh_20M_5G, mwl_hal_priv::mh_40M, mwl_hal_priv::mh_40M_5G, mwl_hal_priv::mh_cmdbuf, mwl_hal_priv::mh_flags, MHF_CALDATA, MWL_HAL_LOCK(), MWL_HAL_UNLOCK(), mwlGetCalTable(), PWTAGETRATETABLE20M, PWTAGETRATETABLE20M_5G, PWTAGETRATETABLE40M, and PWTAGETRATETABLE40M_5G.
Referenced by mwlResetHalState().
|
static |
Set up sdram controller for superflyv2
Definition at line 2516 of file mwlhal.c.
References WR4().
Referenced by mwl_hal_fwload().
|
static |
Definition at line 385 of file mwlhal.c.
References mwl_hal_vap::mh, mwl_hal_priv::mh_bastreams, mwl_hal_priv::mh_FCSErrorCount, mwl_hal_priv::mh_flags, mwl_hal_priv::mh_RTSFailures, mwl_hal_priv::mh_RTSSuccesses, mwl_hal_priv::mh_RxDuplicateFrames, mwl_hal_priv::mh_vaps, MHF_CALDATA, MWL_BASTREAMS_MAX, MWL_MBSS_MAX, and mwlGetPwrCalTable().
Referenced by mwl_hal_fwload().
|
static |
Definition at line 2480 of file mwlhal.c.
References HostCmd_CMD_CODE_DNLD, MACREG_INT_CODE_CMD_FINISHED, MACREG_REG_INT_CODE, mwl_hal_priv::mh_cmdbuf, mwl_hal_priv::mh_dev, mwlTriggerPciCmd(), mwlWaitFor(), RD4(), and WR4().
Referenced by mwl_hal_fwload().
|
static |
Definition at line 2501 of file mwlhal.c.
References MACREG_INT_CODE_CMD_FINISHED, MACREG_REG_INT_CODE, mwl_hal_priv::mh_cmdbuf, mwl_hal_priv::mh_dev, mwlTriggerPciCmd(), mwlWaitFor(), RD4(), and WR4().
Referenced by mwl_hal_fwload().
|
static |
Definition at line 2346 of file mwlhal.c.
References MACREG_H2ARIC_BIT_DOOR_BELL, MACREG_REG_GEN_PTR, MACREG_REG_H2A_INTERRUPT_EVENTS, MACREG_REG_INT_CODE, mwl_hal_priv::mh_cmdaddr, mwl_hal_priv::mh_dmamap, mwl_hal_priv::mh_dmat, RD4(), and WR4().
Referenced by mwlExecuteCmd().
|
static |
Definition at line 2447 of file mwlhal.c.
References MACREG_H2ARIC_BIT_DOOR_BELL, MACREG_REG_GEN_PTR, MACREG_REG_H2A_INTERRUPT_EVENTS, MACREG_REG_INT_CODE, mwl_hal_priv::mh_cmdaddr, mwl_hal_priv::mh_dmamap, mwl_hal_priv::mh_dmat, RD4(), and WR4().
Referenced by mwl_hal_fwload(), mwlSendBlock(), and mwlSendBlock2().
|
static |
Definition at line 2464 of file mwlhal.c.
References FW_CHECK_USECS, FW_MAX_NUM_CHECKS, MACREG_REG_INT_CODE, and RD4().
Referenced by mwlSendBlock(), and mwlSendBlock2().
|
static |
Definition at line 2360 of file mwlhal.c.
References MAX_WAIT_FW_COMPLETE_ITERATIONS, and mwl_hal_priv::mh_cmdbuf.
Referenced by mwlExecuteCmd().
|
static |
Definition at line 217 of file mwlhal.c.
References mwl_hal::mh_ioh, mwl_hal::mh_iot, and mwl_hal_priv::public.
Referenced by mwl_hal_fwload(), mwl_hal_gethwstats(), mwl_hal_getpromisc(), mwl_hal_getregdump(), mwl_hal_intrset(), mwl_hal_setpromisc(), mwl_rx_proc(), mwlExecuteCmd(), mwlFwReset(), mwlSendBlock(), mwlSendBlock2(), mwlSendCmd(), mwlTriggerPciCmd(), and mwlWaitFor().
|
static |
SYSCTL_DECL | ( | _hw_mwl | ) |
|
static |
|
static |
Definition at line 223 of file mwlhal.c.
References mwl_hal::mh_ioh, mwl_hal::mh_iot, and mwl_hal_priv::public.
Referenced by mwl_hal_fwload(), mwl_hal_intrset(), mwl_hal_setpromisc(), mwlFwReset(), mwlPokeSdramController(), mwlSendBlock(), mwlSendBlock2(), mwlSendCmd(), and mwlTriggerPciCmd().
|
static |
Definition at line 85 of file mwlhal.c.
Referenced by mwl_hal_attach().
|
static |
Definition at line 91 of file mwlhal.c.
Referenced by mwl_hal_attach(), and mwl_hal_getwatchdogbitmap().