FreeBSD kernel usb device Code
if_rsu.c File Reference
#include <sys/cdefs.h>
#include "opt_wlan.h"
#include <sys/param.h>
#include <sys/endian.h>
#include <sys/sockio.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/bus.h>
#include <sys/firmware.h>
#include <sys/module.h>
#include <net/bpf.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_arp.h>
#include <net/if_dl.h>
#include <net/if_media.h>
#include <net/if_types.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/if_ether.h>
#include <netinet/ip.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/rtwn/if_rtwn_ridx.h>
#include <dev/usb/wlan/if_rsureg.h>
Include dependency graph for if_rsu.c:

Go to the source code of this file.

Data Structures

struct  r92s_pwr_cmd
 

Macros

#define RSU_RATE_IS_CCK   RTWN_RATE_IS_CCK
 
#define RSU_DPRINTF(_sc, _flg, ...)
 
#define RSU_DEBUG_ANY   0xffffffff
 
#define RSU_DEBUG_TX   0x00000001
 
#define RSU_DEBUG_RX   0x00000002
 
#define RSU_DEBUG_RESET   0x00000004
 
#define RSU_DEBUG_CALIB   0x00000008
 
#define RSU_DEBUG_STATE   0x00000010
 
#define RSU_DEBUG_SCAN   0x00000020
 
#define RSU_DEBUG_FWCMD   0x00000040
 
#define RSU_DEBUG_TXDONE   0x00000080
 
#define RSU_DEBUG_FW   0x00000100
 
#define RSU_DEBUG_FWDBG   0x00000200
 
#define RSU_DEBUG_AMPDU   0x00000400
 
#define RSU_DEBUG_KEY   0x00000800
 
#define RSU_DEBUG_USB   0x00001000
 
#define RSU_HT_NOT_SUPPORTED   0
 
#define RSU_HT_SUPPORTED   1
 
#define RSU_DEV_HT(v, p)
 
#define RSU_DEV(v, p)
 
#define RSU_H2C_ENDPOINT   3
 
#define RSU_PWR_UNKNOWN   0x0
 
#define RSU_PWR_ACTIVE   0x1
 
#define RSU_PWR_OFF   0x2
 
#define RSU_PWR_SLEEP   0x3
 

Functions

 __FBSDID ("$FreeBSD$")
 
 TUNABLE_INT ("hw.usb.rsu.enable_11n", &rsu_enable_11n)
 
static usb_error_t rsu_do_request (struct rsu_softc *, struct usb_device_request *, void *)
 
static struct ieee80211vap * rsu_vap_create (struct ieee80211com *, const char name[], int, enum ieee80211_opmode, int, const uint8_t bssid[], const uint8_t mac[])
 
static void rsu_vap_delete (struct ieee80211vap *)
 
static void rsu_scan_start (struct ieee80211com *)
 
static void rsu_scan_end (struct ieee80211com *)
 
static void rsu_getradiocaps (struct ieee80211com *, int, int *, struct ieee80211_channel[])
 
static void rsu_set_channel (struct ieee80211com *)
 
static void rsu_scan_curchan (struct ieee80211_scan_state *, unsigned long)
 
static void rsu_scan_mindwell (struct ieee80211_scan_state *)
 
static void rsu_update_promisc (struct ieee80211com *)
 
static uint8_t rsu_get_multi_pos (const uint8_t[])
 
static void rsu_set_multi (struct rsu_softc *)
 
static void rsu_update_mcast (struct ieee80211com *)
 
static int rsu_alloc_rx_list (struct rsu_softc *)
 
static void rsu_free_rx_list (struct rsu_softc *)
 
static int rsu_alloc_tx_list (struct rsu_softc *)
 
static void rsu_free_tx_list (struct rsu_softc *)
 
static void rsu_free_list (struct rsu_softc *, struct rsu_data[], int)
 
static struct rsu_data_rsu_getbuf (struct rsu_softc *)
 
static struct rsu_datarsu_getbuf (struct rsu_softc *)
 
static void rsu_freebuf (struct rsu_softc *, struct rsu_data *)
 
static int rsu_write_region_1 (struct rsu_softc *, uint16_t, uint8_t *, int)
 
static void rsu_write_1 (struct rsu_softc *, uint16_t, uint8_t)
 
static void rsu_write_2 (struct rsu_softc *, uint16_t, uint16_t)
 
static void rsu_write_4 (struct rsu_softc *, uint16_t, uint32_t)
 
static int rsu_read_region_1 (struct rsu_softc *, uint16_t, uint8_t *, int)
 
static uint8_t rsu_read_1 (struct rsu_softc *, uint16_t)
 
static uint16_t rsu_read_2 (struct rsu_softc *, uint16_t)
 
static uint32_t rsu_read_4 (struct rsu_softc *, uint16_t)
 
static int rsu_fw_iocmd (struct rsu_softc *, uint32_t)
 
static uint8_t rsu_efuse_read_1 (struct rsu_softc *, uint16_t)
 
static int rsu_read_rom (struct rsu_softc *)
 
static int rsu_fw_cmd (struct rsu_softc *, uint8_t, void *, int)
 
static void rsu_calib_task (void *, int)
 
static void rsu_tx_task (void *, int)
 
static void rsu_set_led (struct rsu_softc *, int)
 
static int rsu_monitor_newstate (struct ieee80211vap *, enum ieee80211_state, int)
 
static int rsu_newstate (struct ieee80211vap *, enum ieee80211_state, int)
 
static int rsu_key_alloc (struct ieee80211vap *, struct ieee80211_key *, ieee80211_keyix *, ieee80211_keyix *)
 
static int rsu_process_key (struct ieee80211vap *, const struct ieee80211_key *, int)
 
static int rsu_key_set (struct ieee80211vap *, const struct ieee80211_key *)
 
static int rsu_key_delete (struct ieee80211vap *, const struct ieee80211_key *)
 
static int rsu_cam_read (struct rsu_softc *, uint8_t, uint32_t *)
 
static void rsu_cam_write (struct rsu_softc *, uint8_t, uint32_t)
 
static int rsu_key_check (struct rsu_softc *, ieee80211_keyix, int)
 
static uint8_t rsu_crypto_mode (struct rsu_softc *, u_int, int)
 
static int rsu_set_key_group (struct rsu_softc *, const struct ieee80211_key *)
 
static int rsu_set_key_pair (struct rsu_softc *, const struct ieee80211_key *)
 
static int rsu_reinit_static_keys (struct rsu_softc *)
 
static int rsu_delete_key (struct rsu_softc *sc, ieee80211_keyix)
 
static void rsu_delete_key_pair_cb (void *, int)
 
static int rsu_site_survey (struct rsu_softc *, struct ieee80211_scan_ssid *)
 
