FreeBSD kernel usb device Code
if_rum.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/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_rumreg.h>
#include <dev/usb/wlan/if_rumvar.h>
#include <dev/usb/wlan/if_rumfw.h>
Include dependency graph for if_rum.c:

Go to the source code of this file.

Data Structures

struct  rfprog
 

Macros

#define USB_DEBUG_VAR   rum_debug
 
#define RUM_DEV(v, p)   { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) }
 

Functions

 __FBSDID ("$FreeBSD$")
 
static usb_error_t rum_do_request (struct rum_softc *sc, struct usb_device_request *req, void *data)
 
static usb_error_t rum_do_mcu_request (struct rum_softc *sc, int)
 
static struct ieee80211vap * rum_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 rum_vap_delete (struct ieee80211vap *)
 
static void rum_cmdq_cb (void *, int)
 
static int rum_cmd_sleepable (struct rum_softc *, const void *, size_t, uint8_t, CMD_FUNC_PROTO)
 
static void rum_tx_free (struct rum_tx_data *, int)
 
static void rum_setup_tx_list (struct rum_softc *)
 
static void rum_reset_tx_list (struct rum_softc *, struct ieee80211vap *)
 
static void rum_unsetup_tx_list (struct rum_softc *)
 
static void rum_beacon_miss (struct ieee80211vap *)
 
static void rum_sta_recv_mgmt (struct ieee80211_node *, struct mbuf *, int, const struct ieee80211_rx_stats *, int, int)
 
static int rum_set_power_state (struct rum_softc *, int)
 
static int rum_newstate (struct ieee80211vap *, enum ieee80211_state, int)
 
static uint8_t rum_crypto_mode (struct rum_softc *, u_int, int)
 
static void rum_setup_tx_desc (struct rum_softc *, struct rum_tx_desc *, struct ieee80211_key *, uint32_t, uint8_t, uint8_t, int, int, int)
 
static uint32_t rum_tx_crypto_flags (struct rum_softc *, struct ieee80211_node *, const struct ieee80211_key *)
 
static int rum_tx_mgt (struct rum_softc *, struct mbuf *, struct ieee80211_node *)
 
static int rum_tx_raw (struct rum_softc *, struct mbuf *, struct ieee80211_node *, const struct ieee80211_bpf_params *)
 
static int rum_tx_data (struct rum_softc *, struct mbuf *, struct ieee80211_node *)
 
static int rum_transmit (struct ieee80211com *, struct mbuf *)
 
static void rum_start (struct rum_softc *)
 
static void rum_parent (struct ieee80211com *)
 
static void rum_eeprom_read (struct rum_softc *, uint16_t, void *, int)
 
static uint32_t rum_read (struct rum_softc *, uint16_t)
 
static void rum_read_multi (struct rum_softc *, uint16_t, void *, int)
 
static usb_error_t rum_write (struct rum_softc *, uint16_t, uint32_t)
 
static usb_error_t rum_write_multi (struct rum_softc *, uint16_t, void *, size_t)
 
static usb_error_t rum_setbits (struct rum_softc *, uint16_t, uint32_t)
 
static usb_error_t rum_clrbits (struct rum_softc *, uint16_t, uint32_t)
 
static usb_error_t rum_modbits (struct rum_softc *, uint16_t, uint32_t, uint32_t)
 
static int rum_bbp_busy (struct rum_softc *)
 
static void rum_bbp_write (struct rum_softc *, uint8_t, uint8_t)
 
static uint8_t rum_bbp_read (struct rum_softc *, uint8_t)
 
static void rum_rf_write (struct rum_softc *, uint8_t, uint32_t)
 
static void rum_select_antenna (struct rum_softc *)
 
static void rum_enable_mrr (struct rum_softc *)
 
static void rum_set_txpreamble (struct rum_softc *)
 
static void rum_set_basicrates (struct rum_softc *)
 
static void rum_select_band (struct rum_softc *, struct ieee80211_channel *)
 
static void rum_set_chan (struct rum_softc *, struct ieee80211_channel *)
 
static void rum_set_maxretry (struct rum_softc *, struct ieee80211vap *)
 
static int rum_enable_tsf_sync (struct rum_softc *)
 
static void rum_enable_tsf (struct rum_softc *)
 
static void rum_abort_tsf_sync (struct rum_softc *)
 
static void rum_get_tsf (struct rum_softc *, uint64_t *)
 
static void rum_update_slot_cb (struct rum_softc *, union sec_param *, uint8_t)
 
static void rum_update_slot (struct ieee80211com *)
 
static int rum_wme_update (struct ieee80211com *)
 
static void rum_set_bssid (struct rum_softc *, const uint8_t *)
 
static void rum_set_macaddr (struct rum_softc *, const uint8_t *)
 
static void rum_update_mcast (struct ieee80211com *)
 
static void rum_update_promisc (struct ieee80211com *)
 
static void rum_setpromisc (struct rum_softc *)
 
static const char * rum_get_rf (int)
 
static void rum_read_eeprom (struct rum_softc *)
 
static int rum_bbp_wakeup (struct rum_softc *)
 
static int rum_bbp_init (struct rum_softc *)
 
static void rum_clr_shkey_regs (struct rum_softc *)
 
static int rum_init (struct rum_softc *)
 
static void rum_stop (struct rum_softc *)
 
static void rum_load_microcode (struct rum_softc *, const uint8_t *, size_t)
 
static int rum_set_sleep_time (struct rum_softc *, uint16_t)
 
static int rum_reset (struct ieee80211vap *, u_long)
 
static int rum_set_beacon (struct rum_softc *, struct ieee80211vap *)
 
static int rum_alloc_beacon (struct rum_softc *, struct ieee80211vap *)
 
static void rum_update_beacon_cb (struct rum_softc *, union sec_param *, uint8_t)
 
static void rum_update_beacon (struct ieee80211vap *, int)
 
static int rum_common_key_set (struct rum_softc *, struct ieee80211_key *, uint16_t)
 
static void rum_group_key_set_cb (struct rum_softc *, union sec_param *, uint8_t)
 
static void rum_group_key_del_cb (struct rum_softc *, union sec_param *, uint8_t)
 
static void rum_pair_key_set_cb (struct rum_softc *, union sec_param *, uint8_t)
 
static void rum_pair_key_del_cb (struct rum_softc *, union sec_param *, uint8_t)
 
static int rum_key_alloc (struct ieee80211vap *, struct ieee80211_key *, ieee80211_keyix *, ieee80211_keyix *)
 
static int rum_key_set (struct ieee80211vap *, const struct ieee80211_key *)
 
static int rum_key_delete (struct ieee80211vap *, const struct ieee80211_key *)
 
static int rum_raw_xmit (struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *)
 
static void rum_scan_start (struct ieee80211com *)
 
static void rum_scan_end (struct ieee80211com *)
 
static void rum_set_channel (struct ieee80211com *)
 
static void rum_getradiocaps (struct ieee80211com *, int, int *, struct ieee80211_channel[])
 
static int rum_get_rssi (struct rum_softc *, uint8_t)
 
static void rum_ratectl_start (struct rum_softc *, struct ieee80211_node *)
 
static void rum_ratectl_timeout (void *)
 
static void rum_ratectl_task (void *, int)
 
static int rum_pause (struct rum_softc *, int)
 
static int rum_match (device_t self)
 
