FreeBSD kernel usb device Code
if_urtw.c File Reference
#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/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 <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include "usbdevs.h"
#include <dev/usb/wlan/if_urtwreg.h>
#include <dev/usb/wlan/if_urtwvar.h>
Include dependency graph for if_urtw.c:

Go to the source code of this file.

Data Structures

struct  urtw_pair
 

Macros

#define URTW_RIDX_CCK5   2
 
#define URTW_RIDX_CCK11   3
 
#define URTW_RIDX_OFDM6   4
 
#define URTW_RIDX_OFDM24   8
 
#define DPRINTF(sc, m, fmt, ...)
 
#define urtw_lookup(v, p)    ((const struct urtw_type *)usb_lookup(urtw_devs, v, p))
 
#define URTW_DEV_B(v, p)    { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, URTW_REV_RTL8187B) }
 
#define URTW_DEV_L(v, p)    { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, URTW_REV_RTL8187L) }
 
#define URTW_REV_RTL8187B   0
 
#define URTW_REV_RTL8187L   1
 
#define urtw_read8_m(sc, val, data)
 
#define urtw_write8_m(sc, val, data)
 
#define urtw_read16_m(sc, val, data)
 
#define urtw_write16_m(sc, val, data)
 
#define urtw_read32_m(sc, val, data)
 
#define urtw_write32_m(sc, val, data)
 
#define urtw_8187_write_phy_ofdm(sc, val, data)
 
#define urtw_8187_write_phy_cck(sc, val, data)
 
#define urtw_8225_write(sc, val, data)
 
#define URTW_READCMD_LEN   3
 
#define URTW_ARFR   0x1e0
 
#define URTW_FEMR_FOR_8187B   0x1d4
 
#define URTW_RFSW_CTRL   0x272
 
#define URTW_STATUS_TYPE_TXCLOSE   1
 
#define URTW_STATUS_TYPE_BEACON_INTR   0
 
#define URTW_SYSCTL_STAT_ADD32(c, h, n, p, d)    SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d)
 

Functions

 __FBSDID ("$FreeBSD$")
 
static SYSCTL_NODE (_hw_usb, OID_AUTO, urtw, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "USB Realtek 8187L")
 
 SYSCTL_INT (_hw_usb_urtw, OID_AUTO, preamble_mode, CTLFLAG_RWTUN, &urtw_preamble_mode, 0, "set the preable mode (long or short)")
 
static struct ieee80211vap * urtw_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 urtw_vap_delete (struct ieee80211vap *)
 
static void urtw_init (struct urtw_softc *)
 
static void urtw_stop (struct urtw_softc *)
 
static void urtw_parent (struct ieee80211com *)
 
static int urtw_transmit (struct ieee80211com *, struct mbuf *)
 
static void urtw_start (struct urtw_softc *)
 
static int urtw_alloc_rx_data_list (struct urtw_softc *)
 
static int urtw_alloc_tx_data_list (struct urtw_softc *)
 
static int urtw_raw_xmit (struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *)
 
static void urtw_scan_start (struct ieee80211com *)
 
static void urtw_scan_end (struct ieee80211com *)
 
static void urtw_getradiocaps (struct ieee80211com *, int, int *, struct ieee80211_channel[])
 
static void urtw_set_channel (struct ieee80211com *)
 
static void urtw_update_promisc (struct ieee80211com *)
 
static void urtw_update_mcast (struct ieee80211com *)
 
static int urtw_tx_start (struct urtw_softc *, struct ieee80211_node *, struct mbuf *, struct urtw_data *, int)
 
static int urtw_newstate (struct ieee80211vap *, enum ieee80211_state, int)
 
static void urtw_led_ch (void *)
 
static void urtw_ledtask (void *, int)
 
static void urtw_watchdog (void *)
 
static void urtw_set_multi (void *)
 
static int urtw_isbmode (uint16_t)
 
static uint16_t urtw_rtl2rate (uint32_t)
 
static usb_error_t urtw_set_rate (struct urtw_softc *)
 
static usb_error_t urtw_update_msr (struct urtw_softc *)
 
static usb_error_t urtw_read8_c (struct urtw_softc *, int, uint8_t *)
 
static usb_error_t urtw_read16_c (struct urtw_softc *, int, uint16_t *)
 
static usb_error_t urtw_read32_c (struct urtw_softc *, int, uint32_t *)
 
static usb_error_t urtw_write8_c (struct urtw_softc *, int, uint8_t)
 
static usb_error_t urtw_write16_c (struct urtw_softc *, int, uint16_t)
 
static usb_error_t urtw_write32_c (struct urtw_softc *, int, uint32_t)
 
static usb_error_t urtw_eprom_cs (struct urtw_softc *, int)
 
static usb_error_t urtw_eprom_ck (struct urtw_softc *)
 
static usb_error_t urtw_eprom_sendbits (struct urtw_softc *, int16_t *, int)
 
static usb_error_t urtw_eprom_read32 (struct urtw_softc *, uint32_t, uint32_t *)
 
static usb_error_t urtw_eprom_readbit (struct urtw_softc *, int16_t *)
 
static usb_error_t urtw_eprom_writebit (struct urtw_softc *, int16_t)
 
static usb_error_t urtw_get_macaddr (struct urtw_softc *)
 
static usb_error_t urtw_get_txpwr (struct urtw_softc *)
 
static usb_error_t urtw_get_rfchip (struct urtw_softc *)
 
static usb_error_t urtw_led_init (struct urtw_softc *)
 
static usb_error_t urtw_8185_rf_pins_enable (struct urtw_softc *)
 
static usb_error_t urtw_8185_tx_antenna (struct urtw_softc *, uint8_t)
 
static usb_error_t urtw_8187_write_phy (struct urtw_softc *, uint8_t, uint32_t)
 
static usb_error_t urtw_8187_write_phy_ofdm_c (struct urtw_softc *, uint8_t, uint32_t)
 
static usb_error_t urtw_8187_write_phy_cck_c (struct urtw_softc *, uint8_t, uint32_t)
 
static usb_error_t urtw_8225_setgain (struct urtw_softc *, int16_t)
 
static usb_error_t urtw_8225_usb_init (struct urtw_softc *)
 
static usb_error_t urtw_8225_write_c (struct urtw_softc *, uint8_t, uint16_t)
 
static usb_error_t urtw_8225_write_s16 (struct urtw_softc *, uint8_t, int, uint16_t *)
 
static usb_error_t urtw_8225_read (struct urtw_softc *, uint8_t, uint32_t *)
 
static usb_error_t urtw_8225_rf_init (struct urtw_softc *)
 
static usb_error_t urtw_8225_rf_set_chan (struct urtw_softc *, int)
 
static usb_error_t urtw_8225_rf_set_sens (struct urtw_softc *, int)
 
static usb_error_t urtw_8225_set_txpwrlvl (struct urtw_softc *, int)
 
static usb_error_t urtw_8225_rf_stop (struct urtw_softc *)
 
static usb_error_t urtw_8225v2_rf_init (struct urtw_softc *)
 
static usb_error_t urtw_8225v2_rf_set_chan (struct urtw_softc *, int)
 
static usb_error_t urtw_8225v2_set_txpwrlvl (struct urtw_softc *, int)
 
static usb_error_t urtw_8225v2_setgain (struct urtw_softc *, int16_t)
 
static usb_error_t urtw_8225_isv2 (struct urtw_softc *, int *)
 
static usb_error_t urtw_8225v2b_rf_init (struct urtw_softc *)
 
static usb_error_t urtw_8225v2b_rf_set_chan (struct urtw_softc *, int)
 
static usb_error_t urtw_read8e (struct urtw_softc *, int, uint8_t *)
 
static usb_error_t urtw_write8e (struct urtw_softc *, int, uint8_t)
 
static usb_error_t urtw_8180_set_anaparam (struct urtw_softc *, uint32_t)
 
static usb_error_t urtw_8185_set_anaparam2 (struct urtw_softc *, uint32_t)
 
static usb_error_t urtw_intr_enable (struct urtw_softc *)
 
static usb_error_t urtw_intr_disable (struct urtw_softc *)
 
static usb_error_t urtw_reset (struct urtw_softc *)
 
static usb_error_t urtw_led_on (struct urtw_softc *, int)
 
static usb_error_t urtw_led_ctl (struct urtw_softc *, int)
 
static usb_error_t urtw_led_blink (struct urtw_softc *)
 
static usb_error_t urtw_led_mode0 (struct urtw_softc *, int)
 
static usb_error_t urtw_led_mode1 (struct urtw_softc *, int)
 
static usb_error_t urtw_led_mode2 (struct urtw_softc *, int)
 
static usb_error_t urtw_led_mode3 (struct urtw_softc *, int)
 
static usb_error_t urtw_rx_setconf (struct urtw_softc *)
 
static usb_error_t urtw_rx_enable (struct urtw_softc *)
 
static usb_error_t urtw_tx_enable (struct urtw_softc *sc)
 
static void urtw_free_tx_data_list (struct urtw_softc *)
 
static void urtw_free_rx_data_list (struct urtw_softc *)
 
static void urtw_free_data_list (struct urtw_softc *, struct urtw_data data[], int, int)
 
static usb_error_t urtw_set_macaddr (struct urtw_softc *, const uint8_t *)
 
static usb_error_t urtw_adapter_start (struct urtw_softc *)
 
static usb_error_t urtw_adapter_start_b (struct urtw_softc *)
 
static usb_error_t urtw_set_mode (struct urtw_softc *, uint32_t)
 
static usb_error_t urtw_8187b_cmd_reset (struct urtw_softc *)
 
static usb_error_t urtw_do_request (struct urtw_softc *, struct usb_device_request *, void *)
 
static usb_error_t urtw_8225v2b_set_txpwrlvl (struct urtw_softc *, int)
 
static usb_error_t urtw_led_off (struct urtw_softc *, int)
 
static void urtw_abort_xfers (struct urtw_softc *)
 
static struct urtw_dataurtw_getbuf (struct urtw_softc *sc)
 
static int urtw_compute_txtime (uint16_t, uint16_t, uint8_t, uint8_t)
 
static void urtw_updateslot (struct ieee80211com *)
 
static void urtw_updateslottask (void *, int)
 
static void urtw_sysctl_node (struct urtw_softc *)
 
static int urtw_match (device_t dev)
 
static int urtw_attach (device_t dev)
 
static int urtw_detach (device_t dev)
 
static int urtw_alloc_data_list (struct urtw_softc *sc, struct urtw_data data[], int ndata, int maxsz, void *dma_buf)
 
