FreeBSD kernel usb device Code
|
#include <sys/cdefs.h>
#include "opt_wlan.h"
#include <sys/param.h>
#include <sys/sockio.h>
#include <sys/sysctl.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/mbuf.h>
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/endian.h>
#include <sys/kdb.h>
#include <net/bpf.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_arp.h>
#include <net/ethernet.h>
#include <net/if_dl.h>
#include <net/if_media.h>
#include <net/if_types.h>
#include <net80211/ieee80211_var.h>
#include <net80211/ieee80211_regdomain.h>
#include <net80211/ieee80211_radiotap.h>
#include <net80211/ieee80211_ratectl.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include "usbdevs.h"
#include <dev/usb/usb_debug.h>
#include <dev/usb/wlan/if_uralreg.h>
#include <dev/usb/wlan/if_uralvar.h>
Go to the source code of this file.
Macros | |
#define | USB_DEBUG_VAR ural_debug |
#define | URAL_RSSI(rssi) |
#define | URAL_DEV(v, p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } |
#define | RAL_TX_TIMEOUT 5000 |
#define | RAL_RXTX_TURNAROUND 5 /* us */ |
Functions | |
__FBSDID ("$FreeBSD$") | |
static usb_error_t | ural_do_request (struct ural_softc *sc, struct usb_device_request *req, void *data) |
static struct ieee80211vap * | ural_vap_create (struct ieee80211com *, const char[IFNAMSIZ], int, enum ieee80211_opmode, int, const uint8_t[IEEE80211_ADDR_LEN], const uint8_t[IEEE80211_ADDR_LEN]) |
static void | ural_vap_delete (struct ieee80211vap *) |
static void | ural_tx_free (struct ural_tx_data *, int) |
static void | ural_setup_tx_list (struct ural_softc *) |
static void | ural_unsetup_tx_list (struct ural_softc *) |
static int | ural_newstate (struct ieee80211vap *, enum ieee80211_state, int) |
static void | ural_setup_tx_desc (struct ural_softc *, struct ural_tx_desc *, uint32_t, int, int) |
static int | ural_tx_bcn (struct ural_softc *, struct mbuf *, struct ieee80211_node *) |
static int | ural_tx_mgt (struct ural_softc *, struct mbuf *, struct ieee80211_node *) |
static int | ural_tx_data (struct ural_softc *, struct mbuf *, struct ieee80211_node *) |
static int | ural_transmit (struct ieee80211com *, struct mbuf *) |
static void | ural_start (struct ural_softc *) |
static void | ural_parent (struct ieee80211com *) |
static void | ural_set_testmode (struct ural_softc *) |
static void | ural_eeprom_read (struct ural_softc *, uint16_t, void *, int) |
static uint16_t | ural_read (struct ural_softc *, uint16_t) |
static void | ural_read_multi (struct ural_softc *, uint16_t, void *, int) |
static void | ural_write (struct ural_softc *, uint16_t, uint16_t) |
static void | ural_write_multi (struct ural_softc *, uint16_t, void *, static void ural_getradiocaps(struct ieee80211com int) |
DRIVER_MODULE (ural, uhub, ural_driver, ural_devclass, NULL, 0) | |
MODULE_DEPEND (ural, usb, 1, 1, 1) | |
MODULE_DEPEND (ural, wlan, 1, 1, 1) | |
MODULE_VERSION (ural, 1) | |
USB_PNP_HOST_INFO (ural_devs) | |
static int | ural_match (device_t self) |
static int | ural_attach (device_t self) |
static int | ural_detach (device_t self) |
static void | ural_bulk_write_callback (struct usb_xfer *xfer, usb_error_t error) |
static void | ural_bulk_read_callback (struct usb_xfer *xfer, usb_error_t error) |
static uint8_t | ural_plcp_signal (int rate) |
static int | ural_sendprot (struct ural_softc *sc, const struct mbuf *m, struct ieee80211_node *ni, int prot, int rate) |
static int | ural_tx_raw (struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni, const struct ieee80211_bpf_params *params) |
static void | ural_write_multi (struct ural_softc *sc, uint16_t reg, void *buf, int len) |
static void | ural_bbp_write (struct ural_softc *sc, uint8_t reg, uint8_t val) |
static uint8_t | ural_bbp_read (struct ural_softc *sc, uint8_t reg) |
static void | ural_rf_write (struct ural_softc *sc, uint8_t reg, uint32_t val) |
static void | ural_scan_start (struct ieee80211com *ic) |
static void | ural_scan_end (struct ieee80211com *ic) |
static void | ural_getradiocaps (struct ieee80211com *ic, int maxchans, int *nchans, struct ieee80211_channel chans[]) |
static void | ural_set_channel (struct ieee80211com *ic) |
static void | ural_set_chan (struct ural_softc *sc, struct ieee80211_channel *c) |
static void | ural_disable_rf_tune (struct ural_softc *sc) |
static void | ural_enable_tsf_sync (struct ural_softc *sc) |
static void | ural_enable_tsf (struct ural_softc *sc) |
static void | ural_update_slot (struct ural_softc *sc) |
static void | ural_set_txpreamble (struct ural_softc *sc) |
static void | ural_set_basicrates (struct ural_softc *sc, const struct ieee80211_channel *c) |
static void | ural_set_bssid (struct ural_softc *sc, const uint8_t *bssid) |
static void | ural_set_macaddr (struct ural_softc *sc, const uint8_t *addr) |
static void | ural_setpromisc (struct ural_softc *sc) |
static void | ural_update_promisc (struct ieee80211com *ic) |
static const char * | ural_get_rf (int rev) |
static void | ural_read_eeprom (struct ural_softc *sc) |
static int | ural_bbp_init (struct ural_softc *sc) |
static void | ural_set_txantenna (struct ural_softc *sc, int antenna) |
static void | ural_set_rxantenna (struct ural_softc *sc, int antenna) |
static void | ural_init (struct ural_softc *sc) |
static void | ural_stop (struct ural_softc *sc) |
static int | ural_raw_xmit (struct ieee80211_node *ni, struct mbuf *m, const struct ieee80211_bpf_params *params) |
static void | ural_ratectl_start (struct ural_softc *sc, struct ieee80211_node *ni) |
static void | ural_ratectl_timeout (void *arg) |
static void | ural_ratectl_task (void *arg, int pending) |
static int | ural_pause (struct ural_softc *sc, int timeout) |
Variables | |
static const STRUCT_USB_HOST_ID | ural_devs [] |
static usb_callback_t | ural_bulk_read_callback |
static usb_callback_t | ural_bulk_write_callback |
ural_def_mac [] | |
struct { | |
uint8_t reg | |
uint8_t val | |
} | ural_def_bbp [] |
static const uint32_t | ural_rf2522_r2 [] |
static const uint32_t | ural_rf2523_r2 [] |
static const uint32_t | ural_rf2524_r2 [] |
static const uint32_t | ural_rf2525_r2 [] |
static const uint32_t | ural_rf2525_hi_r2 [] |
static const uint32_t | ural_rf2525e_r2 [] |
static const uint32_t | ural_rf2526_hi_r2 [] |
static const uint32_t | ural_rf2526_r2 [] |
struct { | |
uint8_t chan | |
uint32_t r1 | |
uint32_t r2 | |
uint32_t r4 | |
} | ural_rf5222 [] |
static const uint8_t | ural_chan_5ghz [] |
static const struct usb_config | ural_config [URAL_N_TRANSFER] |
static device_probe_t | ural_match |
static device_attach_t | ural_attach |
static device_detach_t | ural_detach |
static device_method_t | ural_methods [] |
static driver_t | ural_driver |
static devclass_t | ural_devclass |
#define URAL_DEV | ( | v, | |
p | |||
) | { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } |
#define URAL_RSSI | ( | rssi | ) |
__FBSDID | ( | "$FreeBSD$" | ) |
DRIVER_MODULE | ( | ural | , |
uhub | , | ||
ural_driver | , | ||
ural_devclass | , | ||
NULL | , | ||
0 | |||
) |
MODULE_DEPEND | ( | ural | , |
usb | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_DEPEND | ( | ural | , |
wlan | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_VERSION | ( | ural | , |
1 | |||
) |
|
static |
Definition at line 428 of file if_ural.c.
References ural_softc::asic_rev, usb_attach_arg::device, device_set_usb_desc(), error, RAL_IFACE_INDEX, RAL_LOCK, RAL_MAC_CSR0, RAL_RX_RADIOTAP_PRESENT, RAL_TX_RADIOTAP_PRESENT, RAL_UNLOCK, ural_softc::rf_rev, ural_softc::sc_dev, ural_softc::sc_ic, ural_softc::sc_mtx, ural_softc::sc_rxtap, ural_softc::sc_snd, ural_softc::sc_txtap, ural_softc::sc_udev, ural_softc::sc_xfer, ural_config, ural_detach, ural_get_rf(), ural_getradiocaps(), URAL_N_TRANSFER, ural_parent(), ural_raw_xmit(), ural_read(), ural_read_eeprom(), ural_scan_end(), ural_scan_start(), ural_set_channel(), ural_transmit(), ural_update_promisc(), ural_vap_create(), ural_vap_delete(), usbd_errstr(), usbd_transfer_setup(), ural_rx_radiotap_header::wr_ihdr, and ural_tx_radiotap_header::wt_ihdr.
|
static |
Definition at line 1938 of file if_ural.c.
References ural_softc::bbp_prom, RAL_BBP_VERSION, reg, ural_softc::reg, ural_softc::sc_dev, ural_bbp_read(), ural_bbp_write(), ural_def_bbp, ural_pause(), val, and ural_softc::val.
Referenced by ural_init().
|
static |
Definition at line 1508 of file if_ural.c.
References RAL_BBP_BUSY, RAL_BBP_WRITE, RAL_PHY_CSR7, RAL_PHY_CSR8, reg, ural_softc::sc_dev, ural_pause(), ural_read(), ural_write(), and val.
Referenced by ural_bbp_init(), ural_set_chan(), ural_set_rxantenna(), and ural_set_txantenna().
|
static |
Definition at line 1487 of file if_ural.c.
References RAL_BBP_BUSY, RAL_PHY_CSR7, RAL_PHY_CSR8, reg, ural_softc::sc_dev, ural_pause(), ural_read(), ural_write(), and val.
Referenced by ural_bbp_init(), ural_set_chan(), ural_set_rxantenna(), and ural_set_txantenna().
|
static |
Definition at line 849 of file if_ural.c.
References DPRINTF, error, ural_rx_desc::flags, len, RAL_LOCK, RAL_NOISE_FLOOR, RAL_RX_CRC_ERROR, RAL_RX_DESC_SIZE, RAL_RX_OFDM, RAL_RX_PHY_ERROR, RAL_UNLOCK, ural_rx_desc::rate, ural_rx_desc::rssi, ural_softc::rx_ant, ural_softc::sc_dev, ural_softc::sc_ic, ural_softc::sc_rx_desc, ural_softc::sc_rxtap, URAL_RSSI, ural_start(), USB_ERR_CANCELLED, USB_GET_STATE, USB_ST_SETUP, USB_ST_TRANSFERRED, usbd_copy_out(), usbd_transfer_submit(), usbd_xfer_get_frame(), usbd_xfer_max_len(), usbd_xfer_set_frame_len(), usbd_xfer_set_stall(), usbd_xfer_softc(), usbd_xfer_status(), ural_rx_radiotap_header::wr_antenna, ural_rx_radiotap_header::wr_antnoise, ural_rx_radiotap_header::wr_antsignal, ural_rx_radiotap_header::wr_flags, and ural_rx_radiotap_header::wr_rate.
|
static |
Definition at line 762 of file if_ural.c.
References data, error, len, next, RAL_FRAME_SIZE, RAL_TX_DESC_SIZE, ural_softc::sc_dev, ural_softc::sc_txtap, ural_softc::tx_ant, ural_softc::tx_q, ural_start(), ural_tx_free(), USB_ERR_STALLED, USB_ERR_TIMEOUT, USB_GET_STATE, USB_ST_SETUP, USB_ST_TRANSFERRED, usbd_copy_in(), usbd_errstr(), usbd_m_copy_in(), usbd_transfer_submit(), usbd_xfer_get_frame(), usbd_xfer_get_priv(), usbd_xfer_set_frame_len(), usbd_xfer_set_priv(), usbd_xfer_set_stall(), usbd_xfer_softc(), usbd_xfer_status(), ural_tx_radiotap_header::wt_antenna, ural_tx_radiotap_header::wt_flags, and ural_tx_radiotap_header::wt_rate.
|
static |
Definition at line 514 of file if_ural.c.
References RAL_LOCK, RAL_UNLOCK, ural_softc::sc_detached, ural_softc::sc_ic, ural_softc::sc_mtx, ural_softc::sc_snd, ural_softc::sc_xfer, URAL_N_TRANSFER, ural_unsetup_tx_list(), and usbd_transfer_unsetup().
|
static |
Definition at line 1721 of file if_ural.c.
References RAL_RF1, RAL_RF3, RAL_RF_2523, ural_softc::rf_regs, ural_softc::rf_rev, and ural_rf_write().
Referenced by ural_set_chan().
|
static |
Definition at line 541 of file if_ural.c.
References data, req, ural_softc::sc_mtx, ural_softc::sc_udev, ural_pause(), usbd_do_request_flags(), and usbd_errstr().
Referenced by ural_eeprom_read(), ural_read(), ural_read_multi(), ural_set_testmode(), ural_write(), and ural_write_multi().
|
static |
Definition at line 1388 of file if_ural.c.
References addr, error, len, RAL_READ_EEPROM, req, ural_softc::sc_dev, ural_do_request(), usbd_errstr(), USETW, and UT_READ_VENDOR_DEVICE.
Referenced by ural_read_eeprom().
|
static |
Definition at line 1770 of file if_ural.c.
References RAL_ENABLE_TSF, RAL_ENABLE_TSF_SYNC, RAL_TXRX_CSR19, and ural_write().
Referenced by ural_newstate().
|
static |
Definition at line 1741 of file if_ural.c.
References DPRINTF, RAL_ENABLE_BEACON_GENERATOR, RAL_ENABLE_TBCN, RAL_ENABLE_TSF, RAL_ENABLE_TSF_SYNC, RAL_TXRX_CSR18, RAL_TXRX_CSR19, RAL_TXRX_CSR20, ural_softc::sc_ic, and ural_write().
Referenced by ural_newstate(), and ural_scan_end().
|
static |
Definition at line 1898 of file if_ural.c.
References RAL_RF_2522, RAL_RF_2523, RAL_RF_2524, RAL_RF_2525, RAL_RF_2525E, RAL_RF_2526, and RAL_RF_5222.
Referenced by ural_attach().
|
static |
Definition at line 1581 of file if_ural.c.
References RAL_RF_5222, ural_softc::rf_rev, and ural_chan_5ghz.
Referenced by ural_attach().
|
static |
Definition at line 2020 of file if_ural.c.
References fail, RAL_BBP_AWAKE, RAL_DROP_BAD_VERSION, RAL_DROP_CRC, RAL_DROP_CTL, RAL_DROP_NOT_TO_ME, RAL_DROP_PHY, RAL_DROP_TODS, RAL_HOST_READY, RAL_LOCK_ASSERT, RAL_MAC_CSR1, RAL_MAC_CSR17, RAL_RF_AWAKE, RAL_STA_CSR0, RAL_TXRX_CSR11, RAL_TXRX_CSR2, reg, ural_softc::rx_ant, ural_softc::sc_dev, ural_softc::sc_ic, ural_softc::sc_running, ural_softc::sc_xfer, ural_softc::sta, ural_softc::tx_ant, ural_bbp_init(), URAL_BULK_RD, URAL_BULK_WR, ural_def_mac, ural_pause(), ural_read(), ural_read_multi(), ural_set_chan(), ural_set_macaddr(), ural_set_rxantenna(), ural_set_testmode(), ural_set_txantenna(), ural_setup_tx_list(), ural_stop(), ural_write(), usbd_transfer_start(), usbd_xfer_set_stall(), and val.
Referenced by ural_parent().
|
static |
Definition at line 413 of file if_ural.c.
References usbd_lookup_info::bConfigIndex, usbd_lookup_info::bIfaceIndex, usb_attach_arg::info, RAL_IFACE_INDEX, ural_devs, usb_attach_arg::usb_mode, USB_MODE_HOST, and usbd_lookup_id_by_uaa().
|
static |
Definition at line 673 of file if_ural.c.
References DPRINTF, fail, ural_vap::newstate, RAL_LOCK, RAL_MAC_CSR20, RAL_TXRX_CSR19, RAL_UNLOCK, ural_vap::ratectl_ch, ural_softc::sc_bssid, ural_softc::sc_dev, ural_enable_tsf(), ural_enable_tsf_sync(), ural_ratectl_start(), ural_set_basicrates(), ural_set_bssid(), ural_set_txpreamble(), ural_tx_bcn(), ural_update_slot(), URAL_VAP, ural_write(), usb_callout_stop, and ural_vap::vap.
Referenced by ural_vap_create().
|
static |
Definition at line 1345 of file if_ural.c.
References RAL_LOCK, RAL_UNLOCK, ural_softc::sc_detached, ural_softc::sc_running, ural_init(), ural_setpromisc(), and ural_stop().
Referenced by ural_attach().
|
static |
Definition at line 2220 of file if_ural.c.
References ural_softc::sc_mtx, and usb_pause_mtx().
Referenced by ural_bbp_init(), ural_bbp_read(), ural_bbp_write(), ural_do_request(), ural_init(), ural_rf_write(), ural_set_chan(), and ural_stop().
|
static |
Definition at line 958 of file if_ural.c.
Referenced by ural_setup_tx_desc().
|
static |
Definition at line 2168 of file if_ural.c.
References RAL_STA_CSR0, ural_vap::ratectl_ch, ural_softc::sta, ural_ratectl_timeout(), ural_read_multi(), URAL_VAP, usb_callout_reset, and ural_vap::vap.
Referenced by ural_newstate().
|
static |
Definition at line 2190 of file if_ural.c.
References fail, RAL_LOCK, RAL_STA_CSR0, RAL_UNLOCK, ural_vap::ratectl_ch, ural_softc::sc_txs, ural_softc::sta, ural_ratectl_timeout(), ural_read_multi(), usb_callout_reset, and ural_vap::vap.
Referenced by ural_vap_create().
|
static |
Definition at line 2180 of file if_ural.c.
References ural_vap::ratectl_task, and ural_vap::vap.
Referenced by ural_ratectl_start(), and ural_ratectl_task().
|
static |
Definition at line 2126 of file if_ural.c.
References RAL_LOCK, RAL_TX_MINFREE, RAL_UNLOCK, ural_softc::sc_running, ural_softc::tx_nfree, ural_tx_mgt(), and ural_tx_raw().
Referenced by ural_attach().
|
static |
Definition at line 1407 of file if_ural.c.
References error, RAL_READ_MAC, reg, req, ural_softc::sc_dev, ural_do_request(), usbd_errstr(), USETW, UT_READ_VENDOR_DEVICE, and val.
Referenced by ural_attach(), ural_bbp_read(), ural_bbp_write(), ural_init(), ural_rf_write(), ural_set_chan(), ural_set_txantenna(), ural_set_txpreamble(), and ural_setpromisc().
|
static |
Definition at line 1913 of file if_ural.c.
References ural_softc::bbp_prom, ural_softc::hw_radio, ural_softc::led_mode, ural_softc::nb_ant, RAL_EEPROM_ADDRESS, RAL_EEPROM_BBP_BASE, RAL_EEPROM_CONFIG0, RAL_EEPROM_TXPOWER, ural_softc::rf_rev, ural_softc::rx_ant, ural_softc::sc_ic, ural_softc::tx_ant, ural_softc::txpow, ural_eeprom_read(), and val.
Referenced by ural_attach().
|
static |
Definition at line 1430 of file if_ural.c.
References error, len, RAL_READ_MULTI_MAC, reg, req, ural_softc::sc_dev, ural_do_request(), usbd_errstr(), USETW, and UT_READ_VENDOR_DEVICE.
Referenced by ural_init(), ural_ratectl_start(), and ural_ratectl_task().
|
static |
Definition at line 1531 of file if_ural.c.
References RAL_PHY_CSR10, RAL_PHY_CSR9, RAL_RF_20BIT, RAL_RF_BUSY, RAL_RF_LOBUSY, reg, ural_softc::rf_regs, ural_softc::sc_dev, ural_pause(), ural_read(), ural_write(), and val.
Referenced by ural_disable_rf_tune(), and ural_set_chan().
|
static |
Definition at line 1569 of file if_ural.c.
References RAL_LOCK, RAL_UNLOCK, ural_softc::sc_bssid, ural_enable_tsf_sync(), and ural_set_bssid().
Referenced by ural_attach().
|
static |
Definition at line 1558 of file if_ural.c.
References RAL_LOCK, RAL_TXRX_CSR19, RAL_UNLOCK, ural_set_bssid(), and ural_write().
Referenced by ural_attach().
|
static |
Definition at line 1127 of file if_ural.c.
References data, next, RAL_TX_ACK, RAL_TX_RETRY, ural_softc::sc_dev, ural_softc::sc_xfer, ural_softc::tx_free, ural_softc::tx_nfree, ural_softc::tx_q, URAL_BULK_WR, ural_setup_tx_desc(), and usbd_transfer_start().
Referenced by ural_tx_data(), and ural_tx_raw().
|
static |
Definition at line 1819 of file if_ural.c.
References RAL_TXRX_CSR11, and ural_write().
Referenced by ural_newstate(), and ural_set_chan().
|
static |
Definition at line 1836 of file if_ural.c.
References DPRINTF, RAL_MAC_CSR5, RAL_MAC_CSR6, RAL_MAC_CSR7, and ural_write().
Referenced by ural_newstate(), ural_scan_end(), and ural_scan_start().
|
static |
Definition at line 1610 of file if_ural.c.
References chan, r1, r2, r4, RAL_JAPAN_FILTER, RAL_RF1, RAL_RF2, RAL_RF3, RAL_RF4, RAL_RF_2522, RAL_RF_2523, RAL_RF_2524, RAL_RF_2525, RAL_RF_2525E, RAL_RF_2526, RAL_RF_5222, RAL_STA_CSR0, ural_softc::rf_rev, ural_softc::sc_ic, ural_softc::txpow, ural_bbp_read(), ural_bbp_write(), ural_disable_rf_tune(), ural_pause(), ural_read(), ural_rf2522_r2, ural_rf2523_r2, ural_rf2524_r2, ural_rf2525_hi_r2, ural_rf2525_r2, ural_rf2525e_r2, ural_rf2526_hi_r2, ural_rf2526_r2, ural_rf5222, ural_rf_write(), and ural_set_basicrates().
Referenced by ural_init(), and ural_set_channel().
|
static |
Definition at line 1600 of file if_ural.c.
References RAL_LOCK, RAL_UNLOCK, and ural_set_chan().
Referenced by ural_attach().
|
static |
Definition at line 1853 of file if_ural.c.
References addr, DPRINTF, RAL_MAC_CSR2, RAL_MAC_CSR3, RAL_MAC_CSR4, and ural_write().
Referenced by ural_init().
|
static |
Definition at line 2000 of file if_ural.c.
References RAL_BBP_ANTA, RAL_BBP_ANTB, RAL_BBP_DIVERSITY, RAL_BBP_RX, RAL_RF_2525E, RAL_RF_2526, ural_softc::rf_rev, ural_bbp_read(), and ural_bbp_write().
Referenced by ural_init().
|
static |
Definition at line 1369 of file if_ural.c.
References error, RAL_VENDOR_REQUEST, req, ural_softc::sc_dev, ural_do_request(), usbd_errstr(), USETW, and UT_WRITE_VENDOR_DEVICE.
Referenced by ural_init().
|
static |
Definition at line 1971 of file if_ural.c.
References RAL_BBP_ANTA, RAL_BBP_ANTB, RAL_BBP_DIVERSITY, RAL_BBP_FLIPIQ, RAL_BBP_TX, RAL_PHY_CSR5, RAL_PHY_CSR6, RAL_RF_2525E, RAL_RF_2526, RAL_RF_5222, ural_softc::rf_rev, tx, ural_bbp_read(), ural_bbp_write(), ural_read(), and ural_write().
Referenced by ural_init().
|
static |
Definition at line 1804 of file if_ural.c.
References RAL_SHORT_PREAMBLE, RAL_TXRX_CSR10, ural_softc::sc_ic, ural_read(), and ural_write().
Referenced by ural_newstate().
|
static |
Definition at line 1870 of file if_ural.c.
References DPRINTF, RAL_DROP_NOT_TO_ME, RAL_TXRX_CSR2, ural_softc::sc_ic, ural_read(), and ural_write().
Referenced by ural_parent(), and ural_update_promisc().
|
static |
Definition at line 981 of file if_ural.c.
References desc, len, RAL_AIFSN, RAL_IVOFFSET, RAL_LOGCWMAX, RAL_LOGCWMIN, RAL_PLCP_LENGEXT, RAL_TX_NEWSEQ, RAL_TX_OFDM, remainder, ural_softc::sc_ic, and ural_plcp_signal().
Referenced by ural_sendprot(), ural_tx_bcn(), ural_tx_data(), ural_tx_mgt(), and ural_tx_raw().
|
static |
Definition at line 628 of file if_ural.c.
References data, next, RAL_TX_LIST_COUNT, ural_tx_data::sc, ural_softc::tx_data, ural_softc::tx_free, ural_softc::tx_nfree, and ural_softc::tx_q.
Referenced by ural_init().
|
static |
Definition at line 1322 of file if_ural.c.
References RAL_LOCK_ASSERT, RAL_TX_MINFREE, ural_softc::sc_running, ural_softc::sc_snd, ural_softc::tx_nfree, and ural_tx_data().
Referenced by ural_bulk_read_callback(), ural_bulk_write_callback(), and ural_transmit().
|
static |
Definition at line 2097 of file if_ural.c.
References RAL_DISABLE_RX, RAL_LOCK, RAL_LOCK_ASSERT, RAL_MAC_CSR1, RAL_RESET_ASIC, RAL_RESET_BBP, RAL_TXRX_CSR2, RAL_UNLOCK, ural_softc::sc_running, ural_softc::sc_xfer, URAL_BULK_RD, URAL_BULK_WR, ural_pause(), ural_unsetup_tx_list(), ural_write(), and usbd_transfer_drain().
Referenced by ural_init(), and ural_parent().
|
static |
Definition at line 1300 of file if_ural.c.
References error, RAL_LOCK, RAL_UNLOCK, ural_softc::sc_running, ural_softc::sc_snd, and ural_start().
Referenced by ural_attach().
|
static |
Definition at line 1029 of file if_ural.c.
References data, next, ural_tx_data::ni, RAL_TX_IFS_NEWBACKOFF, RAL_TX_TIMESTAMP, ural_tx_data::sc, ural_softc::sc_xfer, ural_softc::tx_free, ural_softc::tx_nfree, ural_softc::tx_q, URAL_BULK_WR, ural_setup_tx_desc(), and usbd_transfer_start().
Referenced by ural_newstate().
|
static |
Definition at line 1217 of file if_ural.c.
References data, error, k, next, RAL_LOCK_ASSERT, RAL_TX_ACK, RAL_TX_IFS_SIFS, RAL_TX_RETRY, ural_softc::sc_xfer, ural_softc::tx_free, ural_softc::tx_nfree, ural_softc::tx_q, URAL_BULK_WR, ural_sendprot(), ural_setup_tx_desc(), usbd_transfer_start(), and USETW.
Referenced by ural_start().
|
static |
Definition at line 614 of file if_ural.c.
References data, next, ural_softc::tx_free, and ural_softc::tx_nfree.
Referenced by ural_bulk_write_callback().
|
static |
Definition at line 1069 of file if_ural.c.
References data, k, next, RAL_LOCK_ASSERT, RAL_TX_ACK, RAL_TX_TIMESTAMP, ural_softc::sc_xfer, ural_softc::tx_free, ural_softc::tx_nfree, ural_softc::tx_q, URAL_BULK_WR, ural_setup_tx_desc(), usbd_transfer_start(), and USETW.
Referenced by ural_raw_xmit().
|
static |
Definition at line 1164 of file if_ural.c.
References data, error, next, ural_tx_data::ni, RAL_LOCK_ASSERT, RAL_TX_ACK, RAL_TX_IFS_SIFS, ural_tx_data::rate, ural_tx_data::sc, ural_softc::sc_xfer, ural_softc::tx_free, ural_softc::tx_nfree, ural_softc::tx_q, URAL_BULK_WR, ural_sendprot(), ural_setup_tx_desc(), and usbd_transfer_start().
Referenced by ural_raw_xmit().
|
static |
Definition at line 647 of file if_ural.c.
References data, RAL_TX_LIST_COUNT, ural_tx_data::sc, ural_softc::tx_data, ural_softc::tx_free, ural_softc::tx_nfree, and ural_softc::tx_q.
Referenced by ural_detach(), and ural_stop().
|
static |
Definition at line 1887 of file if_ural.c.
References RAL_LOCK, RAL_UNLOCK, ural_softc::sc_running, and ural_setpromisc().
Referenced by ural_attach().
|
static |
Definition at line 1779 of file if_ural.c.
References RAL_MAC_CSR10, RAL_MAC_CSR11, RAL_MAC_CSR12, RAL_RXTX_TURNAROUND, ural_softc::sc_ic, and ural_write().
Referenced by ural_newstate().
|
static |
Definition at line 562 of file if_ural.c.
References name, ural_vap::newstate, ural_vap::ratectl_ch, ural_vap::ratectl_task, ural_softc::sc_mtx, ural_newstate(), ural_ratectl_task(), usb_callout_init_mtx, and ural_vap::vap.
Referenced by ural_attach().
|
static |
Definition at line 601 of file if_ural.c.
References ural_vap::ratectl_ch, ural_vap::ratectl_task, URAL_VAP, usb_callout_drain, and ural_vap::vap.
Referenced by ural_attach().
|
static |
Definition at line 1449 of file if_ural.c.
References error, RAL_WRITE_MAC, reg, req, ural_softc::sc_dev, ural_do_request(), usbd_errstr(), USETW, UT_WRITE_VENDOR_DEVICE, and val.
Referenced by ural_bbp_read(), ural_bbp_write(), ural_enable_tsf(), ural_enable_tsf_sync(), ural_init(), ural_newstate(), ural_rf_write(), ural_scan_start(), ural_set_basicrates(), ural_set_bssid(), ural_set_macaddr(), ural_set_txantenna(), ural_set_txpreamble(), ural_setpromisc(), ural_stop(), and ural_update_slot().
|
static |
|
static |
Definition at line 1468 of file if_ural.c.
References error, len, RAL_WRITE_MULTI_MAC, reg, req, ural_softc::sc_dev, ural_do_request(), usbd_errstr(), USETW, and UT_WRITE_VENDOR_DEVICE.
USB_PNP_HOST_INFO | ( | ural_devs | ) |
uint8_t chan |
Definition at line 314 of file if_ural.c.
Referenced by rum_set_chan(), run_get_txpower(), run_iq_calib(), run_rssi2dbm(), run_rt2870_set_chan(), run_rt3070_set_chan(), run_rt3572_set_chan(), run_rt3593_set_chan(), run_rt5390_set_chan(), run_rt5592_set_chan(), run_set_chan(), upgt_set_chan(), ural_set_chan(), urtw_8225_rf_set_chan(), urtw_8225_set_txpwrlvl(), urtw_8225v2_rf_set_chan(), urtw_8225v2_set_txpwrlvl(), urtw_8225v2b_rf_set_chan(), urtw_8225v2b_set_txpwrlvl(), zyd_al2210_set_channel(), zyd_al2230_bandedge6(), zyd_al2230_set_channel(), zyd_al2230_set_channel_b(), zyd_al7230B_set_channel(), zyd_gct_set_channel(), zyd_gct_set_channel_synth(), zyd_gct_txgain(), zyd_maxim2_set_channel(), zyd_rfmd_set_channel(), and zyd_set_chan().
uint32_t r1 |
Definition at line 315 of file if_ural.c.
Referenced by rum_set_chan(), run_rt2870_set_chan(), ural_set_chan(), zyd_al2230_set_channel(), zyd_al2230_set_channel_b(), zyd_al7230B_set_channel(), zyd_maxim2_set_channel(), and zyd_rfmd_set_channel().
uint32_t r2 |
Definition at line 316 of file if_ural.c.
Referenced by rum_set_chan(), run_rt2870_set_chan(), ural_set_chan(), zyd_al2230_set_channel(), zyd_al2230_set_channel_b(), zyd_al7230B_set_channel(), zyd_maxim2_set_channel(), and zyd_rfmd_set_channel().
uint32_t r4 |
Definition at line 317 of file if_ural.c.
Referenced by rum_set_chan(), run_rt2870_set_chan(), and ural_set_chan().
uint8_t reg |
Definition at line 229 of file if_ural.c.
Referenced by ural_bbp_init(), ural_bbp_read(), ural_bbp_write(), ural_init(), ural_read(), ural_read_multi(), ural_rf_write(), ural_write(), and ural_write_multi().
|
static |
|
static |
|
static |
Definition at line 361 of file if_ural.c.
Referenced by ural_getradiocaps().
|
static |
Definition at line 366 of file if_ural.c.
Referenced by ural_attach().
const struct { ... } ural_def_bbp[] |
Referenced by ural_bbp_init().
ural_def_mac[] |
Definition at line 205 of file if_ural.c.
Referenced by ural_init().
|
static |
Definition at line 388 of file if_ural.c.
Referenced by ural_attach().
|
static |
Definition at line 94 of file if_ural.c.
Referenced by ural_match().
|
static |
|
static |
|
static |
Definition at line 269 of file if_ural.c.
Referenced by ural_set_chan().
|
static |
Definition at line 274 of file if_ural.c.
Referenced by ural_set_chan().
|
static |
Definition at line 279 of file if_ural.c.
Referenced by ural_set_chan().
|
static |
Definition at line 289 of file if_ural.c.
Referenced by ural_set_chan().
|
static |
Definition at line 284 of file if_ural.c.
Referenced by ural_set_chan().
|
static |
Definition at line 294 of file if_ural.c.
Referenced by ural_set_chan().
|
static |
Definition at line 299 of file if_ural.c.
Referenced by ural_set_chan().
|
static |
Definition at line 304 of file if_ural.c.
Referenced by ural_set_chan().
const struct { ... } ural_rf5222[] |
Referenced by ural_set_chan().
uint8_t val |
Definition at line 230 of file if_ural.c.
Referenced by ural_bbp_init(), ural_bbp_read(), ural_bbp_write(), ural_init(), ural_read(), ural_read_eeprom(), ural_rf_write(), and ural_write().