static int rsu_join_bss (struct rsu_softc *, struct ieee80211_node *)
 
static int rsu_disconnect (struct rsu_softc *)
 
static int rsu_hwrssi_to_rssi (struct rsu_softc *, int hw_rssi)
 
static void rsu_event_survey (struct rsu_softc *, uint8_t *, int)
 
static void rsu_event_join_bss (struct rsu_softc *, uint8_t *, int)
 
static void rsu_rx_event (struct rsu_softc *, uint8_t, uint8_t *, int)
 
static void rsu_rx_multi_event (struct rsu_softc *, uint8_t *, int)
 
static int8_t rsu_get_rssi (struct rsu_softc *, int, void *)
 
static struct mbuf * rsu_rx_copy_to_mbuf (struct rsu_softc *, struct r92s_rx_stat *, int)
 
static uint32_t rsu_get_tsf_low (struct rsu_softc *)
 
static uint32_t rsu_get_tsf_high (struct rsu_softc *)
 
static struct ieee80211_node * rsu_rx_frame (struct rsu_softc *, struct mbuf *)
 
static struct mbuf * rsu_rx_multi_frame (struct rsu_softc *, uint8_t *, int)
 
static struct mbuf * rsu_rxeof (struct usb_xfer *, struct rsu_data *)
 
static void rsu_txeof (struct usb_xfer *, struct rsu_data *)
 
static int rsu_raw_xmit (struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *)
 
static void rsu_rxfilter_init (struct rsu_softc *)
 
static void rsu_rxfilter_set (struct rsu_softc *, uint32_t, uint32_t)
 
static void rsu_rxfilter_refresh (struct rsu_softc *)
 
static int rsu_init (struct rsu_softc *)
 
static int rsu_tx_start (struct rsu_softc *, struct ieee80211_node *, struct mbuf *, struct rsu_data *)
 
static int rsu_transmit (struct ieee80211com *, struct mbuf *)
 
static void rsu_start (struct rsu_softc *)
 
static void _rsu_start (struct rsu_softc *)
 
static int rsu_ioctl_net (struct ieee80211com *, u_long, void *)
 
static void rsu_parent (struct ieee80211com *)
 
static void rsu_stop (struct rsu_softc *)
 
static void rsu_ms_delay (struct rsu_softc *, int)
 
 DRIVER_MODULE (rsu, uhub, rsu_driver, rsu_devclass, NULL, 0)
 
 MODULE_DEPEND (rsu, wlan, 1, 1, 1)
 
 MODULE_DEPEND (rsu, usb, 1, 1, 1)
 
 MODULE_DEPEND (rsu, firmware, 1, 1, 1)
 
 MODULE_VERSION (rsu, 1)
 
 USB_PNP_HOST_INFO (rsu_devs)
 
static int rsu_match (device_t self)
 
static int rsu_send_mgmt (struct ieee80211_node *ni, int type, int arg)
 
static void rsu_update_chw (struct ieee80211com *ic)
 
static int rsu_ampdu_enable (struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap)
 
static int rsu_wme_update (struct ieee80211com *ic)
 
static int rsu_attach (device_t self)
 
static int rsu_detach (device_t self)
 
static struct ieee80211vap * rsu_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 u_int rsu_hash_maddr (void *arg, struct sockaddr_dl *sdl, u_int cnt)
 
static int rsu_alloc_list (struct rsu_softc *sc, struct rsu_data data[], int ndata, int maxsz)
 
static void rsu_calib_task (void *arg, int pending __unused)
 
static void rsu_tx_task (void *arg, int pending __unused)
 
static int rsu_set_fw_power_state (struct rsu_softc *sc, int state)
 
static void rsu_delete_key_pair_cb (void *arg, int pending __unused)
 
 CTASSERT (MCLBYTES > sizeof(struct ieee80211_frame))
 
static void rsu_event_addba_req_report (struct rsu_softc *sc, uint8_t *buf, int len)
 
static void rsu_bulk_rx_callback (struct usb_xfer *xfer, usb_error_t error)
 
static void rsu_bulk_tx_callback_sub (struct usb_xfer *xfer, usb_error_t error, uint8_t which)
 
static void rsu_bulk_tx_callback_be_bk (struct usb_xfer *xfer, usb_error_t error)
 
static void rsu_bulk_tx_callback_vi_vo (struct usb_xfer *xfer, usb_error_t error)
 
static void rsu_bulk_tx_callback_h2c (struct usb_xfer *xfer, usb_error_t error)
 
static void rsu_drain_mbufq (struct rsu_softc *sc)
 
static void rsu_power_on_acut (struct rsu_softc *sc)
 
static void rsu_power_on_bcut (struct rsu_softc *sc)
 
static void rsu_power_off (struct rsu_softc *sc)
 
static int rsu_fw_loadsection (struct rsu_softc *sc, const uint8_t *buf, int len)
 
 CTASSERT (sizeof(size_t) >=sizeof(uint32_t))
 
static int rsu_load_firmware (struct rsu_softc *sc)
 

Variables

static int rsu_enable_11n = 1
 
static const STRUCT_USB_HOST_ID rsu_devs []
 
static device_probe_t rsu_match
 
static device_attach_t rsu_attach
 
static device_detach_t rsu_detach
 
static usb_callback_t rsu_bulk_tx_callback_be_bk
 
static usb_callback_t rsu_bulk_tx_callback_vi_vo
 
static usb_callback_t rsu_bulk_tx_callback_h2c
 
static usb_callback_t rsu_bulk_rx_callback
 
static device_method_t rsu_methods []
 
static driver_t rsu_driver
 
static devclass_t rsu_devclass
 
static uint8_t rsu_wme_ac_xfer_map [4]
 
static const struct usb_config rsu_config [RSU_N_TRANSFER]
 

Macro Definition Documentation

◆ RSU_DEBUG_AMPDU

#define RSU_DEBUG_AMPDU   0x00000400

Definition at line 101 of file if_rsu.c.

◆ RSU_DEBUG_ANY

#define RSU_DEBUG_ANY   0xffffffff

Definition at line 90 of file if_rsu.c.

◆ RSU_DEBUG_CALIB

#define RSU_DEBUG_CALIB   0x00000008

Definition at line 94 of file if_rsu.c.

◆ RSU_DEBUG_FW

#define RSU_DEBUG_FW   0x00000100

Definition at line 99 of file if_rsu.c.

◆ RSU_DEBUG_FWCMD

#define RSU_DEBUG_FWCMD   0x00000040

Definition at line 97 of file if_rsu.c.

◆ RSU_DEBUG_FWDBG

#define RSU_DEBUG_FWDBG   0x00000200

Definition at line 100 of file if_rsu.c.

◆ RSU_DEBUG_KEY