static int rum_attach (device_t self)
 
static int rum_detach (device_t self)
 
static void rum_bulk_write_callback (struct usb_xfer *xfer, usb_error_t error)
 
static void rum_bulk_read_callback (struct usb_xfer *xfer, usb_error_t error)
 
static uint8_t rum_plcp_signal (int rate)
 
static int rum_sendprot (struct rum_softc *sc, const struct mbuf *m, struct ieee80211_node *ni, int prot, int rate)
 
 DRIVER_MODULE (rum, uhub, rum_driver, rum_devclass, NULL, 0)
 
 MODULE_DEPEND (rum, wlan, 1, 1, 1)
 
 MODULE_DEPEND (rum, usb, 1, 1, 1)
 
 MODULE_VERSION (rum, 1)
 
 USB_PNP_HOST_INFO (rum_devs)
 

Variables

static const STRUCT_USB_HOST_ID rum_devs []
 
static device_probe_t rum_match
 
static device_attach_t rum_attach
 
static device_detach_t rum_detach
 
static usb_callback_t rum_bulk_read_callback
 
static usb_callback_t rum_bulk_write_callback
 
struct {
   uint32_t   reg
 
   uint32_t   val
 
rum_def_mac []
 
struct {
   uint8_t   reg
 
   uint8_t   val
 
rum_def_bbp []
 
static const uint8_t rum_chan_5ghz []
 
static const struct rfprog rum_rf5226 []
 
static const struct rfprog rum_rf5225 []
 
static const struct usb_config rum_config [RUM_N_TRANSFER]
 
static device_method_t rum_methods []
 
static driver_t rum_driver
 
static devclass_t rum_devclass
 

Macro Definition Documentation

◆ RUM_DEV

#define RUM_DEV (   v,
 
)    { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) }

◆ USB_DEBUG_VAR

#define USB_DEBUG_VAR   rum_debug

Definition at line 73 of file if_rum.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ DRIVER_MODULE()

DRIVER_MODULE ( rum  ,
uhub  ,
rum_driver  ,
rum_devclass  ,
NULL  ,
 
)

◆ MODULE_DEPEND() [1/2]

MODULE_DEPEND ( rum  ,
usb  ,
,
,
 
)

◆ MODULE_DEPEND() [2/2]

MODULE_DEPEND ( rum  ,
wlan  ,
,
,
 
)

◆ MODULE_VERSION()

MODULE_VERSION ( rum  ,
 
)

◆ rum_abort_tsf_sync()

static void rum_abort_tsf_sync ( struct rum_softc sc)
static

Definition at line 2258 of file if_rum.c.

References RT2573_TXRX_CSR9, and rum_clrbits().

Referenced by rum_newstate(), and rum_scan_start().

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

◆ rum_alloc_beacon()

static int rum_alloc_beacon ( struct rum_softc sc,
struct ieee80211vap *  vap 
)
static

Definition at line 2794 of file if_rum.c.

References rum_vap::bcn_mbuf, rum_set_beacon(), RUM_VAP, and rum_vap::vap.

Referenced by rum_newstate().

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

◆ rum_attach()

◆ rum_bbp_busy()

static int rum_bbp_busy ( struct rum_softc sc)
static

Definition at line 1900 of file if_rum.c.

References RT2573_BBP_BUSY, RT2573_PHY_CSR3, rum_pause(), and rum_read().

Referenced by rum_bbp_read(), and rum_bbp_write().

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

◆ rum_bbp_init()

static int rum_bbp_init ( struct rum_softc sc)
static

Definition at line 2512 of file if_rum.c.

References rum_softc::bbp_prom, reg, rum_softc::reg, rum_bbp_read(), rum_bbp_write(), rum_def_bbp, rum_pause(), rum_softc::sc_dev, val, and rum_softc::val.

Referenced by rum_init().

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

◆ rum_bbp_read()

static uint8_t rum_bbp_read ( struct rum_softc sc,
uint8_t  reg 
)
static

Definition at line 1933 of file if_rum.c.

References reg, RT2573_BBP_BUSY, RT2573_BBP_READ, RT2573_PHY_CSR3, rum_bbp_busy(), rum_pause(), rum_read(), rum_write(), rum_softc::sc_dev, and val.

Referenced by rum_bbp_init(), rum_select_antenna(), and rum_set_chan().

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

◆ rum_bbp_wakeup()

static int rum_bbp_wakeup ( struct rum_softc sc)
static

Definition at line 2491 of file if_rum.c.

References RT2573_MAC_CSR12, rum_pause(), rum_read(), rum_write(), and rum_softc::sc_dev.

Referenced by rum_init().

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

◆ rum_bbp_write()

static void rum_bbp_write ( struct rum_softc sc,
uint8_t  reg,
uint8_t  val 
)
static

Definition at line 1917 of file if_rum.c.

References reg, RT2573_BBP_BUSY, RT2573_PHY_CSR3, rum_bbp_busy(), rum_write(), rum_softc::sc_dev, and val.

Referenced by rum_bbp_init(), rum_select_antenna(), rum_select_band(), and rum_set_chan().

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

◆ rum_beacon_miss()

static void rum_beacon_miss ( struct ieee80211vap *  vap)
static

Definition at line 877 of file if_rum.c.

References rum_vap::bmiss, RUM_LOCK, RUM_UNLOCK, RUM_VAP, rum_softc::sc_sleep_end, rum_softc::sc_sleeping, and rum_vap::vap.

Referenced by rum_vap_create().

Here is the caller graph for this function:

◆ rum_bulk_read_callback()

◆ rum_bulk_write_callback()

◆ rum_clr_shkey_regs()

static void rum_clr_shkey_regs ( struct rum_softc sc)
static

Definition at line 2544 of file if_rum.c.

References RT2573_SEC_CSR0, RT2573_SEC_CSR1, RT2573_SEC_CSR5, and rum_write().

Referenced by rum_group_key_set_cb(), and rum_init().

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

◆ rum_clrbits()

static usb_error_t rum_clrbits ( struct rum_softc sc,
uint16_t  reg,
uint32_t  mask 
)
static

Definition at line 1888 of file if_rum.c.

References reg, rum_read(), and rum_write().

Referenced by rum_abort_tsf_sync(), rum_group_key_del_cb(), rum_newstate(), rum_pair_key_del_cb(), rum_reset(), rum_set_txpreamble(), and rum_setpromisc().

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

◆ rum_cmd_sleepable()

static int rum_cmd_sleepable ( struct rum_softc sc,
const void *  ptr,
size_t  len,
uint8_t  rvp_id,
CMD_FUNC_PROTO   
)
static

◆ rum_cmdq_cb()

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

Definition at line 744 of file if_rum.c.

References rum_softc::cmdq, rum_softc::cmdq_first, rum_cmdq::data, RUM_CMDQ_LOCK, RUM_CMDQ_SIZE, RUM_CMDQ_UNLOCK, RUM_LOCK, RUM_UNLOCK, and rum_cmdq::rvp_id.

Referenced by rum_attach().

Here is the caller graph for this function:

◆ rum_common_key_set()

static int rum_common_key_set ( struct rum_softc sc,
struct ieee80211_key *  k,
uint16_t  base 
)
static

Definition at line 2866 of file if_rum.c.

References k, and rum_write_multi().

Referenced by rum_group_key_set_cb(), and rum_pair_key_set_cb().

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

