FreeBSD kernel MWL device code
|
#include <sys/endian.h>
#include <sys/bus.h>
#include <net80211/ieee80211_radiotap.h>
#include <dev/mwl/mwlhal.h>
#include <dev/mwl/mwlreg.h>
#include <dev/mwl/if_mwlioctl.h>
Go to the source code of this file.
Data Structures | |
struct | mwl_txbuf |
struct | mwl_descdma |
struct | mwl_txq |
struct | mwl_jumbo |
struct | mwl_rxbuf |
struct | mwl_bastate |
struct | mwl_node |
struct | mwl_vap |
struct | mwl_softc |
Macros | |
#define | MWL_TXBUF 256 /* number of TX descriptors/buffers */ |
#define | MWL_TXACKBUF (MWL_TXBUF/2) /* number of TX ACK desc's/buffers */ |
#define | MWL_RXDESC 256 /* number of RX descriptors */ |
#define | MWL_RXBUF ((5*MWL_RXDESC)/2)/* number of RX dma buffers */ |
#define | MWL_MAXBA 2 /* max BA streams/sta */ |
#define | MWL_TXDESC 1 /* max tx descriptors/segments */ |
#define | MWL_AGGR_SIZE 3839 /* max tx aggregation size */ |
#define | MWL_AGEINTERVAL 1 /* poke f/w every sec to age q's */ |
#define | MWL_MAXSTAID 64 /* max of 64 stations */ |
#define | MWL_TXQ_LOCK_INIT(_sc, _tq) |
#define | MWL_TXQ_LOCK_DESTROY(_tq) mtx_destroy(&(_tq)->lock) |
#define | MWL_TXQ_LOCK(_tq) mtx_lock(&(_tq)->lock) |
#define | MWL_TXQ_UNLOCK(_tq) mtx_unlock(&(_tq)->lock) |
#define | MWL_TXQ_LOCK_ASSERT(_tq) mtx_assert(&(_tq)->lock, MA_OWNED) |
#define | MWL_TXDESC_SYNC(txq, ds, how) |
#define | MWL_JUMBO_DATA2BUF(_data) ((struct mwl_jumbo *)(_data)) |
#define | MWL_JUMBO_BUF2DATA(_buf) ((uint8_t *)(_buf)) |
#define | MWL_JUMBO_OFFSET(_sc, _data) (((const uint8_t *)(_data)) - (const uint8_t *)((_sc)->sc_rxmem)) |
#define | MWL_JUMBO_DMA_ADDR(_sc, _data) ((_sc)->sc_rxmem_paddr + MWL_JUMBO_OFFSET(_sc, _data)) |
#define | MWL_RXDESC_SYNC(sc, ds, how) |
#define | MWL_NODE(ni) ((struct mwl_node *)(ni)) |
#define | MWL_NODE_CONST(ni) ((const struct mwl_node *)(ni)) |
#define | MWL_VAP(vap) ((struct mwl_vap *)(vap)) |
#define | MWL_VAP_CONST(vap) ((const struct mwl_vap *)(vap)) |
#define | MWL_LOCK_INIT(_sc) |
#define | MWL_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) |
#define | MWL_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) |
#define | MWL_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) |
#define | MWL_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) |
#define | MWL_RXFREE_INIT(_sc) |
#define | MWL_RXFREE_DESTROY(_sc) mtx_destroy(&(_sc)->sc_rxlock) |
#define | MWL_RXFREE_LOCK(_sc) mtx_lock(&(_sc)->sc_rxlock) |
#define | MWL_RXFREE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_rxlock) |
#define | MWL_RXFREE_ASSERT(_sc) mtx_assert(&(_sc)->sc_rxlock, MA_OWNED) |
Functions | |
typedef | STAILQ_HEAD (, mwl_txbuf) mwl_txbufhead |
typedef | SLIST_HEAD (, mwl_jumbo) mwl_jumbohead |
typedef | STAILQ_HEAD (, mwl_rxbuf) mwl_rxbufhead |
static __inline__ void | mwl_bastream_setup (struct mwl_bastate *bas, int tid, int txq) |
static __inline__ void | mwl_bastream_free (struct mwl_bastate *bas) |
static __inline__ int | mwl_bastream_match (const struct mwl_bastate *bas, uint16_t qos) |
int | mwl_attach (u_int16_t, struct mwl_softc *) |
int | mwl_detach (struct mwl_softc *) |
void | mwl_resume (struct mwl_softc *) |
void | mwl_suspend (struct mwl_softc *) |
void | mwl_shutdown (void *) |
void | mwl_intr (void *) |
#define MWL_AGEINTERVAL 1 /* poke f/w every sec to age q's */ |
Definition at line 72 of file if_mwlvar.h.
#define MWL_AGGR_SIZE 3839 /* max tx aggregation size */ |
Definition at line 70 of file if_mwlvar.h.
#define MWL_JUMBO_BUF2DATA | ( | _buf | ) | ((uint8_t *)(_buf)) |
Definition at line 156 of file if_mwlvar.h.
#define MWL_JUMBO_DATA2BUF | ( | _data | ) | ((struct mwl_jumbo *)(_data)) |
Definition at line 155 of file if_mwlvar.h.
#define MWL_JUMBO_DMA_ADDR | ( | _sc, | |
_data | |||
) | ((_sc)->sc_rxmem_paddr + MWL_JUMBO_OFFSET(_sc, _data)) |
Definition at line 159 of file if_mwlvar.h.
#define MWL_JUMBO_OFFSET | ( | _sc, | |
_data | |||
) | (((const uint8_t *)(_data)) - (const uint8_t *)((_sc)->sc_rxmem)) |
Definition at line 157 of file if_mwlvar.h.
#define MWL_LOCK | ( | _sc | ) | mtx_lock(&(_sc)->sc_mtx) |
Definition at line 347 of file if_mwlvar.h.
#define MWL_LOCK_ASSERT | ( | _sc | ) | mtx_assert(&(_sc)->sc_mtx, MA_OWNED) |
Definition at line 349 of file if_mwlvar.h.
#define MWL_LOCK_DESTROY | ( | _sc | ) | mtx_destroy(&(_sc)->sc_mtx) |
Definition at line 346 of file if_mwlvar.h.
#define MWL_LOCK_INIT | ( | _sc | ) |
Definition at line 343 of file if_mwlvar.h.
#define MWL_MAXBA 2 /* max BA streams/sta */ |
Definition at line 61 of file if_mwlvar.h.
#define MWL_MAXSTAID 64 /* max of 64 stations */ |
Definition at line 73 of file if_mwlvar.h.
#define MWL_NODE | ( | ni | ) | ((struct mwl_node *)(ni)) |
Definition at line 230 of file if_mwlvar.h.
#define MWL_NODE_CONST | ( | ni | ) | ((const struct mwl_node *)(ni)) |
Definition at line 231 of file if_mwlvar.h.
#define MWL_RXBUF ((5*MWL_RXDESC)/2)/* number of RX dma buffers */ |
Definition at line 58 of file if_mwlvar.h.
#define MWL_RXDESC 256 /* number of RX descriptors */ |
Definition at line 55 of file if_mwlvar.h.
#define MWL_RXDESC_SYNC | ( | sc, | |
ds, | |||
how | |||
) |
Definition at line 170 of file if_mwlvar.h.
#define MWL_RXFREE_ASSERT | ( | _sc | ) | mtx_assert(&(_sc)->sc_rxlock, MA_OWNED) |
Definition at line 357 of file if_mwlvar.h.
#define MWL_RXFREE_DESTROY | ( | _sc | ) | mtx_destroy(&(_sc)->sc_rxlock) |
Definition at line 354 of file if_mwlvar.h.
#define MWL_RXFREE_INIT | ( | _sc | ) |
Definition at line 351 of file if_mwlvar.h.
#define MWL_RXFREE_LOCK | ( | _sc | ) | mtx_lock(&(_sc)->sc_rxlock) |
Definition at line 355 of file if_mwlvar.h.
#define MWL_RXFREE_UNLOCK | ( | _sc | ) | mtx_unlock(&(_sc)->sc_rxlock) |
Definition at line 356 of file if_mwlvar.h.
#define MWL_TXACKBUF (MWL_TXBUF/2) /* number of TX ACK desc's/buffers */ |
Definition at line 52 of file if_mwlvar.h.
#define MWL_TXBUF 256 /* number of TX descriptors/buffers */ |
Definition at line 49 of file if_mwlvar.h.
#define MWL_TXDESC 1 /* max tx descriptors/segments */ |
Definition at line 67 of file if_mwlvar.h.
#define MWL_TXDESC_SYNC | ( | txq, | |
ds, | |||
how | |||
) |
Definition at line 143 of file if_mwlvar.h.
#define MWL_TXQ_LOCK | ( | _tq | ) | mtx_lock(&(_tq)->lock) |
Definition at line 139 of file if_mwlvar.h.
#define MWL_TXQ_LOCK_ASSERT | ( | _tq | ) | mtx_assert(&(_tq)->lock, MA_OWNED) |
Definition at line 141 of file if_mwlvar.h.
#define MWL_TXQ_LOCK_DESTROY | ( | _tq | ) | mtx_destroy(&(_tq)->lock) |
Definition at line 138 of file if_mwlvar.h.
#define MWL_TXQ_LOCK_INIT | ( | _sc, | |
_tq | |||
) |
Definition at line 133 of file if_mwlvar.h.
#define MWL_TXQ_UNLOCK | ( | _tq | ) | mtx_unlock(&(_tq)->lock) |
Definition at line 140 of file if_mwlvar.h.
#define MWL_UNLOCK | ( | _sc | ) | mtx_unlock(&(_sc)->sc_mtx) |
Definition at line 348 of file if_mwlvar.h.
#define MWL_VAP | ( | vap | ) | ((struct mwl_vap *)(vap)) |
Definition at line 246 of file if_mwlvar.h.
#define MWL_VAP_CONST | ( | vap | ) | ((const struct mwl_vap *)(vap)) |
Definition at line 247 of file if_mwlvar.h.
int mwl_attach | ( | u_int16_t | , |
struct mwl_softc * | |||
) |
|
static |
Definition at line 200 of file if_mwlvar.h.
References mwl_bastate::bastream, and mwl_bastate::qos.
Referenced by mwl_addba_response(), and mwl_addba_stop().
|
static |
Definition at line 215 of file if_mwlvar.h.
References mwl_bastate::qos.
Referenced by mwl_tx_start().
|
static |
Definition at line 193 of file if_mwlvar.h.
References mwl_bastate::qos, and mwl_bastate::txq.
Referenced by mwl_addba_response().
int mwl_detach | ( | struct mwl_softc * | sc | ) |
Definition at line 527 of file if_mwl.c.
References mwl_dma_cleanup(), mwl_hal_detach(), MWL_LOCK, MWL_RXFREE_DESTROY, mwl_stop(), mwl_tx_cleanup(), MWL_UNLOCK, mwl_softc::sc_ic, mwl_softc::sc_mh, mwl_softc::sc_snd, and mwl_softc::sc_watchdog.
Referenced by mwl_pci_detach().
void mwl_intr | ( | void * | arg | ) |
Definition at line 796 of file if_mwl.c.
References DPRINTF, MACREG_A2HRIC_BIT_BA_WATCHDOG, MACREG_A2HRIC_BIT_CHAN_SWITCH, MACREG_A2HRIC_BIT_ICV_ERROR, MACREG_A2HRIC_BIT_MAC_EVENT, MACREG_A2HRIC_BIT_OPC_DONE, MACREG_A2HRIC_BIT_QUEUE_EMPTY, MACREG_A2HRIC_BIT_QUEUE_FULL, MACREG_A2HRIC_BIT_RADAR_DETECT, MACREG_A2HRIC_BIT_RX_RDY, MACREG_A2HRIC_BIT_TX_DONE, mwl_stats::mst_rx_badtkipicv, mwl_hal_cmddone(), mwl_hal_getisr(), mwl_softc::sc_bawatchdogtask, mwl_softc::sc_chanswitchtask, mwl_softc::sc_imask, mwl_softc::sc_invalid, mwl_softc::sc_mh, mwl_softc::sc_radartask, mwl_softc::sc_rxtask, mwl_softc::sc_stats, mwl_softc::sc_tq, and mwl_softc::sc_txtask.
Referenced by mwl_pci_attach().
void mwl_resume | ( | struct mwl_softc * | sc | ) |
Definition at line 769 of file if_mwl.c.
References mwl_init(), MWL_LOCK, MWL_UNLOCK, and mwl_softc::sc_ic.
Referenced by mwl_pci_resume().
void mwl_shutdown | ( | void * | arg | ) |
Definition at line 783 of file if_mwl.c.
References MWL_LOCK, mwl_stop(), and MWL_UNLOCK.
Referenced by mwl_pci_shutdown().
void mwl_suspend | ( | struct mwl_softc * | sc | ) |
Definition at line 760 of file if_mwl.c.
References MWL_LOCK, mwl_stop(), and MWL_UNLOCK.
Referenced by mwl_pci_suspend().
typedef SLIST_HEAD | ( | mwl_jumbo | ) |
typedef STAILQ_HEAD | ( | mwl_rxbuf | ) |
typedef STAILQ_HEAD | ( | mwl_txbuf | ) |