#define RSU_DEBUG_KEY   0x00000800

Definition at line 102 of file if_rsu.c.

◆ RSU_DEBUG_RESET

#define RSU_DEBUG_RESET   0x00000004

Definition at line 93 of file if_rsu.c.

◆ RSU_DEBUG_RX

#define RSU_DEBUG_RX   0x00000002

Definition at line 92 of file if_rsu.c.

◆ RSU_DEBUG_SCAN

#define RSU_DEBUG_SCAN   0x00000020

Definition at line 96 of file if_rsu.c.

◆ RSU_DEBUG_STATE

#define RSU_DEBUG_STATE   0x00000010

Definition at line 95 of file if_rsu.c.

◆ RSU_DEBUG_TX

#define RSU_DEBUG_TX   0x00000001

Definition at line 91 of file if_rsu.c.

◆ RSU_DEBUG_TXDONE

#define RSU_DEBUG_TXDONE   0x00000080

Definition at line 98 of file if_rsu.c.

◆ RSU_DEBUG_USB

#define RSU_DEBUG_USB   0x00001000

Definition at line 103 of file if_rsu.c.

◆ RSU_DEV

#define RSU_DEV (   v,
 
)
Value:
{ USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, \
#define RSU_HT_NOT_SUPPORTED
#define USB_VPI(vend, prod, info)
Definition: usbdi.h:367

◆ RSU_DEV_HT

#define RSU_DEV_HT (   v,
 
)
Value:
{ USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, \
#define RSU_HT_SUPPORTED

◆ RSU_DPRINTF

#define RSU_DPRINTF (   _sc,
  _flg,
  ... 
)

Definition at line 84 of file if_rsu.c.

◆ RSU_H2C_ENDPOINT

#define RSU_H2C_ENDPOINT   3

Definition at line 294 of file if_rsu.c.

◆ RSU_HT_NOT_SUPPORTED

#define RSU_HT_NOT_SUPPORTED   0

◆ RSU_HT_SUPPORTED

#define RSU_HT_SUPPORTED   1

◆ RSU_PWR_ACTIVE

#define RSU_PWR_ACTIVE   0x1

Definition at line 1332 of file if_rsu.c.

◆ RSU_PWR_OFF

#define RSU_PWR_OFF   0x2

Definition at line 1333 of file if_rsu.c.

◆ RSU_PWR_SLEEP

#define RSU_PWR_SLEEP   0x3

Definition at line 1334 of file if_rsu.c.

◆ RSU_PWR_UNKNOWN

#define RSU_PWR_UNKNOWN   0x0

Definition at line 1331 of file if_rsu.c.

◆ RSU_RATE_IS_CCK

#define RSU_RATE_IS_CCK   RTWN_RATE_IS_CCK

Definition at line 70 of file if_rsu.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ _rsu_getbuf()

static struct rsu_data * _rsu_getbuf ( struct rsu_softc sc)
static

Definition at line 1028 of file if_rsu.c.

References next, and rsu_data::sc.

Referenced by rsu_getbuf().

Here is the caller graph for this function:

◆ _rsu_start()

static void _rsu_start ( struct rsu_softc sc)
static

Definition at line 2964 of file if_rsu.c.

References RSU_ASSERT_LOCKED, RSU_DEBUG_TX, RSU_DPRINTF, rsu_freebuf(), rsu_getbuf(), rsu_tx_start(), and rsu_softc::sc_snd.

Referenced by rsu_tx_task().

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

◆ CTASSERT() [1/2]

CTASSERT ( MCLBYTES  ,
sizeof(struct ieee80211_frame)   
)

◆ CTASSERT() [2/2]

CTASSERT ( sizeof(size_t) >=sizeof(uint32_t)  )

◆ DRIVER_MODULE()

DRIVER_MODULE ( rsu  ,
uhub  ,
rsu_driver  ,
rsu_devclass  ,
NULL  ,
 
)

◆ MODULE_DEPEND() [1/3]

MODULE_DEPEND ( rsu  ,
firmware  ,
,
,
 
)

◆ MODULE_DEPEND() [2/3]

MODULE_DEPEND ( rsu  ,
usb  ,
,
,
 
)

◆ MODULE_DEPEND() [3/3]

MODULE_DEPEND ( rsu  ,
wlan  ,
,
,
 
)

◆ MODULE_VERSION()

MODULE_VERSION ( rsu  ,
 
)

◆ rsu_alloc_list()

static int rsu_alloc_list ( struct rsu_softc sc,
struct rsu_data  data[],
int  ndata,
int  maxsz 
)
static

Definition at line 914 of file if_rsu.c.

References rsu_data::buf, data, error, fail, rsu_data::m, rsu_data::ni, rsu_free_list(), rsu_data::sc, and rsu_softc::sc_dev.

Referenced by rsu_alloc_rx_list(), and rsu_alloc_tx_list().

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

◆ rsu_alloc_rx_list()

static int rsu_alloc_rx_list ( struct rsu_softc sc)
static

Definition at line 940 of file if_rsu.c.

References error, next, rsu_alloc_list(), RSU_RX_LIST_COUNT, RSU_RXBUFSZ, rsu_data::sc, and rsu_softc::sc_rx.

Referenced by rsu_attach().

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

◆ rsu_alloc_tx_list()

static int rsu_alloc_tx_list ( struct rsu_softc sc)
static

Definition at line 959 of file if_rsu.c.

References error, next, rsu_alloc_list(), RSU_N_TRANSFER, RSU_TX_LIST_COUNT, RSU_TXBUFSZ, rsu_data::sc, and rsu_softc::sc_tx.

Referenced by rsu_attach().

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

◆ rsu_ampdu_enable()

static int rsu_ampdu_enable ( struct ieee80211_node *  ni,
struct ieee80211_tx_ampdu *  tap 
)
static

Definition at line 383 of file if_rsu.c.

References R92S_CMD_ADDBA_REQ, req, RSU_DEBUG_AMPDU, RSU_DPRINTF, rsu_fw_cmd(), RSU_LOCK, and RSU_UNLOCK.

Referenced by rsu_attach().

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

◆ rsu_attach()

◆ rsu_bulk_rx_callback()

◆ rsu_bulk_tx_callback_be_bk()

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

Definition at line 2713 of file if_rsu.c.

References error, RSU_BULK_TX_BE_BK, rsu_bulk_tx_callback_sub(), rsu_start(), and usbd_xfer_softc().

Here is the call graph for this function:

◆ rsu_bulk_tx_callback_h2c()

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

Definition at line 2735 of file if_rsu.c.

References error, rsu_bulk_tx_callback_sub(), RSU_BULK_TX_H2C, rsu_start(), and usbd_xfer_softc().

Here is the call graph for this function:

◆ rsu_bulk_tx_callback_sub()