◆ rum_crypto_mode()

static uint8_t rum_crypto_mode ( struct rum_softc sc,
u_int  cipher,
int  keylen 
)
static

Definition at line 1342 of file if_rum.c.

References RT2573_MODE_AES_CCMP, RT2573_MODE_TKIP, RT2573_MODE_WEP104, RT2573_MODE_WEP40, and rum_softc::sc_dev.

Referenced by rum_group_key_set_cb(), rum_pair_key_set_cb(), and rum_tx_crypto_flags().

Here is the caller graph for this function:

◆ rum_detach()

static int rum_detach ( device_t  self)
static

◆ rum_do_mcu_request()

static usb_error_t rum_do_mcu_request ( struct rum_softc sc,
int  request 
)
static

Definition at line 647 of file if_rum.c.

References req, RT2573_MCU_CNTL, rum_do_request(), USETW, and UT_WRITE_VENDOR_DEVICE.

Referenced by rum_load_microcode(), and rum_set_power_state().

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

◆ rum_do_request()

static usb_error_t rum_do_request ( struct rum_softc sc,
struct usb_device_request req,
void *  data 
)
static

Definition at line 626 of file if_rum.c.

References data, req, rum_pause(), rum_softc::sc_mtx, rum_softc::sc_udev, usbd_do_request_flags(), and usbd_errstr().

Referenced by rum_do_mcu_request(), rum_eeprom_read(), rum_read_multi(), and rum_write_multi().

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

◆ rum_eeprom_read()

static void rum_eeprom_read ( struct rum_softc sc,
uint16_t  addr,
void *  buf,
int  len 
)
static

Definition at line 1797 of file if_rum.c.

References addr, error, len, req, RT2573_READ_EEPROM, rum_do_request(), rum_softc::sc_dev, usbd_errstr(), USETW, and UT_READ_VENDOR_DEVICE.

Referenced by rum_read_eeprom().

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

◆ rum_enable_mrr()

static void rum_enable_mrr ( struct rum_softc sc)
static

Definition at line 2013 of file if_rum.c.

References RT2573_MRR_CCK_FALLBACK, RT2573_MRR_ENABLED, RT2573_TXRX_CSR4, rum_modbits(), rum_setbits(), and rum_softc::sc_ic.

Referenced by rum_newstate().

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

◆ rum_enable_tsf()

static void rum_enable_tsf ( struct rum_softc sc)
static

Definition at line 2251 of file if_rum.c.

References RT2573_TSF_SYNC_MODE, RT2573_TSF_SYNC_MODE_DIS, RT2573_TSF_TIMER_EN, RT2573_TXRX_CSR9, and rum_modbits().

Referenced by rum_newstate(), and rum_scan_end().

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

◆ rum_enable_tsf_sync()

static int rum_enable_tsf_sync ( struct rum_softc sc)
static

◆ rum_get_rf()

static const char * rum_get_rf ( int  rev)
static

Definition at line 2396 of file if_rum.c.

References RT2573_RF_2527, RT2573_RF_2528, RT2573_RF_5225, and RT2573_RF_5226.

Referenced by rum_attach().

Here is the caller graph for this function:

◆ rum_get_rssi()

static int rum_get_rssi ( struct rum_softc sc,
uint8_t  raw 
)
static

Definition at line 3230 of file if_rum.c.

References rum_softc::ext_5ghz_lna, raw, rum_softc::rssi_2ghz_corr, rum_softc::rssi_5ghz_corr, RT2573_NOISE_FLOOR, and rum_softc::sc_ic.

Referenced by rum_bulk_read_callback().

Here is the caller graph for this function:

◆ rum_get_tsf()

static void rum_get_tsf ( struct rum_softc sc,
uint64_t *  buf 
)
static

Definition at line 2264 of file if_rum.c.

References RT2573_TXRX_CSR12, and rum_read_multi().

Referenced by rum_bulk_read_callback().

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

◆ rum_getradiocaps()

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

Definition at line 3211 of file if_rum.c.

References rum_softc::rf_rev, RT2573_RF_5225, RT2573_RF_5226, and rum_chan_5ghz.

Referenced by rum_attach().

Here is the caller graph for this function:

◆ rum_group_key_del_cb()

static void rum_group_key_del_cb ( struct rum_softc sc,
union sec_param data,
uint8_t  rvp_id 
)
static

Definition at line 2930 of file if_rum.c.

References data, DPRINTF, k, RT2573_MODE_MASK, RT2573_SEC_CSR0, RT2573_SEC_CSR1, RT2573_SEC_CSR5, RT2573_SKEY_MAX, and rum_clrbits().

Referenced by rum_key_delete().

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

◆ rum_group_key_set_cb()

static void rum_group_key_set_cb ( struct rum_softc sc,
union sec_param data,
uint8_t  rvp_id 
)
static

Definition at line 2886 of file if_rum.c.

References data, k, RT2573_MODE_MASK, RT2573_SEC_CSR0, RT2573_SEC_CSR1, RT2573_SEC_CSR5, RT2573_SKEY, RT2573_SKEY_MAX, rum_clr_shkey_regs(), rum_common_key_set(), rum_crypto_mode(), rum_modbits(), rum_setbits(), rum_softc::sc_clr_shkeys, and rum_softc::sc_dev.

Referenced by rum_key_set().

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

◆ rum_init()

◆ rum_key_alloc()

static int rum_key_alloc ( struct ieee80211vap *  vap,
struct ieee80211_key *  k,
ieee80211_keyix *  keyix,
ieee80211_keyix *  rxkeyix 
)
static

Definition at line 3007 of file if_rum.c.

References k, rum_softc::keys_bmap, RT2573_ADDR_MAX, RUM_LOCK, RUM_UNLOCK, and rum_softc::sc_dev.

Referenced by rum_vap_create().

Here is the caller graph for this function:

◆ rum_key_delete()

static int rum_key_delete ( struct ieee80211vap *  vap,
const struct ieee80211_key *  k 
)
static

Definition at line 3058 of file if_rum.c.

References k, rum_cmd_sleepable(), rum_group_key_del_cb(), and rum_pair_key_del_cb().

Referenced by rum_vap_create().

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

◆ rum_key_set()

static int rum_key_set ( struct ieee80211vap *  vap,
const struct ieee80211_key *  k 
)
static

Definition at line 3041 of file if_rum.c.

References k, rum_cmd_sleepable(), rum_group_key_set_cb(), and rum_pair_key_set_cb().

Referenced by rum_vap_create().

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

◆ rum_load_microcode()

static void rum_load_microcode ( struct rum_softc sc,
const uint8_t *  ucode,
size_t  size 
)
static

Definition at line 2666 of file if_rum.c.

References reg, RT2573_MCU_CODE_BASE, RT2573_MCU_RUN, rum_do_mcu_request(), rum_pause(), rum_write(), rum_softc::sc_dev, size, UGETDW, USB_ERR_NORMAL_COMPLETION, and usbd_errstr().

Referenced by rum_attach().

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

◆ rum_match()

static int rum_match ( device_t  self)
static

◆ rum_modbits()

static usb_error_t rum_modbits ( struct rum_softc sc,
uint16_t  reg,
uint32_t  set,
uint32_t  unset 
)
static

Definition at line 1894 of file if_rum.c.

References reg, rum_read(), and rum_write().