static struct mbuf * urtw_rxeof (struct usb_xfer *xfer, struct urtw_data *data, int *rssi_p, int8_t *nf_p)
 
static void urtw_bulk_rx_callback (struct usb_xfer *xfer, usb_error_t error)
 
static void urtw_txstatus_eof (struct usb_xfer *xfer)
 
static void urtw_bulk_tx_status_callback (struct usb_xfer *xfer, usb_error_t error)
 
static void urtw_txeof (struct usb_xfer *xfer, struct urtw_data *data)
 
static void urtw_bulk_tx_callback (struct usb_xfer *xfer, usb_error_t error)
 
static struct urtw_data_urtw_getbuf (struct urtw_softc *sc)
 
static uint16_t urtw_rate2dbps (uint16_t rate)
 
 DRIVER_MODULE (urtw, uhub, urtw_driver, urtw_devclass, NULL, 0)
 
 MODULE_DEPEND (urtw, wlan, 1, 1, 1)
 
 MODULE_DEPEND (urtw, usb, 1, 1, 1)
 
 MODULE_VERSION (urtw, 1)
 
 USB_PNP_HOST_INFO (urtw_devs)
 

Variables

static int urtw_preamble_mode = URTW_PREAMBLE_MODE_LONG
 
static const STRUCT_USB_HOST_ID urtw_devs []
 
static uint8_t urtw_8225_agc []
 
static uint8_t urtw_8225z2_agc []
 
static uint32_t urtw_8225_channel []
 
static uint8_t urtw_8225_gain []
 
static struct urtw_pair urtw_8225_rf_part1 []
 
static struct urtw_pair urtw_8225_rf_part2 []
 
static struct urtw_pair urtw_8225_rf_part3 []
 
static uint16_t urtw_8225_rxgain []
 
static uint8_t urtw_8225_threshold []
 
static uint8_t urtw_8225_tx_gain_cck_ofdm []
 
static uint8_t urtw_8225_txpwr_cck []
 
static uint8_t urtw_8225_txpwr_cck_ch14 []
 
static uint8_t urtw_8225_txpwr_ofdm []
 
static uint8_t urtw_8225v2_gain_bg []
 
static struct urtw_pair urtw_8225v2_rf_part1 []
 
static struct urtw_pair urtw_8225v2b_rf_part0 []
 
static struct urtw_pair urtw_8225v2b_rf_part1 []
 
static struct urtw_pair urtw_8225v2_rf_part2 []
 
static struct urtw_pair urtw_8225v2b_rf_part2 []
 
static struct urtw_pair urtw_8225v2_rf_part3 []
 
static uint16_t urtw_8225v2_rxgain []
 
static uint16_t urtw_8225v2b_rxgain []
 
static uint8_t urtw_8225v2_tx_gain_cck_ofdm []
 
static uint8_t urtw_8225v2_txpwr_cck []
 
static uint8_t urtw_8225v2_txpwr_cck_ch14 []
 
static uint8_t urtw_8225v2b_txpwr_cck []
 
static uint8_t urtw_8225v2b_txpwr_cck_ch14 []
 
static struct urtw_pair urtw_ratetable []
 
static usb_callback_t urtw_bulk_rx_callback
 
static usb_callback_t urtw_bulk_tx_callback
 
static usb_callback_t urtw_bulk_tx_status_callback
 
static const struct usb_config urtw_8187b_usbconfig [URTW_8187B_N_XFERS]
 
static const struct usb_config urtw_8187l_usbconfig [URTW_8187L_N_XFERS]
 
static device_method_t urtw_methods []
 
static driver_t urtw_driver
 
static devclass_t urtw_devclass
 

Macro Definition Documentation

◆ DPRINTF

#define DPRINTF (   sc,
  m,
  fmt,
  ... 
)
Value:
do { \
(void) sc; \
} while (0)

Definition at line 93 of file if_urtw.c.

◆ urtw_8187_write_phy_cck

#define urtw_8187_write_phy_cck (   sc,
  val,
  data 
)
Value:
do { \
error = urtw_8187_write_phy_cck_c(sc, val, data); \
if (error != 0) \
goto fail; \
} while (0)
uint32_t val
Definition: if_rum.c:284
uint16_t fail
Definition: if_runreg.h:2
struct @109 error
static usb_error_t urtw_8187_write_phy_cck_c(struct urtw_softc *, uint8_t, uint32_t)
Definition: if_urtw.c:2614

Definition at line 169 of file if_urtw.c.

◆ urtw_8187_write_phy_ofdm

#define urtw_8187_write_phy_ofdm (   sc,
  val,
  data 
)
Value:
do { \
error = urtw_8187_write_phy_ofdm_c(sc, val, data); \
if (error != 0) \
goto fail; \
} while (0)
static usb_error_t urtw_8187_write_phy_ofdm_c(struct urtw_softc *, uint8_t, uint32_t)
Definition: if_urtw.c:2606

Definition at line 164 of file if_urtw.c.

◆ urtw_8225_write

#define urtw_8225_write (   sc,
  val,
  data 
)
Value:
do { \
error = urtw_8225_write_c(sc, val, data); \
if (error != 0) \
goto fail; \
} while (0)
static usb_error_t urtw_8225_write_c(struct urtw_softc *, uint8_t, uint16_t)
Definition: if_urtw.c:2678

Definition at line 174 of file if_urtw.c.

◆ URTW_ARFR

#define URTW_ARFR   0x1e0

◆ URTW_DEV_B

#define URTW_DEV_B (   v,
 
)     { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, URTW_REV_RTL8187B) }

Definition at line 104 of file if_urtw.c.

◆ URTW_DEV_L

#define URTW_DEV_L (   v,
 
)     { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, URTW_REV_RTL8187L) }

Definition at line 106 of file if_urtw.c.

◆ URTW_FEMR_FOR_8187B

#define URTW_FEMR_FOR_8187B   0x1d4

◆ urtw_lookup

#define urtw_lookup (   v,
 
)     ((const struct urtw_type *)usb_lookup(urtw_devs, v, p))

Definition at line 102 of file if_urtw.c.

◆ urtw_read16_m

#define urtw_read16_m (   sc,
  val,
  data 
)
Value:
do { \
error = urtw_read16_c(sc, val, data); \
if (error != 0) \
goto fail; \
} while (0)
static usb_error_t urtw_read16_c(struct urtw_softc *, int, uint16_t *)
Definition: if_urtw.c:2029

Definition at line 144 of file if_urtw.c.

◆ urtw_read32_m

#define urtw_read32_m (   sc,
  val,
  data 
)
Value:
do { \
error = urtw_read32_c(sc, val, data); \
if (error != 0) \
goto fail; \
} while (0)
static usb_error_t urtw_read32_c(struct urtw_softc *, int, uint32_t *)
Definition: if_urtw.c:2047

Definition at line 154 of file if_urtw.c.

◆ urtw_read8_m

#define urtw_read8_m (   sc,
  val,
  data 
)
Value:
do { \
error = urtw_read8_c(sc, val, data); \
if (error != 0) \
goto fail; \
} while (0)
static usb_error_t urtw_read8_c(struct urtw_softc *, int, uint8_t *)
Definition: if_urtw.c:2011

Definition at line 134 of file if_urtw.c.

◆ URTW_READCMD_LEN

#define URTW_READCMD_LEN   3

◆ URTW_REV_RTL8187B

#define URTW_REV_RTL8187B   0

Definition at line 108 of file if_urtw.c.

◆ URTW_REV_RTL8187L

#define URTW_REV_RTL8187L   1

Definition at line 109 of file if_urtw.c.

◆ URTW_RFSW_CTRL

#define URTW_RFSW_CTRL   0x272

◆ URTW_RIDX_CCK11

#define URTW_RIDX_CCK11   3

Definition at line 66 of file if_urtw.c.

◆ URTW_RIDX_CCK5

#define URTW_RIDX_CCK5   2

Definition at line 65 of file if_urtw.c.

◆ URTW_RIDX_OFDM24

#define URTW_RIDX_OFDM24   8

Definition at line 68 of file if_urtw.c.

◆ URTW_RIDX_OFDM6

#define URTW_RIDX_OFDM6   4

Definition at line 67 of file if_urtw.c.

◆ URTW_STATUS_TYPE_BEACON_INTR

#define URTW_STATUS_TYPE_BEACON_INTR   0

Definition at line 4113 of file if_urtw.c.

◆ URTW_STATUS_TYPE_TXCLOSE

#define URTW_STATUS_TYPE_TXCLOSE   1

Definition at line 4112 of file if_urtw.c.

◆ URTW_SYSCTL_STAT_ADD32

#define URTW_SYSCTL_STAT_ADD32 (   c,
  h,
  n,
  p,
 
)     SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d)

◆ urtw_write16_m

#define urtw_write16_m (   sc,
  val,
  data 
)
Value:
do { \
error = urtw_write16_c(sc, val, data); \
if (error != 0) \
goto fail; \
} while (0)
static usb_error_t urtw_write16_c(struct urtw_softc *, int, uint16_t)
Definition: if_urtw.c:2081

Definition at line 149 of file if_urtw.c.

◆ urtw_write32_m

#define urtw_write32_m (   sc,
  val,
  data 
)
Value:
do { \
error = urtw_write32_c(sc, val, data); \
if (error != 0) \
goto fail; \
} while (0)
static usb_error_t urtw_write32_c(struct urtw_softc *, int, uint32_t)
Definition: if_urtw.c:2097

Definition at line 159 of file if_urtw.c.

◆ urtw_write8_m

#define urtw_write8_m (   sc,
  val,
  data 
)
Value:
do { \
error = urtw_write8_c(sc, val, data); \
if (error != 0) \
goto fail; \
} while (0)
static usb_error_t urtw_write8_c(struct urtw_softc *, int, uint8_t)
Definition: if_urtw.c:2065

Definition at line 139 of file if_urtw.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ _urtw_getbuf()

static struct urtw_data * _urtw_getbuf ( struct urtw_softc sc)
static

Definition at line 4237 of file if_urtw.c.

References DPRINTF, next, urtw_data::sc, and urtw_softc::sc_tx_inactive.

Referenced by urtw_getbuf().

Here is the caller graph for this function:

◆ DRIVER_MODULE()

DRIVER_MODULE ( urtw  ,
uhub  ,
urtw_driver  ,
urtw_devclass  ,
NULL  ,
 
)

◆ MODULE_DEPEND() [1/2]

MODULE_DEPEND ( urtw  ,
usb  ,
,
,
 
)