static void rsu_bulk_tx_callback_sub ( struct usb_xfer xfer,
usb_error_t  error,
uint8_t  which 
)
static

◆ rsu_bulk_tx_callback_vi_vo()

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

Definition at line 2724 of file if_rsu.c.

References error, rsu_bulk_tx_callback_sub(), RSU_BULK_TX_VI_VO, rsu_start(), and usbd_xfer_softc().

Here is the call graph for this function:

◆ rsu_calib_task() [1/2]

static void rsu_calib_task ( void *  ,
int   
)
static

Referenced by rsu_attach().

Here is the caller graph for this function:

◆ rsu_calib_task() [2/2]

◆ rsu_cam_read()

static int rsu_cam_read ( struct rsu_softc sc,
uint8_t  addr,
uint32_t *  val 
)
static

Definition at line 1631 of file if_rsu.c.

References addr, R92S_CAMCMD, R92S_CAMCMD_POLLING, R92S_CAMREAD, rsu_read_4(), rsu_write_4(), rsu_softc::sc_dev, rsu_softc::sc_mtx, SM, USB_MS_TO_TICKS, usb_pause_mtx(), and val.

Referenced by rsu_delete_key(), and rsu_key_check().

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

◆ rsu_cam_write()

static void rsu_cam_write ( struct rsu_softc sc,
uint8_t  addr,
uint32_t  data 
)
static

Definition at line 1656 of file if_rsu.c.

References addr, data, R92S_CAMCMD, R92S_CAMCMD_POLLING, R92S_CAMCMD_WRITE, R92S_CAMWRITE, rsu_write_4(), and SM.

Referenced by rsu_delete_key().

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

◆ rsu_crypto_mode()

static uint8_t rsu_crypto_mode ( struct rsu_softc sc,
u_int  cipher,
int  keylen 
)
static

Definition at line 1697 of file if_rsu.c.

References R92S_KEY_ALGO_AES, R92S_KEY_ALGO_INVALID, R92S_KEY_ALGO_TKIP, R92S_KEY_ALGO_WEP104, R92S_KEY_ALGO_WEP40, and rsu_softc::sc_dev.

Referenced by rsu_set_key_group(), and rsu_set_key_pair().

Here is the caller graph for this function:

◆ rsu_delete_key()

static int rsu_delete_key ( struct rsu_softc sc,
ieee80211_keyix  keyix 
)
static

◆ rsu_delete_key_pair_cb() [1/2]

static void rsu_delete_key_pair_cb ( void *  ,
int   
)
static

Referenced by rsu_attach().

Here is the caller graph for this function:

◆ rsu_delete_key_pair_cb() [2/2]

static void rsu_delete_key_pair_cb ( void *  arg,
int pending  __unused 
)
static

Definition at line 1857 of file if_rsu.c.

References rsu_softc::free_keys_bmap, R92S_CAM_ENTRY_LIMIT, RSU_DEBUG_KEY, rsu_delete_key(), RSU_DELKEY_BMAP_LOCK, RSU_DELKEY_BMAP_UNLOCK, RSU_DPRINTF, RSU_LOCK, and RSU_UNLOCK.

Here is the call graph for this function:

◆ rsu_detach()

◆ rsu_disconnect()

static int rsu_disconnect ( struct rsu_softc sc)
static

Definition at line 2001 of file if_rsu.c.

References R92S_CMD_DISCONNECT, RSU_DEBUG_FWCMD, RSU_DEBUG_STATE, RSU_DPRINTF, and rsu_fw_cmd().

Referenced by rsu_newstate().

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

◆ rsu_do_request()

static usb_error_t rsu_do_request ( struct rsu_softc sc,
struct usb_device_request req,
void *  data 
)
static

Definition at line 657 of file if_rsu.c.

References data, req, RSU_ASSERT_LOCKED, RSU_DEBUG_USB, RSU_DPRINTF, rsu_ms_delay(), rsu_softc::sc_mtx, rsu_softc::sc_udev, USB_ERR_NOT_CONFIGURED, usbd_do_request_flags(), and usbd_errstr().

Referenced by rsu_read_region_1(), and rsu_write_region_1().

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

◆ rsu_drain_mbufq()

static void rsu_drain_mbufq ( struct rsu_softc sc)
static

Definition at line 2949 of file if_rsu.c.

References RSU_ASSERT_LOCKED, and rsu_softc::sc_snd.

Referenced by rsu_init(), and rsu_stop().

Here is the caller graph for this function:

◆ rsu_efuse_read_1()

static uint8_t rsu_efuse_read_1 ( struct rsu_softc sc,
uint16_t  addr 
)
static

Definition at line 1158 of file if_rsu.c.

References addr, MS, R92S_EFUSE_CTRL, R92S_EFUSE_CTRL_VALID, reg, rsu_ms_delay(), rsu_read_4(), rsu_write_4(), RW, rsu_data::sc, and rsu_softc::sc_dev.

Referenced by rsu_read_rom().

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

◆ rsu_event_addba_req_report()

static void rsu_event_addba_req_report ( struct rsu_softc sc,
uint8_t *  buf,
int  len 
)
static

Definition at line 2153 of file if_rsu.c.

References len, r92s_add_ba_event::mac_addr, RSU_DEBUG_AMPDU, RSU_DPRINTF, rsu_softc::sc_dev, rsu_softc::sc_ic, r92s_add_ba_event::ssn, and r92s_add_ba_event::tid.

Referenced by rsu_rx_event().

Here is the caller graph for this function:

◆ rsu_event_join_bss()

static void rsu_event_join_bss ( struct rsu_softc sc,
uint8_t *  buf,
int  len 
)
static

◆ rsu_event_survey()

static void rsu_event_survey ( struct rsu_softc sc,
uint8_t *  buf,
int  len 
)
static

◆ rsu_free_list()

static void rsu_free_list ( struct rsu_softc sc,
struct rsu_data  data[],
int  ndata 
)
static

Definition at line 1009 of file if_rsu.c.

References rsu_data::buf, data, and rsu_data::ni.

Referenced by rsu_alloc_list(), rsu_free_rx_list(), and rsu_free_tx_list().

Here is the caller graph for this function:

◆ rsu_free_rx_list()

static void rsu_free_rx_list ( struct rsu_softc sc)
static

Definition at line 999 of file if_rsu.c.

References rsu_free_list(), RSU_RX_LIST_COUNT, rsu_data::sc, and rsu_softc::sc_rx.

Referenced by rsu_attach(), and rsu_detach().

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

◆ rsu_free_tx_list()

static void rsu_free_tx_list ( struct rsu_softc sc)
static

Definition at line 983 of file if_rsu.c.