Referenced by rum_enable_mrr(), rum_enable_tsf(), rum_group_key_set_cb(), rum_select_band(), rum_set_maxretry(), rum_set_sleep_time(), and rum_update_slot_cb().

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

◆ rum_newstate()

◆ rum_pair_key_del_cb()

static void rum_pair_key_del_cb ( struct rum_softc sc,
union sec_param data,
uint8_t  rvp_id 
)
static

Definition at line 2993 of file if_rum.c.

References data, DPRINTF, k, rum_softc::keys_bmap, RT2573_SEC_CSR2, RT2573_SEC_CSR3, RT2573_SEC_CSR4, rum_clrbits(), and rum_softc::vap_key_count.

Referenced by rum_key_delete().

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

◆ rum_pair_key_set_cb()

static void rum_pair_key_set_cb ( struct rum_softc sc,
union sec_param data,
uint8_t  rvp_id 
)
static

Definition at line 2945 of file if_rum.c.

References data, k, RT2573_ADDR_ENTRY, RT2573_PKEY, RT2573_SEC_CSR2, RT2573_SEC_CSR3, RT2573_SEC_CSR4, rum_common_key_set(), rum_crypto_mode(), rum_setbits(), rum_write_multi(), rum_softc::sc_dev, and rum_softc::vap_key_count.

Referenced by rum_key_set().

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

◆ rum_parent()

static void rum_parent ( struct ieee80211com *  ic)
static

Definition at line 1775 of file if_rum.c.

References rum_init(), RUM_LOCK, rum_stop(), RUM_UNLOCK, and rum_softc::sc_detached.

Referenced by rum_attach().

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

◆ rum_pause()

static int rum_pause ( struct rum_softc sc,
int  timeout 
)
static

Definition at line 3276 of file if_rum.c.

References rum_softc::sc_mtx, and usb_pause_mtx().

Referenced by rum_attach(), rum_bbp_busy(), rum_bbp_init(), rum_bbp_read(), rum_bbp_wakeup(), rum_do_request(), rum_load_microcode(), rum_rf_write(), and rum_set_chan().

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

◆ rum_plcp_signal()

static uint8_t rum_plcp_signal ( int  rate)
static

Definition at line 1316 of file if_rum.c.

Referenced by rum_setup_tx_desc().

Here is the caller graph for this function:

◆ rum_ratectl_start()

static void rum_ratectl_start ( struct rum_softc sc,
struct ieee80211_node *  ni 
)
static

Definition at line 3117 of file if_rum.c.

References rum_vap::ratectl_ch, RT2573_STA_CSR0, rum_ratectl_timeout(), rum_read_multi(), RUM_VAP, rum_softc::sta, usb_callout_reset, and rum_vap::vap.

Referenced by rum_newstate().

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

◆ rum_ratectl_task()

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

Definition at line 3139 of file if_rum.c.

References fail, rum_vap::maxretry, rum_vap::ratectl_ch, RT2573_STA_CSR0, RUM_LOCK, rum_ratectl_timeout(), rum_read_multi(), RUM_UNLOCK, rum_softc::sc_txs, rum_softc::sta, usb_callout_reset, and rum_vap::vap.

Referenced by rum_vap_create().

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

◆ rum_ratectl_timeout()

static void rum_ratectl_timeout ( void *  arg)
static

Definition at line 3129 of file if_rum.c.

References rum_vap::ratectl_task, and rum_vap::vap.

Referenced by rum_ratectl_start(), and rum_ratectl_task().

Here is the caller graph for this function:

◆ rum_raw_xmit()

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

Definition at line 3075 of file if_rum.c.

References RUM_LOCK, rum_tx_mgt(), RUM_TX_MINFREE, rum_tx_raw(), RUM_UNLOCK, rum_softc::sc_running, and rum_softc::tx_nfree.

Referenced by rum_attach().

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

◆ rum_read()

static uint32_t rum_read ( struct rum_softc sc,
uint16_t  reg 
)
static

Definition at line 1816 of file if_rum.c.

References reg, rum_read_multi(), and val.

Referenced by rum_attach(), rum_bbp_busy(), rum_bbp_read(), rum_bbp_wakeup(), rum_clrbits(), rum_enable_tsf_sync(), rum_init(), rum_modbits(), rum_rf_write(), rum_select_antenna(), and rum_setbits().

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

◆ rum_read_eeprom()

◆ rum_read_multi()

static void rum_read_multi ( struct rum_softc sc,
uint16_t  reg,
void *  buf,
int  len 
)
static

Definition at line 1826 of file if_rum.c.

References error, len, reg, req, RT2573_READ_MULTI_MAC, rum_do_request(), rum_softc::sc_dev, usbd_errstr(), USETW, and UT_READ_VENDOR_DEVICE.

Referenced by rum_get_tsf(), rum_init(), rum_ratectl_start(), rum_ratectl_task(), and rum_read().

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

◆ rum_reset()

static int rum_reset ( struct ieee80211vap *  vap,
u_long  cmd 
)
static

Definition at line 2724 of file if_rum.c.

References error, RT2573_AUTO_WAKEUP, RT2573_MAC_CSR11, rum_clrbits(), RUM_LOCK, rum_set_sleep_time(), rum_setbits(), and RUM_UNLOCK.

Referenced by rum_vap_create().

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

◆ rum_reset_tx_list()

static void rum_reset_tx_list ( struct rum_softc sc,
struct ieee80211vap *  vap 
)
static

Definition at line 827 of file if_rum.c.

References data, next, rum_tx_data::sc, rum_softc::tx_free, rum_softc::tx_nfree, and rum_softc::tx_q.

Referenced by rum_vap_delete().

Here is the caller graph for this function:

◆ rum_rf_write()

static void rum_rf_write ( struct rum_softc sc,
uint8_t  reg,
uint32_t  val 
)
static

Definition at line 1961 of file if_rum.c.

References reg, rum_softc::rf_regs, RT2573_PHY_CSR4, RT2573_RF_20BIT, RT2573_RF_BUSY, rum_pause(), rum_read(), rum_write(), rum_softc::sc_dev, and val.

Referenced by rum_set_chan().

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

◆ rum_scan_end()

static void rum_scan_end ( struct ieee80211com *  ic)
static

Definition at line 3185 of file if_rum.c.

References rum_enable_tsf(), rum_enable_tsf_sync(), RUM_LOCK, rum_set_bssid(), RUM_UNLOCK, and rum_softc::sc_bssid.

Referenced by rum_attach().

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

◆ rum_scan_start()

static void rum_scan_start ( struct ieee80211com *  ic)
static

Definition at line 3173 of file if_rum.c.

References rum_abort_tsf_sync(), RUM_LOCK, rum_set_bssid(), and RUM_UNLOCK.

Referenced by rum_attach().

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

◆ rum_select_antenna()

static void rum_select_antenna ( struct rum_softc sc)
static

Definition at line 1988 of file if_rum.c.

References RT2573_DISABLE_RX, RT2573_TXRX_CSR0, rum_bbp_read(), rum_bbp_write(), rum_read(), and rum_write().

Referenced by rum_init(), and rum_set_chan().

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

◆ rum_select_band()

static void rum_select_band ( struct rum_softc sc,
struct ieee80211_channel *  c 
)
static

Definition at line 2060 of file if_rum.c.