◆ MODULE_DEPEND() [2/2]

MODULE_DEPEND ( urtw  ,
wlan  ,
,
,
 
)

◆ MODULE_VERSION()

MODULE_VERSION ( urtw  ,
 
)

◆ SYSCTL_INT()

SYSCTL_INT ( _hw_usb_urtw  ,
OID_AUTO  ,
preamble_mode  ,
CTLFLAG_RWTUN  ,
urtw_preamble_mode,
,
"set the preable mode (long or short)"   
)

◆ SYSCTL_NODE()

static SYSCTL_NODE ( _hw_usb  ,
OID_AUTO  ,
urtw  ,
CTLFLAG_RW|  CTLFLAG_MPSAFE,
,
"USB Realtek 8187L"   
)
static

◆ urtw_8180_set_anaparam()

static usb_error_t urtw_8180_set_anaparam ( struct urtw_softc sc,
uint32_t  val 
)
static

Definition at line 3469 of file if_urtw.c.

References data, error, fail, URTW_ANAPARAM, URTW_CONFIG3, URTW_CONFIG3_ANAPARAM_WRITE, URTW_EPROM_CMD_CONFIG, URTW_EPROM_CMD_NORMAL, urtw_read8_m, urtw_set_mode(), urtw_write32_m, urtw_write8_m, and val.

Referenced by urtw_8225_rf_init(), urtw_8225v2_rf_init(), and urtw_reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_8185_rf_pins_enable()

static usb_error_t urtw_8185_rf_pins_enable ( struct urtw_softc sc)
static

Definition at line 2585 of file if_urtw.c.

References error, fail, URTW_RF_PINS_ENABLE, and urtw_write16_m.

Referenced by urtw_8225_rf_init(), and urtw_8225v2_rf_init().

Here is the caller graph for this function:

◆ urtw_8185_set_anaparam2()

static usb_error_t urtw_8185_set_anaparam2 ( struct urtw_softc sc,
uint32_t  val 
)
static

Definition at line 3492 of file if_urtw.c.

References data, error, fail, URTW_ANAPARAM2, URTW_CONFIG3, URTW_CONFIG3_ANAPARAM_WRITE, URTW_EPROM_CMD_CONFIG, URTW_EPROM_CMD_NORMAL, urtw_read8_m, urtw_set_mode(), urtw_write32_m, urtw_write8_m, and val.

Referenced by urtw_8225_set_txpwrlvl(), urtw_8225v2_set_txpwrlvl(), and urtw_reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_8185_tx_antenna()

static usb_error_t urtw_8185_tx_antenna ( struct urtw_softc sc,
uint8_t  ant 
)
static

Definition at line 2595 of file if_urtw.c.

References error, fail, urtw_softc::sc_mtx, URTW_TX_ANTENNA, urtw_write8_m, and usb_pause_mtx().

Referenced by urtw_8225_rf_init(), and urtw_8225v2_rf_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_8187_write_phy()

static usb_error_t urtw_8187_write_phy ( struct urtw_softc sc,
uint8_t  addr,
uint32_t  data 
)
static

Definition at line 2622 of file if_urtw.c.

References addr, data, error, fail, urtw_softc::sc_mtx, URTW_PHY_MAGIC1, URTW_PHY_MAGIC2, URTW_PHY_MAGIC3, URTW_PHY_MAGIC4, urtw_write8_m, and usb_pause_mtx().

Referenced by urtw_8187_write_phy_cck_c(), and urtw_8187_write_phy_ofdm_c().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_8187_write_phy_cck_c()

static usb_error_t urtw_8187_write_phy_cck_c ( struct urtw_softc sc,
uint8_t  addr,
uint32_t  data 
)
static

Definition at line 2614 of file if_urtw.c.

References addr, data, and urtw_8187_write_phy().

Here is the call graph for this function:

◆ urtw_8187_write_phy_ofdm_c()

static usb_error_t urtw_8187_write_phy_ofdm_c ( struct urtw_softc sc,
uint8_t  addr,
uint32_t  data 
)
static

Definition at line 2606 of file if_urtw.c.

References addr, data, and urtw_8187_write_phy().

Here is the call graph for this function:

◆ urtw_8187b_cmd_reset()

static usb_error_t urtw_8187b_cmd_reset ( struct urtw_softc sc)
static

Definition at line 1286 of file if_urtw.c.

References error, fail, urtw_softc::sc_dev, urtw_softc::sc_mtx, URTW_CMD, URTW_CMD_RST, urtw_read8_m, urtw_write8_m, and usb_pause_mtx().

Referenced by urtw_adapter_start_b().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_8225_isv2()

◆ urtw_8225_read()

static usb_error_t urtw_8225_read ( struct urtw_softc sc,
uint8_t  addr,
uint32_t *  data 
)
static

◆ urtw_8225_rf_init()

◆ urtw_8225_rf_set_chan()

static usb_error_t urtw_8225_rf_set_chan ( struct urtw_softc sc,
int  chan 
)
static

Definition at line 2735 of file if_urtw.c.

References chan, error, fail, urtw_softc::sc_mtx, URTW_8225_ADDR_7_MAGIC, urtw_8225_channel, urtw_8225_set_txpwrlvl(), urtw_8225_write, and usb_pause_mtx().

Referenced by urtw_8225_rf_init(), urtw_8225v2_rf_init(), and urtw_get_rfchip().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_8225_rf_set_sens()

static usb_error_t urtw_8225_rf_set_sens ( struct urtw_softc sc,
int  sens 
)
static

Definition at line 2749 of file if_urtw.c.

References error, fail, urtw_8187_write_phy_cck, URTW_8225_ADDR_C_DATA_MAGIC1, URTW_8225_ADDR_C_DATA_MAGIC2, URTW_8225_ADDR_C_MAGIC, urtw_8225_setgain(), urtw_8225_threshold, and urtw_8225_write.

Referenced by urtw_get_rfchip().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_8225_rf_stop()

◆ urtw_8225_set_txpwrlvl()

◆ urtw_8225_setgain()

static usb_error_t urtw_8225_setgain ( struct urtw_softc sc,
int16_t  gain 
)
static

Definition at line 2638 of file if_urtw.c.

References error, fail, urtw_8187_write_phy_ofdm, and urtw_8225_gain.

Referenced by urtw_8225_rf_init(), and urtw_8225_rf_set_sens().

Here is the caller graph for this function:

◆ urtw_8225_usb_init()

static usb_error_t urtw_8225_usb_init ( struct urtw_softc sc)
static

Definition at line 2651 of file if_urtw.c.

References data, error, fail, urtw_softc::sc_mtx, URTW_GP_ENABLE, URTW_GPIO, urtw_read8e(), URTW_RF_PINS_ENABLE, URTW_RF_PINS_OUTPUT, URTW_RF_PINS_SELECT, urtw_write16_m, urtw_write8_m, urtw_write8e(), and usb_pause_mtx().

Referenced by urtw_8225_rf_init(), and urtw_8225v2_rf_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_8225_write_c()

static usb_error_t urtw_8225_write_c ( struct urtw_softc sc,
uint8_t  addr,
uint16_t  data 
)
static

◆ urtw_8225_write_s16()

static usb_error_t urtw_8225_write_s16 ( struct urtw_softc sc,
uint8_t  addr,
int  index,
uint16_t *  data 
)
static

Definition at line 2711 of file if_urtw.c.

References addr, data, error, index, req, URTW_8187_SETREGS_REQ, urtw_do_request(), USETW, and UT_WRITE_VENDOR_DEVICE.

Referenced by urtw_8225_write_c().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_8225v2_rf_init()

◆ urtw_8225v2_rf_set_chan()

static usb_error_t urtw_8225v2_rf_set_chan ( struct urtw_softc sc,
int  chan 
)
static

Definition at line 2986 of file if_urtw.c.

References chan, error, fail, urtw_softc::sc_mtx, URTW_8225_ADDR_7_MAGIC, urtw_8225_channel, urtw_8225_write, urtw_8225v2_set_txpwrlvl(), and usb_pause_mtx().

Referenced by urtw_get_rfchip().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_8225v2_set_txpwrlvl()

◆ urtw_8225v2_setgain()

static usb_error_t urtw_8225v2_setgain ( struct urtw_softc sc,
int16_t  gain 
)
static

Definition at line 3138 of file if_urtw.c.

References error, fail, urtw_softc::sc_mtx, urtw_8187_write_phy_ofdm, urtw_8225v2_gain_bg, and usb_pause_mtx().

Referenced by urtw_8225v2_rf_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_8225v2b_rf_init()

◆ urtw_8225v2b_rf_set_chan()

static usb_error_t urtw_8225v2b_rf_set_chan ( struct urtw_softc sc,
int  chan 
)
static

Definition at line 3356 of file if_urtw.c.

References chan, error, fail, urtw_softc::sc_mtx, URTW_8225_ADDR_7_MAGIC, urtw_8225_channel, urtw_8225_write, urtw_8225v2b_set_txpwrlvl(), and usb_pause_mtx().

Referenced by urtw_get_rfchip().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_8225v2b_set_txpwrlvl()

◆ urtw_abort_xfers()

static void urtw_abort_xfers ( struct urtw_softc sc)
static

Definition at line 1375 of file if_urtw.c.

References urtw_softc::sc_flags, urtw_softc::sc_xfer, URTW_8187B_N_XFERS, URTW_8187L_N_XFERS, URTW_ASSERT_LOCKED, URTW_RTL8187B, and usbd_transfer_stop().

Referenced by urtw_stop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_adapter_start()

◆ urtw_adapter_start_b()

◆ urtw_alloc_data_list()

static int urtw_alloc_data_list ( struct urtw_softc sc,
struct urtw_data  data[],
int  ndata,
int  maxsz,
void *  dma_buf 
)
static

Definition at line 1474 of file if_urtw.c.

References urtw_data::buf, data, error, fail, urtw_data::m, urtw_data::ni, urtw_data::sc, urtw_softc::sc_dev, and urtw_free_data_list().

Referenced by urtw_alloc_rx_data_list(), and urtw_alloc_tx_data_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_alloc_rx_data_list()

static int urtw_alloc_rx_data_list ( struct urtw_softc sc)
static

Definition at line 1506 of file if_urtw.c.

References error, next, urtw_data::sc, urtw_softc::sc_rx, urtw_softc::sc_rx_active, urtw_softc::sc_rx_inactive, urtw_alloc_data_list(), and URTW_RX_DATA_LIST_COUNT.