References rsu_free_list(), RSU_N_TRANSFER, RSU_TX_LIST_COUNT, rsu_data::sc, and rsu_softc::sc_tx.

Referenced by rsu_detach().

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

◆ rsu_freebuf()

static void rsu_freebuf ( struct rsu_softc sc,
struct rsu_data bf 
)
static

Definition at line 1055 of file if_rsu.c.

References next, RSU_ASSERT_LOCKED, and rsu_data::sc.

Referenced by _rsu_start(), rsu_bulk_tx_callback_sub(), and rsu_raw_xmit().

Here is the caller graph for this function:

◆ rsu_fw_cmd()

◆ rsu_fw_iocmd()

static int rsu_fw_iocmd ( struct rsu_softc sc,
uint32_t  iocmd 
)
static

Definition at line 1143 of file if_rsu.c.

References R92S_IOCMD_CTRL, rsu_ms_delay(), rsu_read_4(), rsu_write_4(), and rsu_data::sc.

Referenced by rsu_calib_task().

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

◆ rsu_fw_loadsection()

static int rsu_fw_loadsection ( struct rsu_softc sc,
const uint8_t *  buf,
int  len 
)
static

Definition at line 3310 of file if_rsu.c.

References data, len, next, R92S_TXDW0_LINIP, RSU_DEBUG_FW, RSU_DEBUG_RESET, RSU_DEBUG_TX, RSU_DPRINTF, rsu_getbuf(), RSU_TXBUFSZ, rsu_wme_ac_xfer_map, rsu_softc::sc_xfer, SM, r92s_tx_desc::txdw0, and usbd_transfer_start().

Referenced by rsu_load_firmware().

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

◆ rsu_get_multi_pos()

static uint8_t rsu_get_multi_pos ( const uint8_t  maddr[])
static

Definition at line 846 of file if_rsu.c.

Referenced by rsu_hash_maddr().

Here is the caller graph for this function:

◆ rsu_get_rssi()

static int8_t rsu_get_rssi ( struct rsu_softc sc,
int  rate,
void *  physt 
)
static

Definition at line 2280 of file if_rsu.c.

References r92s_rx_cck::agc_rpt, and r92s_rx_phystat::phydw1.

Referenced by rsu_rx_frame().

Here is the caller graph for this function:

◆ rsu_get_tsf_high()

static uint32_t rsu_get_tsf_high ( struct rsu_softc sc)
static

Definition at line 2349 of file if_rsu.c.

References R92S_TSFTR, and rsu_read_4().

Referenced by rsu_rx_frame().

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

◆ rsu_get_tsf_low()

static uint32_t rsu_get_tsf_low ( struct rsu_softc sc)
static

Definition at line 2343 of file if_rsu.c.

References R92S_TSFTR, and rsu_read_4().

Referenced by rsu_rx_frame().

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

◆ rsu_getbuf()

static struct rsu_data * rsu_getbuf ( struct rsu_softc sc)
static

Definition at line 1041 of file if_rsu.c.

References _rsu_getbuf(), RSU_ASSERT_LOCKED, RSU_DEBUG_TX, RSU_DPRINTF, and rsu_data::sc.

Referenced by _rsu_start(), rsu_fw_cmd(), rsu_fw_loadsection(), and rsu_raw_xmit().

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

◆ rsu_getradiocaps()

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

Definition at line 769 of file if_rsu.c.

References rsu_softc::sc_ht.

Referenced by rsu_attach().

Here is the caller graph for this function:

◆ rsu_hash_maddr()

static u_int rsu_hash_maddr ( void *  arg,
struct sockaddr_dl *  sdl,
u_int  cnt 
)
static

Definition at line 863 of file if_rsu.c.

References rsu_get_multi_pos().

Referenced by rsu_set_multi().

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

◆ rsu_hwrssi_to_rssi()

static int rsu_hwrssi_to_rssi ( struct rsu_softc sc,
int  hw_rssi 
)
static

Definition at line 2017 of file if_rsu.c.

Referenced by rsu_calib_task(), and rsu_rx_frame().

Here is the caller graph for this function:

◆ rsu_init()

◆ rsu_ioctl_net()

static int rsu_ioctl_net ( struct ieee80211com *  ic,
u_long  cmd,
void *  data 
)
static

Definition at line 3005 of file if_rsu.c.

References data, error, R92S_RCR_TCP_OFFLD_EN, RSU_LOCK, rsu_rxfilter_set(), RSU_UNLOCK, and rsu_softc::sc_rx_checksum_enable.

Referenced by rsu_attach().

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

◆ rsu_join_bss()

◆ rsu_key_alloc()

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

Definition at line 1526 of file if_rsu.c.

References k, rsu_softc::keys_bmap, R92S_MACID_BSS, RSU_LOCK, RSU_UNLOCK, and rsu_softc::sc_dev.

Referenced by rsu_vap_create().

Here is the caller graph for this function:

◆ rsu_key_check()

static int rsu_key_check ( struct rsu_softc sc,
ieee80211_keyix  keyix,
int  is_valid 
)
static

Definition at line 1666 of file if_rsu.c.

References error, R92S_CAM_CTL0, R92S_CAM_VALID, rsu_cam_read(), rsu_softc::sc_dev, rsu_softc::sc_mtx, USB_MS_TO_TICKS, usb_pause_mtx(), and val.

Referenced by rsu_delete_key(), rsu_set_key_group(), and rsu_set_key_pair().

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

◆ rsu_key_delete()

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

Definition at line 1625 of file if_rsu.c.

References k, and rsu_process_key().

Referenced by rsu_vap_create().

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

◆ rsu_key_set()

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

Definition at line 1619 of file if_rsu.c.

References k, and rsu_process_key().

Referenced by rsu_vap_create().

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

◆ rsu_load_firmware()

◆ rsu_match()

static int rsu_match ( device_t  self)
static

◆ rsu_monitor_newstate()

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

Definition at line 1408 of file if_rsu.c.

References rsu_vap::newstate, RSU_LOCK, rsu_rxfilter_refresh(), rsu_set_led(), RSU_UNLOCK, RSU_VAP, rsu_softc::sc_vap_is_running, and rsu_vap::vap.

Referenced by rsu_vap_create().

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

◆ rsu_ms_delay()

static void rsu_ms_delay ( struct rsu_softc sc,
int  ms 
)
static

Definition at line 3763 of file if_rsu.c.

Referenced by rsu_do_request(), rsu_efuse_read_1(), rsu_fw_iocmd(), rsu_load_firmware(), rsu_power_off(), rsu_power_on_acut(), rsu_power_on_bcut(), and rsu_read_rom().

Here is the caller graph for this function:

◆ rsu_newstate()

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

◆ rsu_parent()

static void rsu_parent ( struct ieee80211com *  ic)
static