References rum_softc::bbp17, rum_softc::ext_2ghz_lna, rum_softc::ext_5ghz_lna, RT2573_PA_PE_2GHZ, RT2573_PA_PE_5GHZ, RT2573_PHY_CSR0, rum_bbp_write(), and rum_modbits().

Referenced by rum_init(), and rum_set_chan().

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

◆ rum_sendprot()

static int rum_sendprot ( struct rum_softc sc,
const struct mbuf *  m,
struct ieee80211_node *  ni,
int  prot,
int  rate 
)
static

Definition at line 1417 of file if_rum.c.

References data, next, RT2573_TX_NEED_ACK, RUM_BULK_WR, RUM_LOCK_ASSERT, rum_setup_tx_desc(), rum_softc::sc_dev, rum_softc::sc_xfer, rum_softc::tx_free, rum_softc::tx_nfree, rum_softc::tx_q, and usbd_transfer_start().

Referenced by rum_tx_data(), and rum_tx_raw().

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

◆ rum_set_basicrates()

static void rum_set_basicrates ( struct rum_softc sc)
static

Definition at line 2038 of file if_rum.c.

References RT2573_TXRX_CSR5, rum_write(), and rum_softc::sc_ic.

Referenced by rum_newstate().

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

◆ rum_set_beacon()

static int rum_set_beacon ( struct rum_softc sc,
struct ieee80211vap *  vap 
)
static

Definition at line 2761 of file if_rum.c.

References rum_vap::bcn_mbuf, desc, RT2573_HW_BCN_BASE, RT2573_TX_DESC_SIZE, RT2573_TX_HWSEQ, RT2573_TX_TIMESTAMP, RUM_LOCK_ASSERT, rum_setup_tx_desc(), RUM_VAP, rum_write_multi(), and rum_vap::vap.

Referenced by rum_alloc_beacon(), and rum_update_beacon_cb().

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

◆ rum_set_bssid()

static void rum_set_bssid ( struct rum_softc sc,
const uint8_t *  bssid 
)
static

Definition at line 2345 of file if_rum.c.

References RT2573_MAC_CSR4, RT2573_MAC_CSR5, RT2573_NUM_BSSID_MSK, and rum_write().

Referenced by rum_newstate(), rum_scan_end(), and rum_scan_start().

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

◆ rum_set_chan()

static void rum_set_chan ( struct rum_softc sc,
struct ieee80211_channel *  c 
)
static

◆ rum_set_channel()

static void rum_set_channel ( struct ieee80211com *  ic)
static

Definition at line 3201 of file if_rum.c.

References RUM_LOCK, rum_set_chan(), and RUM_UNLOCK.

Referenced by rum_attach().

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

◆ rum_set_macaddr()

static void rum_set_macaddr ( struct rum_softc sc,
const uint8_t *  addr 
)
static

Definition at line 2355 of file if_rum.c.

References addr, RT2573_MAC_CSR2, RT2573_MAC_CSR3, and rum_write().

Referenced by rum_init().

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

◆ rum_set_maxretry()

static void rum_set_maxretry ( struct rum_softc sc,
struct ieee80211vap *  vap 
)
static

Definition at line 2174 of file if_rum.c.

References rum_vap::maxretry, RT2573_LONG_RETRY, RT2573_LONG_RETRY_MASK, RT2573_SHORT_RETRY, RT2573_SHORT_RETRY_MASK, RT2573_TXRX_CSR4, rum_modbits(), RUM_VAP, and rum_vap::vap.

Referenced by rum_newstate().

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

◆ rum_set_power_state()

static int rum_set_power_state ( struct rum_softc sc,
int  sleep 
)
static

Definition at line 935 of file if_rum.c.

References RT2573_MCU_SLEEP, RT2573_MCU_WAKEUP, rum_do_mcu_request(), RUM_LOCK_ASSERT, rum_softc::sc_dev, rum_softc::sc_sleep_end, rum_softc::sc_sleep_time, rum_softc::sc_sleeping, USB_ERR_NORMAL_COMPLETION, and usbd_errstr().

Referenced by rum_newstate(), and rum_sta_recv_mgmt().

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

◆ rum_set_sleep_time()

static int rum_set_sleep_time ( struct rum_softc sc,
uint16_t  bintval 
)
static

Definition at line 2693 of file if_rum.c.

References RT2573_MAC_CSR11, RT2573_TBCN_DELAY, RT2573_TBCN_DELAY_MAX, RT2573_TBCN_EXP, RT2573_TBCN_EXP_MAX, RUM_LOCK_ASSERT, rum_modbits(), rum_softc::sc_ic, rum_softc::sc_sleep_time, and USB_ERR_NORMAL_COMPLETION.

Referenced by rum_enable_tsf_sync(), and rum_reset().

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

◆ rum_set_txpreamble()

static void rum_set_txpreamble ( struct rum_softc sc)
static

Definition at line 2027 of file if_rum.c.

References RT2573_SHORT_PREAMBLE, RT2573_TXRX_CSR4, rum_clrbits(), rum_setbits(), and rum_softc::sc_ic.

Referenced by rum_newstate().

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

◆ rum_setbits()

static usb_error_t rum_setbits ( struct rum_softc sc,
uint16_t  reg,
uint32_t  mask 
)
static

Definition at line 1882 of file if_rum.c.

References reg, rum_read(), and rum_write().

Referenced by rum_enable_mrr(), rum_group_key_set_cb(), rum_newstate(), rum_pair_key_set_cb(), rum_reset(), rum_set_txpreamble(), rum_setpromisc(), and rum_stop().

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

◆ rum_setpromisc()

static void rum_setpromisc ( struct rum_softc sc)
static

Definition at line 2365 of file if_rum.c.

References DPRINTF, RT2573_DROP_NOT_TO_ME, RT2573_TXRX_CSR0, rum_clrbits(), rum_setbits(), and rum_softc::sc_ic.

Referenced by rum_update_promisc().

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

◆ rum_setup_tx_desc()

static void rum_setup_tx_desc ( struct rum_softc sc,
struct rum_tx_desc desc,
struct ieee80211_key *  k,
uint32_t  flags,
uint8_t  xflags,
uint8_t  qid,
int  hdrlen,
int  len,
int  rate 
)
static

Definition at line 1358 of file if_rum.c.

References desc, k, len, remainder, RT2573_AIFSN, RT2573_LOGCWMAX, RT2573_LOGCWMIN, RT2573_PLCP_LENGEXT, RT2573_QID, RT2573_TX_OFDM, RT2573_TX_VALID, rum_plcp_signal(), rum_softc::sc_ic, and rum_softc::wme_params.

Referenced by rum_sendprot(), rum_set_beacon(), rum_tx_data(), rum_tx_mgt(), and rum_tx_raw().

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

◆ rum_setup_tx_list()

static void rum_setup_tx_list ( struct rum_softc sc)
static

Definition at line 808 of file if_rum.c.

References data, next, RUM_TX_LIST_COUNT, rum_tx_data::sc, rum_softc::tx_data, rum_softc::tx_free, rum_softc::tx_nfree, and rum_softc::tx_q.

Referenced by rum_init().

Here is the caller graph for this function:

◆ rum_sta_recv_mgmt()

static void rum_sta_recv_mgmt ( struct ieee80211_node *  ni,
struct mbuf *  m,
int  subtype,
const struct ieee80211_rx_stats *  rxs,
int  rssi,
int  nf 
)
static

Definition at line 904 of file if_rum.c.