Referenced by urtw_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_alloc_tx_data_list()

static int urtw_alloc_tx_data_list ( struct urtw_softc sc)
static

Definition at line 1526 of file if_urtw.c.

References error, next, urtw_data::sc, urtw_softc::sc_tx, urtw_softc::sc_tx_active, urtw_softc::sc_tx_dma_buf, urtw_softc::sc_tx_inactive, urtw_softc::sc_tx_pending, urtw_alloc_data_list(), URTW_TX_DATA_LIST_COUNT, and URTW_TX_MAXSIZE.

Referenced by urtw_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_attach()

static int urtw_attach ( device_t  dev)
static

Definition at line 790 of file if_urtw.c.

References data, dev, usb_attach_arg::device, device_set_usb_desc(), error, fail, urtw_softc::sc_currate, urtw_softc::sc_debug, urtw_softc::sc_dev, urtw_softc::sc_epromtype, urtw_softc::sc_flags, urtw_softc::sc_ic, urtw_softc::sc_led_ch, urtw_softc::sc_led_task, urtw_softc::sc_mtx, urtw_softc::sc_preamble_mode, urtw_softc::sc_rts_retry, urtw_softc::sc_rxtap, urtw_softc::sc_snd, urtw_softc::sc_tx_dma_buf, urtw_softc::sc_tx_retry, urtw_softc::sc_txtap, urtw_softc::sc_udev, urtw_softc::sc_updateslot_task, urtw_softc::sc_watchdog_ch, urtw_softc::sc_xfer, URTW_8187B_BULK_TX_BE, URTW_8187B_N_XFERS, urtw_8187b_usbconfig, URTW_8187L_BULK_TX_LOW, URTW_8187L_N_XFERS, urtw_8187l_usbconfig, URTW_DEFAULT_RTS_RETRY, URTW_DEFAULT_TX_RETRY, URTW_EEPROM_93C46, URTW_EEPROM_93C56, urtw_get_macaddr(), urtw_get_rfchip(), urtw_get_txpwr(), urtw_getradiocaps(), URTW_IFACE_INDEX, urtw_led_init(), urtw_ledtask(), URTW_LOCK, urtw_parent(), urtw_preamble_mode, urtw_raw_xmit(), urtw_read32_m, URTW_REV_RTL8187B, URTW_RIDX_CCK11, URTW_RTL8187B, URTW_RX, URTW_RX_9356SEL, URTW_RX_RADIOTAP_PRESENT, urtw_scan_end(), urtw_scan_start(), urtw_set_channel(), urtw_sysctl_node(), urtw_transmit(), URTW_TX_RADIOTAP_PRESENT, URTW_UNLOCK, urtw_update_mcast(), urtw_update_promisc(), urtw_updateslot(), urtw_updateslottask(), urtw_vap_create(), urtw_vap_delete(), usb_callout_init_mtx, USB_GET_DRIVER_INFO, usbd_errstr(), usbd_transfer_setup(), usbd_transfer_unsetup(), usbd_xfer_get_frame_buffer(), urtw_rx_radiotap_header::wr_ihdr, and urtw_tx_radiotap_header::wt_ihdr.

Here is the call graph for this function:

◆ urtw_bulk_rx_callback()

◆ urtw_bulk_tx_callback()

◆ urtw_bulk_tx_status_callback()

static void urtw_bulk_tx_status_callback ( struct usb_xfer xfer,
usb_error_t  error 
)
static

◆ urtw_compute_txtime()

static int urtw_compute_txtime ( uint16_t  framelen,
uint16_t  rate,
uint8_t  ismgt,
uint8_t  isshort 
)
static

Definition at line 4294 of file if_urtw.c.

References urtw_isbmode(), and urtw_rate2dbps().

Referenced by urtw_tx_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_detach()

◆ urtw_do_request()

static usb_error_t urtw_do_request ( struct urtw_softc sc,
struct usb_device_request req,
void *  data 
)
static

Definition at line 1312 of file if_urtw.c.

References data, DPRINTF, req, urtw_softc::sc_mtx, urtw_softc::sc_udev, URTW_ASSERT_LOCKED, usb_pause_mtx(), usbd_do_request_flags(), and usbd_errstr().

Referenced by urtw_8225_write_s16(), urtw_read16_c(), urtw_read32_c(), urtw_read8_c(), urtw_read8e(), urtw_write16_c(), urtw_write32_c(), urtw_write8_c(), and urtw_write8e().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_eprom_ck()

static usb_error_t urtw_eprom_ck ( struct urtw_softc sc)
static

Definition at line 2231 of file if_urtw.c.

References data, error, fail, URTW_EPROM_CK, URTW_EPROM_CMD, URTW_EPROM_DELAY, urtw_read8_m, and urtw_write8_m.

Referenced by urtw_eprom_read32(), and urtw_eprom_sendbits().

Here is the caller graph for this function:

◆ urtw_eprom_cs()

static usb_error_t urtw_eprom_cs ( struct urtw_softc sc,
int  able 
)
static

Definition at line 2215 of file if_urtw.c.

References data, error, fail, URTW_EPROM_CMD, URTW_EPROM_CS, URTW_EPROM_DELAY, URTW_EPROM_ENABLE, urtw_read8_m, and urtw_write8_m.

Referenced by urtw_eprom_read32().

Here is the caller graph for this function:

◆ urtw_eprom_read32()

static usb_error_t urtw_eprom_read32 ( struct urtw_softc sc,
uint32_t  addr,
uint32_t *  data 
)
static

◆ urtw_eprom_readbit()

static usb_error_t urtw_eprom_readbit ( struct urtw_softc sc,
int16_t *  data 
)
static

Definition at line 2249 of file if_urtw.c.

References data, error, fail, URTW_EPROM_CMD, URTW_EPROM_DELAY, URTW_EPROM_READBIT, and urtw_read8_m.

Referenced by urtw_eprom_read32().

Here is the caller graph for this function:

◆ urtw_eprom_sendbits()

static usb_error_t urtw_eprom_sendbits ( struct urtw_softc sc,
int16_t *  buf,
int  buflen 
)
static

Definition at line 2279 of file if_urtw.c.

References error, fail, urtw_eprom_ck(), and urtw_eprom_writebit().

Referenced by urtw_eprom_read32().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_eprom_writebit()

static usb_error_t urtw_eprom_writebit ( struct urtw_softc sc,
int16_t  bit 
)
static

Definition at line 2263 of file if_urtw.c.

References data, error, fail, URTW_EPROM_CMD, URTW_EPROM_DELAY, URTW_EPROM_WRITEBIT, urtw_read8_m, and urtw_write8_m.

Referenced by urtw_eprom_read32(), and urtw_eprom_sendbits().

Here is the caller graph for this function:

◆ urtw_free_data_list()

static void urtw_free_data_list ( struct urtw_softc sc,
struct urtw_data  data[],
int  ndata,
int  fillmbuf 
)
static

Definition at line 992 of file if_urtw.c.

References urtw_data::buf, data, urtw_data::m, and urtw_data::ni.

Referenced by urtw_alloc_data_list(), urtw_free_rx_data_list(), and urtw_free_tx_data_list().

Here is the caller graph for this function:

◆ urtw_free_rx_data_list()

static void urtw_free_rx_data_list ( struct urtw_softc sc)
static

Definition at line 986 of file if_urtw.c.

References urtw_softc::sc_rx, urtw_free_data_list(), and URTW_RX_DATA_LIST_COUNT.

Referenced by urtw_detach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_free_tx_data_list()

static void urtw_free_tx_data_list ( struct urtw_softc sc)
static

Definition at line 980 of file if_urtw.c.

References urtw_softc::sc_tx, urtw_free_data_list(), and URTW_TX_DATA_LIST_COUNT.

Referenced by urtw_detach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_get_macaddr()

static usb_error_t urtw_get_macaddr ( struct urtw_softc sc)
static

Definition at line 2113 of file if_urtw.c.

References data, error, fail, urtw_softc::sc_ic, URTW_EPROM_MACADDR, and urtw_eprom_read32().

Referenced by urtw_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_get_rfchip()

◆ urtw_get_txpwr()

static usb_error_t urtw_get_txpwr ( struct urtw_softc sc)
static

◆ urtw_getbuf()

static struct urtw_data * urtw_getbuf ( struct urtw_softc sc)
static

Definition at line 4253 of file if_urtw.c.

References _urtw_getbuf(), DPRINTF, urtw_data::sc, and URTW_ASSERT_LOCKED.

Referenced by urtw_raw_xmit(), and urtw_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_getradiocaps()

static void urtw_getradiocaps ( struct ieee80211com *  ic,
int  maxchans,
int *  nchans,
struct ieee80211_channel  chans[] 
)
static

Definition at line 1594 of file if_urtw.c.

Referenced by urtw_attach().

Here is the caller graph for this function:

◆ urtw_init()

◆ urtw_intr_disable()

static usb_error_t urtw_intr_disable ( struct urtw_softc sc)
static

Definition at line 3525 of file if_urtw.c.

References error, fail, URTW_INTR_MASK, and urtw_write16_m.

Referenced by urtw_reset(), and urtw_stop().

Here is the caller graph for this function:

◆ urtw_intr_enable()

static usb_error_t urtw_intr_enable ( struct urtw_softc sc)
static

Definition at line 3515 of file if_urtw.c.

References error, fail, URTW_INTR_MASK, and urtw_write16_m.

Referenced by urtw_adapter_start(), and urtw_adapter_start_b().

Here is the caller graph for this function:

◆ urtw_isbmode()

static int urtw_isbmode ( uint16_t  rate)
static

Definition at line 4266 of file if_urtw.c.

Referenced by urtw_compute_txtime().

Here is the caller graph for this function:

◆ urtw_led_blink()

◆ urtw_led_ch()

static void urtw_led_ch ( void *  arg)
static

Definition at line 3749 of file if_urtw.c.

References urtw_softc::sc_ic, and urtw_softc::sc_led_task.

Referenced by urtw_led_blink(), and urtw_led_mode0().

Here is the caller graph for this function:

◆ urtw_led_ctl()

static usb_error_t urtw_led_ctl ( struct urtw_softc sc,
int  mode 
)
static

Definition at line 3590 of file if_urtw.c.

References DPRINTF, error, urtw_softc::sc_strategy, urtw_led_mode0(), urtw_led_mode1(), urtw_led_mode2(), urtw_led_mode3(), URTW_SW_LED_MODE0, URTW_SW_LED_MODE1, URTW_SW_LED_MODE2, URTW_SW_LED_MODE3, and USB_ERR_INVAL.