Definition at line 3058 of file if_rsu.c.

References rsu_init(), and rsu_stop().

Referenced by rsu_attach().

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

◆ rsu_power_off()

static void rsu_power_off ( struct rsu_softc sc)
static

Definition at line 3277 of file if_rsu.c.

References R92S_AFE_MISC, R92S_AFE_PLL_CTRL, R92S_LDOA15_CTRL, R92S_LDOV12D_CTRL, R92S_PMC_FSM, R92S_RF_CTRL, R92S_SPS0_CTRL, R92S_SYS_CLKR, R92S_SYS_FUNC_EN, R92S_SYS_ISO_CTRL, rsu_ms_delay(), RSU_PWR_OFF, rsu_set_fw_power_state(), and rsu_write_1().

Referenced by rsu_stop().

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

◆ rsu_power_on_acut()

◆ rsu_power_on_bcut()

◆ rsu_process_key()

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

Definition at line 1564 of file if_rsu.c.

References rsu_softc::del_key_task, rsu_softc::free_keys_bmap, rsu_softc::group_keys, k, rsu_delete_key(), RSU_DELKEY_BMAP_LOCK, RSU_DELKEY_BMAP_UNLOCK, RSU_LOCK, rsu_set_key_group(), rsu_set_key_pair(), RSU_UNLOCK, and rsu_softc::sc_running.

Referenced by rsu_key_delete(), and rsu_key_set().

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

◆ rsu_raw_xmit()

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

Definition at line 3533 of file if_rsu.c.

References rsu_data::m, rsu_data::ni, rsu_freebuf(), rsu_getbuf(), RSU_LOCK, rsu_tx_start(), RSU_UNLOCK, rsu_data::sc, and rsu_softc::sc_running.

Referenced by rsu_attach().

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

◆ rsu_read_1()

static uint8_t rsu_read_1 ( struct rsu_softc sc,
uint16_t  addr 
)
static

Definition at line 1113 of file if_rsu.c.

References addr, rsu_read_region_1(), rsu_data::sc, and val.

Referenced by rsu_calib_task(), rsu_init(), rsu_load_firmware(), rsu_power_on_acut(), rsu_power_on_bcut(), rsu_read_rom(), and rsu_set_led().

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

◆ rsu_read_2()

static uint16_t rsu_read_2 ( struct rsu_softc sc,
uint16_t  addr 
)
static

Definition at line 1123 of file if_rsu.c.

References addr, rsu_read_region_1(), rsu_data::sc, and val.

Referenced by rsu_load_firmware(), rsu_power_on_acut(), and rsu_power_on_bcut().

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

◆ rsu_read_4()

static uint32_t rsu_read_4 ( struct rsu_softc sc,
uint16_t  addr 
)
static

Definition at line 1133 of file if_rsu.c.

References addr, rsu_read_region_1(), rsu_data::sc, and val.

Referenced by rsu_attach(), rsu_calib_task(), rsu_cam_read(), rsu_efuse_read_1(), rsu_fw_iocmd(), rsu_get_tsf_high(), rsu_get_tsf_low(), rsu_init(), rsu_rxfilter_init(), and rsu_rxfilter_set().

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

◆ rsu_read_region_1()

static int rsu_read_region_1 ( struct rsu_softc sc,
uint16_t  addr,
uint8_t *  buf,
int  len 
)
static

Definition at line 1098 of file if_rsu.c.

References addr, rsu_data::buf, len, R92S_REQ_REGS, req, rsu_do_request(), rsu_data::sc, USETW, and UT_READ_VENDOR_DEVICE.

Referenced by rsu_read_1(), rsu_read_2(), and rsu_read_4().

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

◆ rsu_read_rom()

static int rsu_read_rom ( struct rsu_softc sc)
static

Definition at line 1180 of file if_rsu.c.

References addr, R92S_9356SEL, R92S_EE_9346CR, R92S_EEPROM_EN, R92S_EFUSE_TEST, reg, rsu_softc::rom, RSU_DEBUG_RESET, rsu_efuse_read_1(), rsu_ms_delay(), rsu_read_1(), rsu_write_1(), and rsu_data::sc.

Referenced by rsu_attach().

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

◆ rsu_reinit_static_keys()

static int rsu_reinit_static_keys ( struct rsu_softc sc)
static

Definition at line 1788 of file if_rsu.c.

References error, rsu_softc::group_keys, rsu_set_key_group(), and rsu_softc::sc_dev.

Referenced by rsu_init(), and rsu_newstate().

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

◆ rsu_rx_copy_to_mbuf()

static struct mbuf * rsu_rx_copy_to_mbuf ( struct rsu_softc sc,
struct r92s_rx_stat stat,
int  totlen 
)
static

Definition at line 2301 of file if_rsu.c.

References fail, MS, R92S_RXDW0_CRCERR, R92S_RXDW0_ICVERR, RSU_DEBUG_RX, RSU_DPRINTF, rxdw0, r92s_rx_stat::rxdw0, rsu_softc::sc_dev, and rsu_softc::sc_ic.

Referenced by rsu_rx_multi_frame().

Here is the caller graph for this function:

◆ rsu_rx_event()

static void rsu_rx_event ( struct rsu_softc sc,
uint8_t  code,
uint8_t *  buf,
int  len 
)
static

◆ rsu_rx_frame()

◆ rsu_rx_multi_event()

static void rsu_rx_multi_event ( struct rsu_softc sc,
uint8_t *  buf,
int  len 
)
static

Definition at line 2247 of file if_rsu.c.

References r92s_fw_cmd_hdr::code, len, r92s_fw_cmd_hdr::len, R92S_FW_CMD_MORE, RSU_DEBUG_RX, RSU_DPRINTF, and rsu_rx_event().

Referenced by rsu_rxeof().

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

◆ rsu_rx_multi_frame()

static struct mbuf * rsu_rx_multi_frame ( struct rsu_softc sc,
uint8_t *  buf,
int  len 
)
static

Definition at line 2474 of file if_rsu.c.

References len, MS, RSU_DEBUG_RX, RSU_DPRINTF, rsu_rx_copy_to_mbuf(), rxdw0, r92s_rx_stat::rxdw0, r92s_rx_stat::rxdw2, and rsu_softc::sc_running.

Referenced by rsu_rxeof().

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

◆ rsu_rxeof()

static struct mbuf * rsu_rxeof ( struct usb_xfer xfer,
struct rsu_data data 
)
static

Definition at line 2532 of file if_rsu.c.

References data, len, RSU_DEBUG_RX, RSU_DPRINTF, rsu_rx_multi_event(), rsu_rx_multi_frame(), r92s_rx_stat::rxdw1, rsu_softc::sc_ic, and usbd_xfer_status().

Referenced by rsu_bulk_rx_callback().

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