References rum_softc::last_rx_flags, rum_vap::recv_mgmt, RT2573_RX_BC, RT2573_RX_MYBSS, RUM_LOCK, rum_set_power_state(), RUM_UNLOCK, RUM_VAP, and rum_vap::vap.

Referenced by rum_vap_create().

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

◆ rum_start()

static void rum_start ( struct rum_softc sc)
static

Definition at line 1752 of file if_rum.c.

References RUM_LOCK_ASSERT, rum_tx_data(), RUM_TX_MINFREE, rum_softc::sc_running, rum_softc::sc_snd, and rum_softc::tx_nfree.

Referenced by rum_bulk_read_callback(), rum_bulk_write_callback(), and rum_transmit().

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

◆ rum_stop()

static void rum_stop ( struct rum_softc sc)
static

Definition at line 2636 of file if_rum.c.

References RT2573_DISABLE_RX, RT2573_MAC_CSR1, RT2573_RESET_ASIC, RT2573_RESET_BBP, RT2573_TXRX_CSR0, RUM_BULK_RD, RUM_BULK_WR, RUM_LOCK, rum_setbits(), RUM_UNLOCK, rum_unsetup_tx_list(), rum_write(), rum_softc::sc_running, rum_softc::sc_xfer, and usbd_transfer_drain().

Referenced by rum_init(), and rum_parent().

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

◆ rum_transmit()

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

Definition at line 1730 of file if_rum.c.

References error, RUM_LOCK, rum_start(), RUM_UNLOCK, rum_softc::sc_running, and rum_softc::sc_snd.

Referenced by rum_attach().

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

◆ rum_tx_crypto_flags()

static uint32_t rum_tx_crypto_flags ( struct rum_softc sc,
struct ieee80211_node *  ni,
const struct ieee80211_key *  k 
)
static

Definition at line 1457 of file if_rum.c.

References k, RT2573_SKEY_MAX, RT2573_TX_CIP_MODE, RT2573_TX_KEY_ID, RT2573_TX_KEY_PAIR, RT2573_TX_TKIPMIC, and rum_crypto_mode().

Referenced by rum_tx_data(), and rum_tx_mgt().

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

◆ rum_tx_data()

static int rum_tx_data ( struct rum_softc sc,
struct mbuf *  m0,
struct ieee80211_node *  ni 
)
static

◆ rum_tx_free()

static void rum_tx_free ( struct rum_tx_data data,
int  txerr 
)
static

Definition at line 794 of file if_rum.c.

References data, next, rum_softc::tx_free, and rum_softc::tx_nfree.

Referenced by rum_bulk_write_callback().

Here is the caller graph for this function:

◆ rum_tx_mgt()

static int rum_tx_mgt ( struct rum_softc sc,
struct mbuf *  m0,
struct ieee80211_node *  ni 
)
static

◆ rum_tx_raw()

static int rum_tx_raw ( struct rum_softc sc,
struct mbuf *  m0,
struct ieee80211_node *  ni,
const struct ieee80211_bpf_params *  params 
)
static

◆ rum_unsetup_tx_list()

static void rum_unsetup_tx_list ( struct rum_softc sc)
static

Definition at line 851 of file if_rum.c.

References data, RUM_TX_LIST_COUNT, rum_tx_data::sc, rum_softc::tx_data, rum_softc::tx_free, rum_softc::tx_nfree, and rum_softc::tx_q.

Referenced by rum_detach(), and rum_stop().

Here is the caller graph for this function:

◆ rum_update_beacon()

static void rum_update_beacon ( struct ieee80211vap *  vap,
int  item 
)
static

Definition at line 2825 of file if_rum.c.

References rum_vap::bcn_mbuf, rum_cmd_sleepable(), RUM_LOCK, RUM_UNLOCK, rum_update_beacon_cb(), rum_update_slot(), RUM_VAP, rum_softc::sc_dev, and rum_vap::vap.

Referenced by rum_vap_create().

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

◆ rum_update_beacon_cb()

static void rum_update_beacon_cb ( struct rum_softc sc,
union sec_param data,
uint8_t  rvp_id 
)
static

Definition at line 2816 of file if_rum.c.

References data, and rum_set_beacon().

Referenced by rum_update_beacon().

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

◆ rum_update_mcast()

static void rum_update_mcast ( struct ieee80211com *  ic)
static

Definition at line 2390 of file if_rum.c.

Referenced by rum_attach().

Here is the caller graph for this function:

◆ rum_update_promisc()

static void rum_update_promisc ( struct ieee80211com *  ic)
static

Definition at line 2379 of file if_rum.c.

References RUM_LOCK, rum_setpromisc(), RUM_UNLOCK, and rum_softc::sc_running.

Referenced by rum_attach().

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

◆ rum_update_slot()

static void rum_update_slot ( struct ieee80211com *  ic)
static

Definition at line 2283 of file if_rum.c.

References rum_cmd_sleepable(), and rum_update_slot_cb().

Referenced by rum_attach(), and rum_update_beacon().

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

◆ rum_update_slot_cb()

static void rum_update_slot_cb ( struct rum_softc sc,
union sec_param data,
uint8_t  rvp_id 
)
static

Definition at line 2270 of file if_rum.c.

References DPRINTF, RT2573_MAC_CSR9, rum_modbits(), and rum_softc::sc_ic.

Referenced by rum_newstate(), and rum_update_slot().

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

◆ rum_vap_create()

static struct ieee80211vap * rum_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

◆ rum_vap_delete()

static void rum_vap_delete ( struct ieee80211vap *  vap)
static

Definition at line 720 of file if_rum.c.

References rum_vap::bcn_mbuf, rum_vap::ratectl_ch, rum_vap::ratectl_task, RUM_LOCK, rum_reset_tx_list(), RUM_UNLOCK, RUM_VAP, usb_callout_drain, and rum_vap::vap.

Referenced by rum_attach().

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

◆ rum_wme_update()

static int rum_wme_update ( struct ieee80211com *  ic)
static

Definition at line 2289 of file if_rum.c.

References error, RT2573_AIFSN_CSR, RT2573_CWMAX_CSR, RT2573_CWMIN_CSR, RT2573_TXOP01_CSR, RT2573_TXOP23_CSR, RUM_LOCK, RUM_UNLOCK, rum_write(), rum_softc::sc_dev, and rum_softc::wme_params.

Referenced by rum_attach().

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

◆ rum_write()

static usb_error_t rum_write ( struct rum_softc sc,
uint16_t  reg,
uint32_t  val 
)
static

◆ rum_write_multi()

static usb_error_t rum_write_multi ( struct rum_softc sc,
uint16_t  reg,
void *  buf,
size_t  len 
)
static

Definition at line 1854 of file if_rum.c.

References error, len, offset, reg, req, RT2573_WRITE_MULTI_MAC, rum_do_request(), rum_softc::sc_dev, USB_ERR_NORMAL_COMPLETION, usbd_errstr(), USETW, and UT_WRITE_VENDOR_DEVICE.

Referenced by rum_common_key_set(), rum_pair_key_set_cb(), rum_set_beacon(), and rum_write().

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

◆ USB_PNP_HOST_INFO()

USB_PNP_HOST_INFO ( rum_devs  )

Variable Documentation

◆ reg

uint8_t reg

Definition at line 283 of file if_rum.c.