Referenced by urtw_adapter_start(), urtw_newstate(), and urtw_tx_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_led_init()

◆ urtw_led_mode0()

◆ urtw_led_mode1()

static usb_error_t urtw_led_mode1 ( struct urtw_softc sc,
int  mode 
)
static

Definition at line 3669 of file if_urtw.c.

References USB_ERR_INVAL.

Referenced by urtw_led_ctl().

Here is the caller graph for this function:

◆ urtw_led_mode2()

static usb_error_t urtw_led_mode2 ( struct urtw_softc sc,
int  mode 
)
static

Definition at line 3675 of file if_urtw.c.

References USB_ERR_INVAL.

Referenced by urtw_led_ctl().

Here is the caller graph for this function:

◆ urtw_led_mode3()

static usb_error_t urtw_led_mode3 ( struct urtw_softc sc,
int  mode 
)
static

Definition at line 3681 of file if_urtw.c.

References USB_ERR_INVAL.

Referenced by urtw_led_ctl().

Here is the caller graph for this function:

◆ urtw_led_off()

static usb_error_t urtw_led_off ( struct urtw_softc sc,
int  type 
)
static

◆ urtw_led_on()

static usb_error_t urtw_led_on ( struct urtw_softc sc,
int  type 
)
static

Definition at line 3687 of file if_urtw.c.

References DPRINTF, error, fail, urtw_softc::sc_gpio_ledon, urtw_softc::sc_gpio_ledpin, type, URTW_GP_ENABLE, URTW_GPIO, URTW_LED_GPIO, URTW_LED_PIN_GPIO0, urtw_write8_m, and USB_ERR_INVAL.

Referenced by urtw_led_blink(), and urtw_led_mode0().

Here is the caller graph for this function:

◆ urtw_ledtask()

static void urtw_ledtask ( void *  arg,
int  pending 
)
static

Definition at line 3758 of file if_urtw.c.

References DPRINTF, urtw_softc::sc_strategy, urtw_led_blink(), URTW_LOCK, URTW_SW_LED_MODE0, and URTW_UNLOCK.

Referenced by urtw_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_match()

static int urtw_match ( device_t  dev)
static

◆ urtw_newstate()

static int urtw_newstate ( struct ieee80211vap *  vap,
enum ieee80211_state  nstate,
int  arg 
)
static

◆ urtw_parent()

static void urtw_parent ( struct ieee80211com *  ic)
static

Definition at line 1390 of file if_urtw.c.

References urtw_softc::sc_flags, URTW_DETACHED, urtw_init(), URTW_LOCK, URTW_RUNNING, urtw_set_multi(), urtw_stop(), and URTW_UNLOCK.

Referenced by urtw_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_rate2dbps()

static uint16_t urtw_rate2dbps ( uint16_t  rate)
static

Definition at line 4274 of file if_urtw.c.

Referenced by urtw_compute_txtime().

Here is the caller graph for this function:

◆ urtw_raw_xmit()

static int urtw_raw_xmit ( struct ieee80211_node *  ni,
struct mbuf *  m,
const struct ieee80211_bpf_params *  params 
)
static

Definition at line 1548 of file if_urtw.c.

References urtw_data::m, next, urtw_data::ni, urtw_data::sc, urtw_softc::sc_flags, urtw_softc::sc_tx_inactive, urtw_softc::sc_txtimer, urtw_getbuf(), URTW_LOCK, URTW_PRIORITY_LOW, URTW_RUNNING, urtw_tx_start(), and URTW_UNLOCK.

Referenced by urtw_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_read16_c()

static usb_error_t urtw_read16_c ( struct urtw_softc sc,
int  val,
uint16_t *  data 
)
static

Definition at line 2029 of file if_urtw.c.

References data, error, req, URTW_8187_GETREGS_REQ, URTW_ASSERT_LOCKED, urtw_do_request(), USETW, UT_READ_VENDOR_DEVICE, and val.

Here is the call graph for this function:

◆ urtw_read32_c()

static usb_error_t urtw_read32_c ( struct urtw_softc sc,
int  val,
uint32_t *  data 
)
static

Definition at line 2047 of file if_urtw.c.

References data, error, req, URTW_8187_GETREGS_REQ, URTW_ASSERT_LOCKED, urtw_do_request(), USETW, UT_READ_VENDOR_DEVICE, and val.

Here is the call graph for this function:

◆ urtw_read8_c()

static usb_error_t urtw_read8_c ( struct urtw_softc sc,
int  val,
uint8_t *  data 
)
static

Definition at line 2011 of file if_urtw.c.

References data, error, req, URTW_8187_GETREGS_REQ, URTW_ASSERT_LOCKED, urtw_do_request(), USETW, UT_READ_VENDOR_DEVICE, and val.

Here is the call graph for this function:

◆ urtw_read8e()

static usb_error_t urtw_read8e ( struct urtw_softc sc,
int  val,
uint8_t *  data 
)
static

Definition at line 3439 of file if_urtw.c.

References data, error, req, URTW_8187_GETREGS_REQ, urtw_do_request(), USETW, UT_READ_VENDOR_DEVICE, and val.

Referenced by urtw_8225_usb_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_reset()

static usb_error_t urtw_reset ( struct urtw_softc sc)
static

◆ urtw_rtl2rate()

static uint16_t urtw_rtl2rate ( uint32_t  rate)
static

Definition at line 1959 of file if_urtw.c.

References urtw_pair::reg, urtw_ratetable, and val.

Referenced by urtw_tx_start().

Here is the caller graph for this function:

◆ urtw_rx_enable()

static usb_error_t urtw_rx_enable ( struct urtw_softc sc)
static

Definition at line 3823 of file if_urtw.c.

References data, error, fail, urtw_softc::sc_flags, urtw_softc::sc_xfer, URTW_8187B_BULK_RX, URTW_8187L_BULK_RX, URTW_CMD, URTW_CMD_RX_ENABLE, urtw_read8_m, URTW_RTL8187B, urtw_rx_setconf(), urtw_write8_m, and usbd_transfer_start().

Referenced by urtw_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_rx_setconf()

◆ urtw_rxeof()

◆ urtw_scan_end()

static void urtw_scan_end ( struct ieee80211com *  ic)
static

Definition at line 1587 of file if_urtw.c.

Referenced by urtw_attach().

Here is the caller graph for this function:

◆ urtw_scan_start()

static void urtw_scan_start ( struct ieee80211com *  ic)
static

Definition at line 1580 of file if_urtw.c.

Referenced by urtw_attach().

Here is the caller graph for this function:

◆ urtw_set_channel()

static void urtw_set_channel ( struct ieee80211com *  ic)
static

◆ urtw_set_macaddr()

static usb_error_t urtw_set_macaddr ( struct urtw_softc sc,
const uint8_t *  macaddr 
)
static

Definition at line 1192 of file if_urtw.c.

References error, fail, URTW_MAC0, URTW_MAC4, urtw_write16_m, and urtw_write32_m.

Referenced by urtw_8225v2b_rf_init(), and urtw_adapter_start().

Here is the caller graph for this function:

◆ urtw_set_mode()

◆ urtw_set_multi()

static void urtw_set_multi ( void *  arg)
static

Definition at line 1927 of file if_urtw.c.

Referenced by urtw_parent().

Here is the caller graph for this function:

◆ urtw_set_rate()

static usb_error_t urtw_set_rate ( struct urtw_softc sc)
static

Definition at line 1933 of file if_urtw.c.

References data, error, fail, URTW_BRSR, urtw_read16_m, URTW_RESP_MAX_RATE_SHIFT, URTW_RESP_MIN_RATE_SHIFT, URTW_RESP_RATE, URTW_RIDX_OFDM24, URTW_RIDX_OFDM6, urtw_write16_m, and urtw_write8_m.

Referenced by urtw_adapter_start().

Here is the caller graph for this function:

◆ urtw_start()

static void urtw_start ( struct urtw_softc sc)
static

Definition at line 1439 of file if_urtw.c.

References next, urtw_softc::sc_flags, urtw_softc::sc_snd, urtw_softc::sc_tx_inactive, urtw_softc::sc_txtimer, urtw_softc::sc_watchdog_ch, URTW_ASSERT_LOCKED, urtw_getbuf(), URTW_PRIORITY_NORMAL, URTW_RUNNING, urtw_tx_start(), and urtw_watchdog().

Referenced by urtw_bulk_tx_callback(), and urtw_transmit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_stop()

◆ urtw_sysctl_node()

static void urtw_sysctl_node ( struct urtw_softc sc)
static

Definition at line 4371 of file if_urtw.c.

References child, urtw_softc::sc_dev, urtw_softc::sc_stats, urtw_stats::txrates, and URTW_SYSCTL_STAT_ADD32.

Referenced by urtw_attach().

Here is the caller graph for this function:

◆ urtw_transmit()

static int urtw_transmit ( struct ieee80211com *  ic,
struct mbuf *  m 
)
static

Definition at line 1417 of file if_urtw.c.

References error, urtw_softc::sc_flags, urtw_softc::sc_snd, URTW_LOCK, URTW_RUNNING, urtw_start(), and URTW_UNLOCK.

Referenced by urtw_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_tx_enable()

◆ urtw_tx_start()

◆ urtw_txeof()

static void urtw_txeof ( struct usb_xfer xfer,
struct urtw_data data 
)
static

Definition at line 4170 of file if_urtw.c.

References data, urtw_softc::sc_txtimer, URTW_ASSERT_LOCKED, and usbd_xfer_softc().

Referenced by urtw_bulk_tx_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_txstatus_eof()

static void urtw_txstatus_eof ( struct usb_xfer xfer)
static

Definition at line 4116 of file if_urtw.c.

References DPRINTF, urtw_softc::sc_ic, urtw_softc::sc_txstatus, type, URTW_STATUS_TYPE_TXCLOSE, URTW_TX_MAXRETRY, usbd_xfer_softc(), usbd_xfer_status(), and val.

Referenced by urtw_bulk_tx_status_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_update_mcast()

static void urtw_update_mcast ( struct ieee80211com *  ic)
static

Definition at line 1666 of file if_urtw.c.

Referenced by urtw_attach().

Here is the caller graph for this function:

◆ urtw_update_msr()

◆ urtw_update_promisc()

static void urtw_update_promisc ( struct ieee80211com *  ic)
static

Definition at line 1655 of file if_urtw.c.

References urtw_softc::sc_flags, URTW_LOCK, URTW_RUNNING, urtw_rx_setconf(), and URTW_UNLOCK.