◆ rsu_rxfilter_init()

static void rsu_rxfilter_init ( struct rsu_softc sc)
static

Definition at line 3564 of file if_rsu.c.

References R92S_RCR, R92S_RCR_APP_PHYSTS, R92S_RCR_TCP_OFFLD_EN, reg, RSU_ASSERT_LOCKED, rsu_read_4(), rsu_rxfilter_refresh(), rsu_set_multi(), rsu_write_4(), rsu_data::sc, and rsu_softc::sc_rx_checksum_enable.

Referenced by rsu_init().

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

◆ rsu_rxfilter_refresh()

static void rsu_rxfilter_refresh ( struct rsu_softc sc)
static

◆ rsu_rxfilter_set()

static void rsu_rxfilter_set ( struct rsu_softc sc,
uint32_t  clear,
uint32_t  set 
)
static

Definition at line 3586 of file if_rsu.c.

References R92S_RCR, rsu_read_4(), rsu_write_4(), and rsu_data::sc.

Referenced by rsu_ioctl_net(), and rsu_rxfilter_refresh().

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

◆ rsu_scan_curchan()

static void rsu_scan_curchan ( struct ieee80211_scan_state *  ss,
unsigned long  maxdwell 
)
static

Definition at line 814 of file if_rsu.c.

Referenced by rsu_attach().

Here is the caller graph for this function:

◆ rsu_scan_end()

static void rsu_scan_end ( struct ieee80211com *  ic)
static

Definition at line 763 of file if_rsu.c.

Referenced by rsu_attach().

Here is the caller graph for this function:

◆ rsu_scan_mindwell()

static void rsu_scan_mindwell ( struct ieee80211_scan_state *  ss)
static

Called by the net80211 framework to indicate the minimum dwell time has been met, terminate the scan. We don't actually terminate the scan as the firmware will notify us when it's finished and we have no way to interrupt it.

Definition at line 826 of file if_rsu.c.

Referenced by rsu_attach().

Here is the caller graph for this function:

◆ rsu_scan_start()

static void rsu_scan_start ( struct ieee80211com *  ic)
static

Definition at line 742 of file if_rsu.c.

References error, RSU_LOCK, rsu_site_survey(), RSU_UNLOCK, rsu_softc::sc_active_scan, and rsu_softc::sc_dev.

Referenced by rsu_attach().

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

◆ rsu_send_mgmt()

static int rsu_send_mgmt ( struct ieee80211_node *  ni,
int  type,
int  arg 
)
static

Definition at line 363 of file if_rsu.c.

Referenced by rsu_attach().

Here is the caller graph for this function:

◆ rsu_set_channel()

static void rsu_set_channel ( struct ieee80211com *  ic)
static

Definition at line 787 of file if_rsu.c.

References r92s_set_channel::channel, error, R92S_CMD_SET_CHANNEL, rsu_fw_cmd(), RSU_LOCK, RSU_UNLOCK, and rsu_softc::sc_dev.

Referenced by rsu_attach().

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

◆ rsu_set_fw_power_state()

◆ rsu_set_key_group()

static int rsu_set_key_group ( struct rsu_softc sc,
const struct ieee80211_key *  k 
)
static

Definition at line 1713 of file if_rsu.c.

References r92s_fw_cmd_set_key::algo, error, k, r92s_fw_cmd_set_key::key, R92S_CMD_SET_KEY, R92S_KEY_ALGO_INVALID, RSU_ASSERT_LOCKED, rsu_crypto_mode(), RSU_DEBUG_FWCMD, RSU_DEBUG_KEY, RSU_DPRINTF, rsu_fw_cmd(), rsu_key_check(), and rsu_softc::sc_dev.

Referenced by rsu_process_key(), and rsu_reinit_static_keys().

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

◆ rsu_set_key_pair()

static int rsu_set_key_pair ( struct rsu_softc sc,
const struct ieee80211_key *  k 
)
static

◆ rsu_set_led()

static void rsu_set_led ( struct rsu_softc sc,
int  on 
)
static

Definition at line 1401 of file if_rsu.c.

References R92S_LEDCFG, rsu_read_1(), and rsu_write_1().

Referenced by rsu_monitor_newstate().

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

◆ rsu_set_multi()

static void rsu_set_multi ( struct rsu_softc sc)
static

Definition at line 875 of file if_rsu.c.

References R92S_MAR, RSU_ASSERT_LOCKED, RSU_DEBUG_STATE, RSU_DPRINTF, rsu_hash_maddr(), rsu_write_4(), and rsu_softc::sc_ic.

Referenced by rsu_rxfilter_init(), and rsu_update_mcast().

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

◆ rsu_site_survey()

static int rsu_site_survey ( struct rsu_softc sc,
struct ieee80211_scan_ssid *  ssid 
)
static

◆ rsu_start()

static void rsu_start ( struct rsu_softc sc)
static

Definition at line 2998 of file if_rsu.c.

References rsu_softc::tx_task.

Referenced by rsu_bulk_tx_callback_be_bk(), rsu_bulk_tx_callback_h2c(), rsu_bulk_tx_callback_vi_vo(), and rsu_transmit().

Here is the caller graph for this function:

◆ rsu_stop()

static void rsu_stop ( struct rsu_softc sc)
static

◆ rsu_transmit()

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

Definition at line 2916 of file if_rsu.c.

References error, RSU_DEBUG_TX, RSU_DPRINTF, RSU_LOCK, rsu_start(), RSU_UNLOCK, rsu_softc::sc_running, and rsu_softc::sc_snd.

Referenced by rsu_attach().

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

◆ rsu_tx_start()

◆ rsu_tx_task() [1/2]

static void rsu_tx_task ( void *  ,
int   
)
static

Referenced by rsu_attach().

Here is the caller graph for this function:

◆ rsu_tx_task() [2/2]

static void rsu_tx_task ( void *  arg,
int pending  __unused 
)
static

Definition at line 1322 of file if_rsu.c.

References _rsu_start(), RSU_LOCK, and RSU_UNLOCK.

Here is the call graph for this function:

◆ rsu_txeof()

static void rsu_txeof ( struct usb_xfer xfer,
struct rsu_data data 
)
static

Definition at line 2633 of file if_rsu.c.

References data, RSU_DEBUG_TXDONE, RSU_DPRINTF, and usbd_xfer_softc().

Referenced by rsu_bulk_tx_callback_sub().

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

◆ rsu_update_chw()

static void rsu_update_chw ( struct ieee80211com *  ic)
static

Definition at line 370 of file if_rsu.c.

Referenced by rsu_attach().

Here is the caller graph for this function:

◆ rsu_update_mcast()

static void rsu_update_mcast ( struct ieee80211com *  ic)
static

Definition at line 903 of file if_rsu.c.