Referenced by aue_csr_read_1(), aue_csr_read_2(), aue_csr_write_1(), aue_csr_write_2(), aue_miibus_readreg(), aue_miibus_writereg(), axe_miibus_readreg(), axe_miibus_writereg(), axge_miibus_readreg(), axge_miibus_writereg(), axge_read_cmd_1(), axge_read_cmd_2(), axge_write_cmd_1(), axge_write_cmd_2(), cue_csr_read_1(), cue_csr_read_2(), cue_csr_write_1(), dwc_otg_clear_stall_sub_locked(), dwc_otg_set_stall(), imx_usbmisc_set_ctrl(), lan78xx_miibus_readreg(), lan78xx_miibus_writereg(), lan78xx_wait_for_bits(), mos_miibus_readreg(), mos_miibus_writereg(), mos_reg_read_1(), mos_reg_read_2(), mos_reg_write_1(), mos_reg_write_2(), musbotg_roothub_exec(), ohci_pci_take_controller(), rsu_calib_task(), rsu_efuse_read_1(), rsu_load_firmware(), rsu_power_on_acut(), rsu_power_on_bcut(), rsu_read_rom(), rsu_rxfilter_init(), rue_csr_read_1(), rue_csr_read_2(), rue_csr_write_1(), rue_csr_write_2(), rue_csr_write_4(), rue_miibus_readreg(), rue_miibus_writereg(), ruephy_service(), rum_bbp_init(), rum_bbp_read(), rum_bbp_write(), rum_clrbits(), rum_init(), rum_load_microcode(), rum_modbits(), rum_read(), rum_read_multi(), rum_rf_write(), rum_setbits(), rum_write(), rum_write_multi(), smsc_miibus_readreg(), smsc_miibus_writereg(), smsc_wait_for_bits(), snps_dwc3_configure_host(), snps_dwc3_configure_phy(), snps_dwc3_do_quirks(), uath_config(), uath_config_multi(), udav_miibus_readreg(), udav_miibus_writereg(), udl_cmd_write_reg_1(), udl_cmd_write_reg_3(), umcs7840_get_reg_sync(), umcs7840_get_UART_reg_sync(), umcs7840_set_reg_sync(), umcs7840_set_UART_reg_sync(), umoscom_cfg_read(), umoscom_cfg_write(), ure_ifmedia_upd(), ure_init(), ure_miibus_readreg(), ure_miibus_writereg(), ure_ocp_reg_read(), ure_ocp_reg_write(), ure_read_1(), ure_read_2(), ure_read_4(), ure_txcsum(), ure_write_1(), ure_write_2(), ure_write_4(), urtw_8225_rf_init(), urtw_8225v2_rf_init(), urtw_8225v2b_rf_init(), uss820dci_update_shared_1(), zyd_al2210_init(), zyd_al2230_bandedge6(), zyd_al2230_fini(), zyd_al2230_init(), zyd_al2230_init_b(), zyd_al2230_set_channel(), zyd_al2230_set_channel_b(), zyd_al7230B_init(), zyd_gct_init(), zyd_gct_set_channel(), zyd_maxim2_init(), zyd_maxim2_set_channel(), zyd_read16(), zyd_read32(), zyd_rfmd_init(), zyd_write16(), and zyd_write32().

◆ rum_attach

device_attach_t rum_attach
static

Definition at line 148 of file if_rum.c.

◆ rum_bulk_read_callback

usb_callback_t rum_bulk_read_callback
static

Definition at line 151 of file if_rum.c.

◆ rum_bulk_write_callback

usb_callback_t rum_bulk_write_callback
static

Definition at line 152 of file if_rum.c.

◆ rum_chan_5ghz

const uint8_t rum_chan_5ghz[]
static
Initial value:
=
{ 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64,
100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140,
149, 153, 157, 161, 165 }

Definition at line 342 of file if_rum.c.

Referenced by rum_getradiocaps().

◆ rum_config

const struct usb_config rum_config[RUM_N_TRANSFER]
static
Initial value:
= {
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
.bufsize = (MCLBYTES + RT2573_TX_DESC_SIZE + 8),
.flags = {.pipe_bof = 1,.force_short_xfer = 1,},
.timeout = 5000,
},
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_IN,
.bufsize = (MCLBYTES + RT2573_RX_DESC_SIZE),
.flags = {.pipe_bof = 1,.short_xfer_ok = 1,},
},
}
static usb_callback_t rum_bulk_read_callback
Definition: if_rum.c:151
static usb_callback_t rum_bulk_write_callback
Definition: if_rum.c:152
#define RT2573_RX_DESC_SIZE
Definition: if_rumreg.h:23
#define RT2573_TX_DESC_SIZE
Definition: if_rumreg.h:22
@ RUM_BULK_RD
Definition: if_rumvar.h:107
@ RUM_BULK_WR
Definition: if_rumvar.h:106
#define UE_ADDR_ANY
Definition: usb.h:537
#define UE_BULK
Definition: usb.h:543
#define UE_DIR_IN
Definition: usb.h:531
#define UE_DIR_OUT
Definition: usb.h:532

Definition at line 446 of file if_rum.c.

Referenced by rum_attach().

◆ 

const struct { ... } rum_def_bbp[]
Initial value:
= {
{ 3, 0x80 },
{ 15, 0x30 },
{ 17, 0x20 },
{ 21, 0xc8 },
{ 22, 0x38 },
{ 23, 0x06 },
{ 24, 0xfe },
{ 25, 0x0a },
{ 26, 0x0d },
{ 32, 0x0b },
{ 34, 0x12 },
{ 37, 0x07 },
{ 39, 0xf8 },
{ 41, 0x60 },
{ 53, 0x10 },
{ 54, 0x18 },
{ 60, 0x10 },
{ 61, 0x04 },
{ 62, 0x04 },
{ 75, 0xfe },
{ 86, 0xfe },
{ 88, 0xfe },
{ 90, 0x0f },
{ 99, 0x00 },
{ 102, 0x16 },
{ 107, 0x04 }
}

Referenced by rum_bbp_init().

◆ 