Referenced by urtw_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_updateslot()

static void urtw_updateslot ( struct ieee80211com *  ic)
static

Definition at line 4322 of file if_urtw.c.

References urtw_softc::sc_updateslot_task.

Referenced by urtw_attach().

Here is the caller graph for this function:

◆ urtw_updateslottask()

static void urtw_updateslottask ( void *  arg,
int  pending 
)
static

◆ urtw_vap_create()

static struct ieee80211vap * urtw_vap_create ( struct ieee80211com *  ic,
const char  name[IFNAMSIZ],
int  unit,
enum ieee80211_opmode  opmode,
int  flags,
const uint8_t  bssid[IEEE80211_ADDR_LEN],
const uint8_t  mac[IEEE80211_ADDR_LEN] 
)
static

Definition at line 1017 of file if_urtw.c.

References name, urtw_vap::newstate, urtw_newstate(), and urtw_vap::vap.

Referenced by urtw_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_vap_delete()

static void urtw_vap_delete ( struct ieee80211vap *  vap)
static

Definition at line 1050 of file if_urtw.c.

References URTW_VAP, and urtw_vap::vap.

Referenced by urtw_attach().

Here is the caller graph for this function:

◆ urtw_watchdog()

static void urtw_watchdog ( void *  arg)
static

Definition at line 1910 of file if_urtw.c.

References urtw_softc::sc_dev, urtw_softc::sc_ic, urtw_softc::sc_txtimer, urtw_softc::sc_watchdog_ch, and urtw_watchdog().

Referenced by urtw_init(), urtw_start(), and urtw_watchdog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urtw_write16_c()

static usb_error_t urtw_write16_c ( struct urtw_softc sc,
int  val,
uint16_t  data 
)
static

Definition at line 2081 of file if_urtw.c.

References data, req, URTW_8187_SETREGS_REQ, URTW_ASSERT_LOCKED, urtw_do_request(), USETW, UT_WRITE_VENDOR_DEVICE, and val.

Here is the call graph for this function:

◆ urtw_write32_c()

static usb_error_t urtw_write32_c ( struct urtw_softc sc,
int  val,
uint32_t  data 
)
static

Definition at line 2097 of file if_urtw.c.

References data, req, URTW_8187_SETREGS_REQ, URTW_ASSERT_LOCKED, urtw_do_request(), USETW, UT_WRITE_VENDOR_DEVICE, and val.

Here is the call graph for this function:

◆ urtw_write8_c()

static usb_error_t urtw_write8_c ( struct urtw_softc sc,
int  val,
uint8_t  data 
)
static

Definition at line 2065 of file if_urtw.c.

References data, req, URTW_8187_SETREGS_REQ, URTW_ASSERT_LOCKED, urtw_do_request(), USETW, UT_WRITE_VENDOR_DEVICE, and val.

Here is the call graph for this function:

◆ urtw_write8e()

static usb_error_t urtw_write8e ( struct urtw_softc sc,
int  val,
uint8_t  data 
)
static

Definition at line 3455 of file if_urtw.c.

References data, req, URTW_8187_SETREGS_REQ, urtw_do_request(), USETW, UT_WRITE_VENDOR_DEVICE, and val.

Referenced by urtw_8225_usb_init(), urtw_adapter_start_b(), and urtw_reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ USB_PNP_HOST_INFO()

USB_PNP_HOST_INFO ( urtw_devs  )

Variable Documentation

◆ urtw_8187b_usbconfig

const struct usb_config urtw_8187b_usbconfig[URTW_8187B_N_XFERS]
static

Definition at line 525 of file if_urtw.c.

Referenced by urtw_attach().

◆ urtw_8187l_usbconfig

const struct usb_config urtw_8187l_usbconfig[URTW_8187L_N_XFERS]
static

Definition at line 615 of file if_urtw.c.

Referenced by urtw_attach().

◆ urtw_8225_agc

uint8_t urtw_8225_agc[]
static
Initial value:
= {
0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9d, 0x9c, 0x9b,
0x9a, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93, 0x92, 0x91, 0x90,
0x8f, 0x8e, 0x8d, 0x8c, 0x8b, 0x8a, 0x89, 0x88, 0x87, 0x86, 0x85,
0x84, 0x83, 0x82, 0x81, 0x80, 0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a,
0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x2f,
0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24,
0x23, 0x22, 0x21, 0x20, 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19,
0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0f, 0x0e,
0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03,
0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01
}

Definition at line 185 of file if_urtw.c.

Referenced by urtw_8225_rf_init(), and urtw_8225v2_rf_init().

◆ urtw_8225_channel

uint32_t urtw_8225_channel[]
static
Initial value:
= {
0x0000,
0x085c,
0x08dc,
0x095c,
0x09dc,
0x0a5c,
0x0adc,
0x0b5c,
0x0bdc,
0x0c5c,
0x0cdc,
0x0d5c,
0x0ddc,
0x0e5c,
0x0f72,
}

Definition at line 215 of file if_urtw.c.

Referenced by urtw_8225_rf_set_chan(), urtw_8225v2_rf_set_chan(), and urtw_8225v2b_rf_set_chan().

◆ urtw_8225_gain

uint8_t urtw_8225_gain[]
static
Initial value:
= {
0x23, 0x88, 0x7c, 0xa5,
0x23, 0x88, 0x7c, 0xb5,
0x23, 0x88, 0x7c, 0xc5,
0x33, 0x80, 0x79, 0xc5,
0x43, 0x78, 0x76, 0xc5,
0x53, 0x60, 0x73, 0xc5,
0x63, 0x58, 0x70, 0xc5,
}

Definition at line 233 of file if_urtw.c.

Referenced by urtw_8225_setgain().

◆ urtw_8225_rf_part1

struct urtw_pair urtw_8225_rf_part1[]
static
Initial value:
= {
{ 0x00, 0x0067 }, { 0x01, 0x0fe0 }, { 0x02, 0x044d }, { 0x03, 0x0441 },
{ 0x04, 0x0486 }, { 0x05, 0x0bc0 }, { 0x06, 0x0ae6 }, { 0x07, 0x082a },
{ 0x08, 0x001f }, { 0x09, 0x0334 }, { 0x0a, 0x0fd4 }, { 0x0b, 0x0391 },
{ 0x0c, 0x0050 }, { 0x0d, 0x06db }, { 0x0e, 0x0029 }, { 0x0f, 0x0914 },
}

Definition at line 243 of file if_urtw.c.

Referenced by urtw_8225_rf_init().

◆ urtw_8225_rf_part2

struct urtw_pair urtw_8225_rf_part2[]
static
Initial value:
= {
{ 0x00, 0x01 }, { 0x01, 0x02 }, { 0x02, 0x42 }, { 0x03, 0x00 },
{ 0x04, 0x00 }, { 0x05, 0x00 }, { 0x06, 0x40 }, { 0x07, 0x00 },
{ 0x08, 0x40 }, { 0x09, 0xfe }, { 0x0a, 0x09 }, { 0x0b, 0x80 },
{ 0x0c, 0x01 }, { 0x0e, 0xd3 }, { 0x0f, 0x38 }, { 0x10, 0x84 },
{ 0x11, 0x06 }, { 0x12, 0x20 }, { 0x13, 0x20 }, { 0x14, 0x00 },
{ 0x15, 0x40 }, { 0x16, 0x00 }, { 0x17, 0x40 }, { 0x18, 0xef },
{ 0x19, 0x19 }, { 0x1a, 0x20 }, { 0x1b, 0x76 }, { 0x1c, 0x04 },
{ 0x1e, 0x95 }, { 0x1f, 0x75 }, { 0x20, 0x1f }, { 0x21, 0x27 },
{ 0x22, 0x16 }, { 0x24, 0x46 }, { 0x25, 0x20 }, { 0x26, 0x90 },
{ 0x27, 0x88 }
}

Definition at line 250 of file if_urtw.c.

Referenced by urtw_8225_rf_init().

◆ urtw_8225_rf_part3

struct urtw_pair urtw_8225_rf_part3[]
static
Initial value:
= {
{ 0x00, 0x98 }, { 0x03, 0x20 }, { 0x04, 0x7e }, { 0x05, 0x12 },
{ 0x06, 0xfc }, { 0x07, 0x78 }, { 0x08, 0x2e }, { 0x10, 0x9b },
{ 0x11, 0x88 }, { 0x12, 0x47 }, { 0x13, 0xd0 }, { 0x19, 0x00 },
{ 0x1a, 0xa0 }, { 0x1b, 0x08 }, { 0x40, 0x86 }, { 0x41, 0x8d },
{ 0x42, 0x15 }, { 0x43, 0x18 }, { 0x44, 0x1f }, { 0x45, 0x1e },
{ 0x46, 0x1a }, { 0x47, 0x15 }, { 0x48, 0x10 }, { 0x49, 0x0a },
{ 0x4a, 0x05 }, { 0x4b, 0x02 }, { 0x4c, 0x05 }
}

Definition at line 263 of file if_urtw.c.

Referenced by urtw_8225_rf_init().

◆ urtw_8225_rxgain

uint16_t urtw_8225_rxgain[]
static
Initial value:
= {
0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0408, 0x0409,
0x040a, 0x040b, 0x0502, 0x0503, 0x0504, 0x0505, 0x0540, 0x0541,
0x0542, 0x0543, 0x0544, 0x0545, 0x0580, 0x0581, 0x0582, 0x0583,
0x0584, 0x0585, 0x0588, 0x0589, 0x058a, 0x058b, 0x0643, 0x0644,
0x0645, 0x0680, 0x0681, 0x0682, 0x0683, 0x0684, 0x0685, 0x0688,
0x0689, 0x068a, 0x068b, 0x068c, 0x0742, 0x0743, 0x0744, 0x0745,
0x0780, 0x0781, 0x0782, 0x0783, 0x0784, 0x0785, 0x0788, 0x0789,
0x078a, 0x078b, 0x078c, 0x078d, 0x0790, 0x0791, 0x0792, 0x0793,
0x0794, 0x0795, 0x0798, 0x0799, 0x079a, 0x079b, 0x079c, 0x079d,
0x07a0, 0x07a1, 0x07a2, 0x07a3, 0x07a4, 0x07a5, 0x07a8, 0x07a9,
0x07aa, 0x07ab, 0x07ac, 0x07ad, 0x07b0, 0x07b1, 0x07b2, 0x07b3,
0x07b4, 0x07b5, 0x07b8, 0x07b9, 0x07ba, 0x07bb, 0x07bb
}