References RSU_LOCK, rsu_set_multi(), RSU_UNLOCK, and rsu_softc::sc_running.

Referenced by rsu_attach().

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

◆ rsu_update_promisc()

static void rsu_update_promisc ( struct ieee80211com *  ic)
static

Definition at line 832 of file if_rsu.c.

References RSU_LOCK, rsu_rxfilter_refresh(), RSU_UNLOCK, and rsu_softc::sc_running.

Referenced by rsu_attach().

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

◆ rsu_vap_create() [1/2]

static struct ieee80211vap * rsu_vap_create ( struct ieee80211com *  ,
const char  name[],
int  ,
enum  ieee80211_opmode,
int  ,
const uint8_t  bssid[],
const uint8_t  mac[] 
)
static

Referenced by rsu_attach().

Here is the caller graph for this function:

◆ rsu_vap_create() [2/2]

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

◆ rsu_vap_delete()

static void rsu_vap_delete ( struct ieee80211vap *  vap)
static

Definition at line 733 of file if_rsu.c.

References RSU_VAP, and rsu_vap::vap.

Referenced by rsu_attach().

Here is the caller graph for this function:

◆ rsu_wme_update()

static int rsu_wme_update ( struct ieee80211com *  ic)
static

Definition at line 424 of file if_rsu.c.

Referenced by rsu_attach().

Here is the caller graph for this function:

◆ rsu_write_1()

static void rsu_write_1 ( struct rsu_softc sc,
uint16_t  addr,
uint8_t  val 
)
static

Definition at line 1078 of file if_rsu.c.

References addr, rsu_write_region_1(), rsu_data::sc, and val.

Referenced by rsu_calib_task(), rsu_init(), rsu_load_firmware(), rsu_newstate(), rsu_power_off(), rsu_power_on_acut(), rsu_power_on_bcut(), rsu_read_rom(), rsu_set_fw_power_state(), and rsu_set_led().

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

◆ rsu_write_2()

static void rsu_write_2 ( struct rsu_softc sc,
uint16_t  addr,
uint16_t  val 
)
static

Definition at line 1084 of file if_rsu.c.

References addr, rsu_write_region_1(), rsu_data::sc, and val.

Referenced by rsu_load_firmware(), rsu_power_on_acut(), rsu_power_on_bcut(), and rsu_rxfilter_refresh().

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

◆ rsu_write_4()

static void rsu_write_4 ( struct rsu_softc sc,
uint16_t  addr,
uint32_t  val 
)
static

Definition at line 1091 of file if_rsu.c.

References addr, rsu_write_region_1(), rsu_data::sc, and val.

Referenced by rsu_cam_read(), rsu_cam_write(), rsu_efuse_read_1(), rsu_fw_iocmd(), rsu_init(), rsu_power_on_acut(), rsu_rxfilter_init(), rsu_rxfilter_set(), and rsu_set_multi().

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

◆ rsu_write_region_1()

static int rsu_write_region_1 ( struct rsu_softc sc,
uint16_t  addr,
uint8_t *  buf,
int  len 
)
static

Definition at line 1063 of file if_rsu.c.

References addr, rsu_data::buf, len, R92S_REQ_REGS, req, rsu_do_request(), rsu_data::sc, USETW, and UT_WRITE_VENDOR_DEVICE.

Referenced by rsu_init(), rsu_write_1(), rsu_write_2(), and rsu_write_4().

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

◆ TUNABLE_INT()

TUNABLE_INT ( "hw.usb.rsu.enable_11n"  ,
rsu_enable_11n 
)

◆ USB_PNP_HOST_INFO()

USB_PNP_HOST_INFO ( rsu_devs  )

Variable Documentation

◆ rsu_attach

device_attach_t rsu_attach
static

Definition at line 157 of file if_rsu.c.

◆ rsu_bulk_rx_callback

usb_callback_t rsu_bulk_rx_callback
static

Definition at line 162 of file if_rsu.c.

◆ rsu_bulk_tx_callback_be_bk

usb_callback_t rsu_bulk_tx_callback_be_bk
static

Definition at line 159 of file if_rsu.c.

◆ rsu_bulk_tx_callback_h2c

usb_callback_t rsu_bulk_tx_callback_h2c
static

Definition at line 161 of file if_rsu.c.

◆ rsu_bulk_tx_callback_vi_vo

usb_callback_t rsu_bulk_tx_callback_vi_vo
static

Definition at line 160 of file if_rsu.c.

◆ rsu_config

const struct usb_config rsu_config[RSU_N_TRANSFER]
static

Definition at line 296 of file if_rsu.c.

Referenced by rsu_attach().

◆ rsu_detach

device_detach_t rsu_detach
static

Definition at line 158 of file if_rsu.c.

◆ rsu_devclass

devclass_t rsu_devclass
static

Definition at line 277 of file if_rsu.c.

◆ rsu_devs

const STRUCT_USB_HOST_ID rsu_devs[]
static

Definition at line 105 of file if_rsu.c.

Referenced by rsu_match().

◆ rsu_driver

driver_t rsu_driver
static
Initial value:
= {
.name = "rsu",
.methods = rsu_methods,
.size = sizeof(struct rsu_softc)
}
static device_method_t rsu_methods[]
Definition: if_rsu.c:263

Definition at line 271 of file if_rsu.c.

◆ rsu_enable_11n

int rsu_enable_11n = 1
static

Definition at line 87 of file if_rsu.c.

Referenced by rsu_attach().

◆ rsu_match

device_probe_t rsu_match
static

Definition at line 156 of file if_rsu.c.

◆ rsu_methods

device_method_t rsu_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, rsu_match),
DEVMETHOD(device_attach, rsu_attach),
DEVMETHOD(device_detach, rsu_detach),
DEVMETHOD_END
}
static device_attach_t rsu_attach
Definition: if_rsu.c:157
static device_probe_t rsu_match
Definition: if_rsu.c:156
static device_detach_t rsu_detach
Definition: if_rsu.c:158

Definition at line 263 of file if_rsu.c.

◆ rsu_wme_ac_xfer_map

uint8_t rsu_wme_ac_xfer_map[4]
static
Initial value:
= {
[WME_AC_BE] = RSU_BULK_TX_BE_BK,
[WME_AC_BK] = RSU_BULK_TX_BE_BK,
[WME_AC_VI] = RSU_BULK_TX_VI_VO,
[WME_AC_VO] = RSU_BULK_TX_VI_VO,
}
@ RSU_BULK_TX_BE_BK
Definition: if_rsureg.h:816
@ RSU_BULK_TX_VI_VO
Definition: if_rsureg.h:817

Definition at line 286 of file if_rsu.c.

Referenced by rsu_fw_loadsection(), and rsu_tx_start().