const struct { ... } rum_def_mac[]
Initial value:
= {
{ RT2573_TXRX_CSR0, 0x025fb032 },
{ RT2573_TXRX_CSR1, 0x9eaa9eaf },
{ RT2573_TXRX_CSR2, 0x8a8b8c8d },
{ RT2573_TXRX_CSR3, 0x00858687 },
{ RT2573_TXRX_CSR7, 0x2e31353b },
{ RT2573_TXRX_CSR8, 0x2a2a2a2c },
{ RT2573_TXRX_CSR15, 0x0000000f },
{ RT2573_MAC_CSR6, 0x00000fff },
{ RT2573_MAC_CSR8, 0x016c030a },
{ RT2573_MAC_CSR10, 0x00000718 },
{ RT2573_MAC_CSR12, 0x00000004 },
{ RT2573_MAC_CSR13, 0x00007f00 },
{ RT2573_SEC_CSR2, 0x00000000 },
{ RT2573_SEC_CSR3, 0x00000000 },
{ RT2573_SEC_CSR4, 0x00000000 },
{ RT2573_PHY_CSR1, 0x000023b0 },
{ RT2573_PHY_CSR5, 0x00040a06 },
{ RT2573_PHY_CSR6, 0x00080606 },
{ RT2573_PHY_CSR7, 0x00000408 },
{ RT2573_AIFSN_CSR, 0x00002273 },
{ RT2573_CWMIN_CSR, 0x00002344 },
{ RT2573_CWMAX_CSR, 0x000034aa }
}
#define RT2573_TXRX_CSR2
Definition: if_rumreg.h:85
#define RT2573_TXRX_CSR7
Definition: if_rumreg.h:90
#define RT2573_TXRX_CSR1
Definition: if_rumreg.h:84
#define RT2573_MAC_CSR8
Definition: if_rumreg.h:75
#define RT2573_PHY_CSR1
Definition: if_rumreg.h:100
#define RT2573_MAC_CSR12
Definition: if_rumreg.h:79
#define RT2573_SEC_CSR2
Definition: if_rumreg.h:109
#define RT2573_MAC_CSR6
Definition: if_rumreg.h:73
#define RT2573_TXRX_CSR8
Definition: if_rumreg.h:91
#define RT2573_CWMIN_CSR
Definition: if_rumreg.h:40
#define RT2573_PHY_CSR5
Definition: if_rumreg.h:104
#define RT2573_SEC_CSR4
Definition: if_rumreg.h:111
#define RT2573_TXRX_CSR15
Definition: if_rumreg.h:98
#define RT2573_MAC_CSR13
Definition: if_rumreg.h:80
#define RT2573_SEC_CSR3
Definition: if_rumreg.h:110
#define RT2573_TXRX_CSR0
Definition: if_rumreg.h:83
#define RT2573_PHY_CSR7
Definition: if_rumreg.h:106
#define RT2573_PHY_CSR6
Definition: if_rumreg.h:105
#define RT2573_TXRX_CSR3
Definition: if_rumreg.h:86
#define RT2573_AIFSN_CSR
Definition: if_rumreg.h:39
#define RT2573_MAC_CSR10
Definition: if_rumreg.h:77
#define RT2573_CWMAX_CSR
Definition: if_rumreg.h:41

Referenced by rum_init().

◆ rum_detach

device_detach_t rum_detach
static

Definition at line 149 of file if_rum.c.

Referenced by rum_attach().

◆ rum_devclass

devclass_t rum_devclass
static

Definition at line 3297 of file if_rum.c.

◆ rum_devs

const STRUCT_USB_HOST_ID rum_devs[]
static

Definition at line 89 of file if_rum.c.

Referenced by rum_match().

◆ rum_driver

driver_t rum_driver
static
Initial value:
= {
.name = "rum",
.methods = rum_methods,
.size = sizeof(struct rum_softc),
}
static device_method_t rum_methods[]
Definition: if_rum.c:3283

Definition at line 3291 of file if_rum.c.

◆ rum_match

device_probe_t rum_match
static

Definition at line 147 of file if_rum.c.

◆ rum_methods

device_method_t rum_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, rum_match),
DEVMETHOD(device_attach, rum_attach),
DEVMETHOD(device_detach, rum_detach),
DEVMETHOD_END
}
static device_detach_t rum_detach
Definition: if_rum.c:149
static device_attach_t rum_attach
Definition: if_rum.c:148
static device_probe_t rum_match
Definition: if_rum.c:147

Definition at line 3283 of file if_rum.c.

◆ rum_rf5225

const struct rfprog rum_rf5225[]
static

Referenced by rum_set_chan().

◆ rum_rf5226

const struct rfprog rum_rf5226[]
static

Referenced by rum_set_chan().

◆ val

uint8_t val

Definition at line 284 of file if_rum.c.

Referenced by aue_csr_read_1(), aue_csr_read_2(), aue_csr_write_1(), aue_csr_write_2(), aue_miibus_readreg(), axe_ax88178_init(), axe_cmd(), axe_miibus_readreg(), axe_miibus_statchg(), axe_miibus_writereg(), axge_detach(), axge_miibus_readreg(), axge_miibus_statchg(), axge_miibus_writereg(), axge_read_cmd_1(), axge_read_cmd_2(), axge_read_mem(), axge_stop(), axge_write_cmd_1(), axge_write_cmd_2(), axge_write_mem(), cue_csr_read_1(), cue_csr_read_2(), cue_csr_write_1(), ehci_pci_ati_quirk(), ehci_pci_via_quirk(), kue_ctl(), lan78xx_eeprom_read_raw(), lan78xx_miibus_readreg(), lan78xx_miibus_writereg(), lan78xx_otp_read_raw(), lan78xx_setmacaddress(), lan78xx_wait_for_bits(), mos_miibus_readreg(), mos_miibus_statchg(), mos_miibus_writereg(), mos_reg_read_1(), mos_reg_read_2(), mos_reg_write_1(), mos_reg_write_2(), muge_set_mac_addr(), put_be16(), put_be32(), rsu_cam_read(), rsu_delete_key(), rsu_key_check(), rsu_read_1(), rsu_read_2(), rsu_read_4(), rsu_write_1(), rsu_write_2(), rsu_write_4(), rue_csr_read_1(), rue_csr_read_2(), rue_csr_write_1(), rue_csr_write_2(), rue_csr_write_4(), rum_bbp_init(), rum_bbp_read(), rum_bbp_write(), rum_init(), rum_read(), rum_read_eeprom(), rum_rf_write(), rum_write(), smsc_eeprom_read(), smsc_miibus_readreg(), smsc_miibus_writereg(), smsc_sethwcsum(), smsc_setmacaddress(), smsc_wait_for_bits(), sysctl_hw_usb_template(), sysctl_hw_usb_template_power(), uath_config(), uath_get_capability(), uath_init(), uchcom_set_dtr_rts(), uchcom_set_dtr_rts_10(), uchcom_set_dtr_rts_20(), udav_csr_read1(), udav_miibus_readreg(), udav_miibus_writereg(), udl_cmd_write_reg_1(), udl_cmd_write_reg_3(), umoscom_cfg_read(), umoscom_cfg_set_break(), umoscom_cfg_write(), ure_ctl(), ure_miibus_readreg(), ure_miibus_writereg(), ure_phy_status(), ure_read_1(), ure_read_2(), ure_rtl8153_init(), ure_rtl8153b_init(), ure_rtl8153b_nic_reset(), ure_write_1(), ure_write_2(), ure_write_4(), urtw_8180_set_anaparam(), urtw_8185_set_anaparam2(), urtw_8225_rf_init(), urtw_8225v2_rf_init(), urtw_8225v2b_rf_init(), urtw_read16_c(), urtw_read32_c(), urtw_read8_c(), urtw_read8e(), urtw_rtl2rate(), urtw_txstatus_eof(), urtw_write16_c(), urtw_write32_c(), urtw_write8_c(), urtw_write8e(), usbpf_aggregate_status(), usbpf_aggregate_xferflags(), zyd_al2210_init(), zyd_al2230_bandedge6(), zyd_al2230_fini(), zyd_al2230_init(), zyd_al2230_init_b(), zyd_al2230_set_channel(), zyd_al2230_set_channel_b(), zyd_al7230B_init(), zyd_gct_init(), zyd_gct_set_channel(), zyd_hw_init(), zyd_init_locked(), zyd_maxim2_init(), zyd_maxim2_set_channel(), zyd_read16(), zyd_read32(), zyd_read_eeprom(), zyd_rfmd_init(), zyd_rfwrite(), zyd_rfwrite_cr(), zyd_set_beacon_interval(), zyd_write16(), and zyd_write32().