Definition at line 273 of file if_urtw.c.

Referenced by urtw_8225_rf_init().

◆ urtw_8225_threshold

uint8_t urtw_8225_threshold[]
static
Initial value:
= {
0x8d, 0x8d, 0x8d, 0x8d, 0x9d, 0xad, 0xbd,
}

Definition at line 288 of file if_urtw.c.

Referenced by urtw_8225_rf_set_sens().

◆ urtw_8225_tx_gain_cck_ofdm

uint8_t urtw_8225_tx_gain_cck_ofdm[]
static
Initial value:
= {
0x02, 0x06, 0x0e, 0x1e, 0x3e, 0x7e
}

Definition at line 292 of file if_urtw.c.

Referenced by urtw_8225_set_txpwrlvl().

◆ urtw_8225_txpwr_cck

uint8_t urtw_8225_txpwr_cck[]
static
Initial value:
= {
0x18, 0x17, 0x15, 0x11, 0x0c, 0x08, 0x04, 0x02,
0x1b, 0x1a, 0x17, 0x13, 0x0e, 0x09, 0x04, 0x02,
0x1f, 0x1e, 0x1a, 0x15, 0x10, 0x0a, 0x05, 0x02,
0x22, 0x21, 0x1d, 0x18, 0x11, 0x0b, 0x06, 0x02,
0x26, 0x25, 0x21, 0x1b, 0x14, 0x0d, 0x06, 0x03,
0x2b, 0x2a, 0x25, 0x1e, 0x16, 0x0e, 0x07, 0x03
}

Definition at line 296 of file if_urtw.c.

Referenced by urtw_8225_set_txpwrlvl().

◆ urtw_8225_txpwr_cck_ch14

uint8_t urtw_8225_txpwr_cck_ch14[]
static
Initial value:
= {
0x18, 0x17, 0x15, 0x0c, 0x00, 0x00, 0x00, 0x00,
0x1b, 0x1a, 0x17, 0x0e, 0x00, 0x00, 0x00, 0x00,
0x1f, 0x1e, 0x1a, 0x0f, 0x00, 0x00, 0x00, 0x00,
0x22, 0x21, 0x1d, 0x11, 0x00, 0x00, 0x00, 0x00,
0x26, 0x25, 0x21, 0x13, 0x00, 0x00, 0x00, 0x00,
0x2b, 0x2a, 0x25, 0x15, 0x00, 0x00, 0x00, 0x00
}

Definition at line 305 of file if_urtw.c.

Referenced by urtw_8225_set_txpwrlvl().

◆ urtw_8225_txpwr_ofdm

uint8_t urtw_8225_txpwr_ofdm[]
static
Initial value:
={
0x80, 0x90, 0xa2, 0xb5, 0xcb, 0xe4
}

Definition at line 314 of file if_urtw.c.

Referenced by urtw_8225_set_txpwrlvl().

◆ urtw_8225v2_gain_bg

uint8_t urtw_8225v2_gain_bg[]
static
Initial value:
={
0x23, 0x15, 0xa5,
0x23, 0x15, 0xb5,
0x23, 0x15, 0xc5,
0x33, 0x15, 0xc5,
0x43, 0x15, 0xc5,
0x53, 0x15, 0xc5,
0x63, 0x15, 0xc5,
}

Definition at line 318 of file if_urtw.c.

Referenced by urtw_8225v2_setgain().

◆ urtw_8225v2_rf_part1

struct urtw_pair urtw_8225v2_rf_part1[]
static
Initial value:
= {
{ 0x00, 0x02bf }, { 0x01, 0x0ee0 }, { 0x02, 0x044d }, { 0x03, 0x0441 },
{ 0x04, 0x08c3 }, { 0x05, 0x0c72 }, { 0x06, 0x00e6 }, { 0x07, 0x082a },
{ 0x08, 0x003f }, { 0x09, 0x0335 }, { 0x0a, 0x09d4 }, { 0x0b, 0x07bb },
{ 0x0c, 0x0850 }, { 0x0d, 0x0cdf }, { 0x0e, 0x002b }, { 0x0f, 0x0114 }
}

Definition at line 328 of file if_urtw.c.

Referenced by urtw_8225v2_rf_init().

◆ urtw_8225v2_rf_part2

struct urtw_pair urtw_8225v2_rf_part2[]
static
Initial value:
= {
{ 0x00, 0x01 }, { 0x01, 0x02 }, { 0x02, 0x42 }, { 0x03, 0x00 },
{ 0x04, 0x00 }, { 0x05, 0x00 }, { 0x06, 0x40 }, { 0x07, 0x00 },
{ 0x08, 0x40 }, { 0x09, 0xfe }, { 0x0a, 0x08 }, { 0x0b, 0x80 },
{ 0x0c, 0x01 }, { 0x0d, 0x43 }, { 0x0e, 0xd3 }, { 0x0f, 0x38 },
{ 0x10, 0x84 }, { 0x11, 0x07 }, { 0x12, 0x20 }, { 0x13, 0x20 },
{ 0x14, 0x00 }, { 0x15, 0x40 }, { 0x16, 0x00 }, { 0x17, 0x40 },
{ 0x18, 0xef }, { 0x19, 0x19 }, { 0x1a, 0x20 }, { 0x1b, 0x15 },
{ 0x1c, 0x04 }, { 0x1d, 0xc5 }, { 0x1e, 0x95 }, { 0x1f, 0x75 },
{ 0x20, 0x1f }, { 0x21, 0x17 }, { 0x22, 0x16 }, { 0x23, 0x80 },
{ 0x24, 0x46 }, { 0x25, 0x00 }, { 0x26, 0x90 }, { 0x27, 0x88 }
}

Definition at line 376 of file if_urtw.c.

Referenced by urtw_8225v2_rf_init().

◆ urtw_8225v2_rf_part3

struct urtw_pair urtw_8225v2_rf_part3[]
static
Initial value:
= {
{ 0x00, 0x98 }, { 0x03, 0x20 }, { 0x04, 0x7e }, { 0x05, 0x12 },
{ 0x06, 0xfc }, { 0x07, 0x78 }, { 0x08, 0x2e }, { 0x09, 0x11 },
{ 0x0a, 0x17 }, { 0x0b, 0x11 }, { 0x10, 0x9b }, { 0x11, 0x88 },
{ 0x12, 0x47 }, { 0x13, 0xd0 }, { 0x19, 0x00 }, { 0x1a, 0xa0 },
{ 0x1b, 0x08 }, { 0x1d, 0x00 }, { 0x40, 0x86 }, { 0x41, 0x9d },
{ 0x42, 0x15 }, { 0x43, 0x18 }, { 0x44, 0x36 }, { 0x45, 0x35 },
{ 0x46, 0x2e }, { 0x47, 0x25 }, { 0x48, 0x1c }, { 0x49, 0x12 },
{ 0x4a, 0x09 }, { 0x4b, 0x04 }, { 0x4c, 0x05 }
}

Definition at line 407 of file if_urtw.c.

Referenced by urtw_8225v2_rf_init().

◆ urtw_8225v2_rxgain

uint16_t urtw_8225v2_rxgain[]
static
Initial value:
= {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0008, 0x0009,
0x000a, 0x000b, 0x0102, 0x0103, 0x0104, 0x0105, 0x0140, 0x0141,
0x0142, 0x0143, 0x0144, 0x0145, 0x0180, 0x0181, 0x0182, 0x0183,
0x0184, 0x0185, 0x0188, 0x0189, 0x018a, 0x018b, 0x0243, 0x0244,
0x0245, 0x0280, 0x0281, 0x0282, 0x0283, 0x0284, 0x0285, 0x0288,
0x0289, 0x028a, 0x028b, 0x028c, 0x0342, 0x0343, 0x0344, 0x0345,
0x0380, 0x0381, 0x0382, 0x0383, 0x0384, 0x0385, 0x0388, 0x0389,
0x038a, 0x038b, 0x038c, 0x038d, 0x0390, 0x0391, 0x0392, 0x0393,
0x0394, 0x0395, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d,
0x03a0, 0x03a1, 0x03a2, 0x03a3, 0x03a4, 0x03a5, 0x03a8, 0x03a9,
0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03b0, 0x03b1, 0x03b2, 0x03b3,
0x03b4, 0x03b5, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bb
}

Definition at line 418 of file if_urtw.c.

Referenced by urtw_8225v2_rf_init().

◆ urtw_8225v2_tx_gain_cck_ofdm

uint8_t urtw_8225v2_tx_gain_cck_ofdm[]
static
Initial value:
= {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11,
0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23,
}

Definition at line 448 of file if_urtw.c.

Referenced by urtw_8225v2_set_txpwrlvl(), and urtw_8225v2b_set_txpwrlvl().

◆ urtw_8225v2_txpwr_cck

uint8_t urtw_8225v2_txpwr_cck[]
static
Initial value:
= {
0x36, 0x35, 0x2e, 0x25, 0x1c, 0x12, 0x09, 0x04
}

Definition at line 457 of file if_urtw.c.

Referenced by urtw_8225v2_set_txpwrlvl().

◆ urtw_8225v2_txpwr_cck_ch14

uint8_t urtw_8225v2_txpwr_cck_ch14[]
static
Initial value:
= {
0x36, 0x35, 0x2e, 0x1b, 0x00, 0x00, 0x00, 0x00
}

Definition at line 461 of file if_urtw.c.

Referenced by urtw_8225v2_set_txpwrlvl().

◆ urtw_8225v2b_rf_part0

struct urtw_pair urtw_8225v2b_rf_part0[]
static
Initial value:
= {
{ 0x00, 0x00b7 }, { 0x01, 0x0ee0 }, { 0x02, 0x044d }, { 0x03, 0x0441 },
{ 0x04, 0x08c3 }, { 0x05, 0x0c72 }, { 0x06, 0x00e6 }, { 0x07, 0x082a },
{ 0x08, 0x003f }, { 0x09, 0x0335 }, { 0x0a, 0x09d4 }, { 0x0b, 0x07bb },
{ 0x0c, 0x0850 }, { 0x0d, 0x0cdf }, { 0x0e, 0x002b }, { 0x0f, 0x0114 }
}

Definition at line 335 of file if_urtw.c.

Referenced by urtw_8225v2b_rf_init().

◆ urtw_8225v2b_rf_part1

struct urtw_pair urtw_8225v2b_rf_part1[]
static

Definition at line 342 of file if_urtw.c.

Referenced by urtw_8225v2b_rf_init().

◆ urtw_8225v2b_rf_part2

struct urtw_pair urtw_8225v2b_rf_part2[]
static
Initial value:
= {
{ 0x00, 0x10 }, { 0x01, 0x0d }, { 0x02, 0x01 }, { 0x03, 0x00 },
{ 0x04, 0x14 }, { 0x05, 0xfb }, { 0x06, 0xfb }, { 0x07, 0x60 },
{ 0x08, 0x00 }, { 0x09, 0x60 }, { 0x0a, 0x00 }, { 0x0b, 0x00 },
{ 0x0c, 0x00 }, { 0x0d, 0x5c }, { 0x0e, 0x00 }, { 0x0f, 0x00 },
{ 0x10, 0x40 }, { 0x11, 0x00 }, { 0x12, 0x40 }, { 0x13, 0x00 },
{ 0x14, 0x00 }, { 0x15, 0x00 }, { 0x16, 0xa8 }, { 0x17, 0x26 },
{ 0x18, 0x32 }, { 0x19, 0x33 }, { 0x1a, 0x07 }, { 0x1b, 0xa5 },
{ 0x1c, 0x6f }, { 0x1d, 0x55 }, { 0x1e, 0xc8 }, { 0x1f, 0xb3 },
{ 0x20, 0x0a }, { 0x21, 0xe1 }, { 0x22, 0x2C }, { 0x23, 0x8a },
{ 0x24, 0x86 }, { 0x25, 0x83 }, { 0x26, 0x34 }, { 0x27, 0x0f },
{ 0x28, 0x4f }, { 0x29, 0x24 }, { 0x2a, 0x6f }, { 0x2b, 0xc2 },
{ 0x2c, 0x6b }, { 0x2d, 0x40 }, { 0x2e, 0x80 }, { 0x2f, 0x00 },
{ 0x30, 0xc0 }, { 0x31, 0xc1 }, { 0x32, 0x58 }, { 0x33, 0xf1 },
{ 0x34, 0x00 }, { 0x35, 0xe4 }, { 0x36, 0x90 }, { 0x37, 0x3e },
{ 0x38, 0x6d }, { 0x39, 0x3c }, { 0x3a, 0xfb }, { 0x3b, 0x07 }
}

Definition at line 389 of file if_urtw.c.

Referenced by urtw_8225v2b_rf_init().

◆ urtw_8225v2b_rxgain

uint16_t urtw_8225v2b_rxgain[]
static
Initial value:
= {
0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0408, 0x0409,
0x040a, 0x040b, 0x0502, 0x0503, 0x0504, 0x0505, 0x0540, 0x0541,
0x0542, 0x0543, 0x0544, 0x0545, 0x0580, 0x0581, 0x0582, 0x0583,
0x0584, 0x0585, 0x0588, 0x0589, 0x058a, 0x058b, 0x0643, 0x0644,
0x0645, 0x0680, 0x0681, 0x0682, 0x0683, 0x0684, 0x0685, 0x0688,
0x0689, 0x068a, 0x068b, 0x068c, 0x0742, 0x0743, 0x0744, 0x0745,
0x0780, 0x0781, 0x0782, 0x0783, 0x0784, 0x0785, 0x0788, 0x0789,
0x078a, 0x078b, 0x078c, 0x078d, 0x0790, 0x0791, 0x0792, 0x0793,
0x0794, 0x0795, 0x0798, 0x0799, 0x079a, 0x079b, 0x079c, 0x079d,
0x07a0, 0x07a1, 0x07a2, 0x07a3, 0x07a4, 0x07a5, 0x07a8, 0x07a9,
0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03b0, 0x03b1, 0x03b2, 0x03b3,
0x03b4, 0x03b5, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bb
}

Definition at line 433 of file if_urtw.c.

Referenced by urtw_8225v2b_rf_init().

◆ urtw_8225v2b_txpwr_cck

uint8_t urtw_8225v2b_txpwr_cck[]
static
Initial value:
= {
0x36, 0x35, 0x2e, 0x25, 0x1c, 0x12, 0x09, 0x04,
0x30, 0x2f, 0x29, 0x21, 0x19, 0x10, 0x08, 0x03,
0x2b, 0x2a, 0x25, 0x1e, 0x16, 0x0e, 0x07, 0x03,
0x26, 0x25, 0x21, 0x1b, 0x14, 0x0d, 0x06, 0x03
}

Definition at line 465 of file if_urtw.c.

Referenced by urtw_8225v2b_set_txpwrlvl().

◆ urtw_8225v2b_txpwr_cck_ch14

uint8_t urtw_8225v2b_txpwr_cck_ch14[]
static
Initial value:
= {
0x36, 0x35, 0x2e, 0x1b, 0x00, 0x00, 0x00, 0x00,
0x30, 0x2f, 0x29, 0x15, 0x00, 0x00, 0x00, 0x00,
0x30, 0x2f, 0x29, 0x15, 0x00, 0x00, 0x00, 0x00,
0x30, 0x2f, 0x29, 0x15, 0x00, 0x00, 0x00, 0x00
}

Definition at line 472 of file if_urtw.c.

Referenced by urtw_8225v2b_set_txpwrlvl().

◆ urtw_8225z2_agc

uint8_t urtw_8225z2_agc[]
static
Initial value:
= {
0x5e, 0x5e, 0x5e, 0x5e, 0x5d, 0x5b, 0x59, 0x57, 0x55, 0x53, 0x51,
0x4f, 0x4d, 0x4b, 0x49, 0x47, 0x45, 0x43, 0x41, 0x3f, 0x3d, 0x3b,
0x39, 0x37, 0x35, 0x33, 0x31, 0x2f, 0x2d, 0x2b, 0x29, 0x27, 0x25,
0x23, 0x21, 0x1f, 0x1d, 0x1b, 0x19, 0x17, 0x15, 0x13, 0x11, 0x0f,
0x0d, 0x0b, 0x09, 0x07, 0x05, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x19, 0x19,
0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x20, 0x21, 0x22, 0x23,
0x24, 0x25, 0x26, 0x26, 0x27, 0x27, 0x28, 0x28, 0x29, 0x2a, 0x2a,
0x2a, 0x2b, 0x2b, 0x2b, 0x2c, 0x2c, 0x2c, 0x2d, 0x2d, 0x2d, 0x2d,
0x2e, 0x2e, 0x2e, 0x2e, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x31, 0x31,
0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31,
0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31
}

Definition at line 200 of file if_urtw.c.

Referenced by urtw_8225v2b_rf_init().

◆ urtw_bulk_rx_callback

usb_callback_t urtw_bulk_rx_callback
static

Definition at line 521 of file if_urtw.c.

◆ urtw_bulk_tx_callback

usb_callback_t urtw_bulk_tx_callback
static

Definition at line 522 of file if_urtw.c.

◆ urtw_bulk_tx_status_callback

usb_callback_t urtw_bulk_tx_status_callback
static

Definition at line 523 of file if_urtw.c.

◆ urtw_devclass

devclass_t urtw_devclass
static

Definition at line 4429 of file if_urtw.c.

◆ urtw_devs

const STRUCT_USB_HOST_ID urtw_devs[]
static
Initial value:
= {
URTW_DEV_B(NETGEAR, WG111V3),
URTW_DEV_B(REALTEK, RTL8187B_0),
URTW_DEV_B(REALTEK, RTL8187B_1),
URTW_DEV_B(REALTEK, RTL8187B_2),
URTW_DEV_B(SITECOMEU, WL168V4),
URTW_DEV_L(ASUS, P5B_WIFI),
URTW_DEV_L(BELKIN, F5D7050E),
URTW_DEV_L(LINKSYS4, WUSB54GCV2),
URTW_DEV_L(NETGEAR, WG111V2),
URTW_DEV_L(REALTEK, RTL8187),
URTW_DEV_L(SITECOMEU, WL168V1),
URTW_DEV_L(SURECOM, EP9001G2A),
{ USB_VPI(USB_VENDOR_OVISLINK, 0x8187, URTW_REV_RTL8187L) },
{ USB_VPI(USB_VENDOR_DICKSMITH, 0x9401, URTW_REV_RTL8187L) },
{ USB_VPI(USB_VENDOR_HP, 0xca02, URTW_REV_RTL8187L) },
{ USB_VPI(USB_VENDOR_LOGITEC, 0x010c, URTW_REV_RTL8187L) },
{ USB_VPI(USB_VENDOR_NETGEAR, 0x6100, URTW_REV_RTL8187L) },
{ USB_VPI(USB_VENDOR_SPHAIRON, 0x0150, URTW_REV_RTL8187L) },
{ USB_VPI(USB_VENDOR_QCOM, 0x6232, URTW_REV_RTL8187L) },
}
#define URTW_DEV_L(v, p)
Definition: if_urtw.c:106
#define URTW_DEV_B(v, p)
Definition: if_urtw.c:104
#define URTW_REV_RTL8187L
Definition: if_urtw.c:109
#define USB_VPI(vend, prod, info)
Definition: usbdi.h:367

Definition at line 110 of file if_urtw.c.

Referenced by urtw_match().

◆ urtw_driver

driver_t urtw_driver
static
Initial value:
= {
.name = "urtw",
.methods = urtw_methods,
.size = sizeof(struct urtw_softc)
}
static device_method_t urtw_methods[]
Definition: if_urtw.c:4418

Definition at line 4424 of file if_urtw.c.

◆ urtw_methods

device_method_t urtw_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, urtw_match),
DEVMETHOD(device_attach, urtw_attach),
DEVMETHOD(device_detach, urtw_detach),
DEVMETHOD_END
}
static int urtw_detach(device_t dev)
Definition: if_urtw.c:928
static int urtw_attach(device_t dev)
Definition: if_urtw.c:790
static int urtw_match(device_t dev)
Definition: if_urtw.c:775

Definition at line 4418 of file if_urtw.c.

◆ urtw_preamble_mode

int urtw_preamble_mode = URTW_PREAMBLE_MODE_LONG
static

Definition at line 97 of file if_urtw.c.

Referenced by urtw_attach().

◆ urtw_ratetable

struct urtw_pair urtw_ratetable[]
static
Initial value:
= {
{ 2, 0 }, { 4, 1 }, { 11, 2 }, { 12, 4 }, { 18, 5 },
{ 22, 3 }, { 24, 6 }, { 36, 7 }, { 48, 8 }, { 72, 9 },
{ 96, 10 }, { 108, 11 }
}

Definition at line 479 of file if_urtw.c.

Referenced by urtw_rtl2rate().