FreeBSD kernel usb device Code
if_upgt.c File Reference
#include "opt_wlan.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/endian.h>
#include <sys/firmware.h>
#include <sys/linker.h>
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/sysctl.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 <sys/bus.h>
#include <net80211/ieee80211_var.h>
#include <net80211/ieee80211_phy.h>
#include <net80211/ieee80211_radiotap.h>
#include <net80211/ieee80211_regdomain.h>
#include <net/bpf.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include "usbdevs.h"
#include <dev/usb/wlan/if_upgtvar.h>
Include dependency graph for if_upgt.c:

Go to the source code of this file.

Macros

#define DPRINTF(sc, m, fmt, ...)
 
#define UPGT_DEV(v, p)   { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) }
 
#define UPGT_SYSCTL_STAT_ADD32(c, h, n, p, d)    SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d)
 

Functions

static SYSCTL_NODE (_hw, OID_AUTO, upgt, CTLFLAG_RD|CTLFLAG_MPSAFE, 0, "USB PrismGT GW3887 driver parameters")
 
static int upgt_alloc_tx (struct upgt_softc *)
 
static int upgt_alloc_rx (struct upgt_softc *)
 
static int upgt_device_reset (struct upgt_softc *)
 
static void upgt_bulk_tx (struct upgt_softc *, struct upgt_data *)
 
static int upgt_fw_verify (struct upgt_softc *)
 
static int upgt_mem_init (struct upgt_softc *)
 
static int upgt_fw_load (struct upgt_softc *)
 
static int upgt_fw_copy (const uint8_t *, char *, int)
 
static uint32_t upgt_crc32_le (const void *, size_t)
 
static struct mbuf * upgt_rxeof (struct usb_xfer *, struct upgt_data *, int *)
 
static struct mbuf * upgt_rx (struct upgt_softc *, uint8_t *, int, int *)
 
static void upgt_txeof (struct usb_xfer *, struct upgt_data *)
 
static int upgt_eeprom_read (struct upgt_softc *)
 
static int upgt_eeprom_parse (struct upgt_softc *)
 
static void upgt_eeprom_parse_hwrx (struct upgt_softc *, uint8_t *)
 
static void upgt_eeprom_parse_freq3 (struct upgt_softc *, uint8_t *, int)
 
static void upgt_eeprom_parse_freq4 (struct upgt_softc *, uint8_t *, int)
 
static void upgt_eeprom_parse_freq6 (struct upgt_softc *, uint8_t *, int)
 
static uint32_t upgt_chksum_le (const uint32_t *, size_t)
 
static void upgt_tx_done (struct upgt_softc *, uint8_t *)
 
static void upgt_init (struct upgt_softc *)
 
static void upgt_parent (struct ieee80211com *)
 
static int upgt_transmit (struct ieee80211com *, struct mbuf *)
 
static void upgt_start (struct upgt_softc *)
 
static int upgt_raw_xmit (struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *)
 
static void upgt_scan_start (struct ieee80211com *)
 
static void upgt_scan_end (struct ieee80211com *)
 
static void upgt_set_channel (struct ieee80211com *)
 
static struct ieee80211vap * upgt_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 upgt_vap_delete (struct ieee80211vap *)
 
static void upgt_update_mcast (struct ieee80211com *)
 
static uint8_t upgt_rx_rate (struct upgt_softc *, const int)
 
static void upgt_set_multi (void *)
 
static void upgt_stop (struct upgt_softc *)
 
static void upgt_setup_rates (struct ieee80211vap *, struct ieee80211com *)
 
static int upgt_set_macfilter (struct upgt_softc *, uint8_t)
 
static int upgt_newstate (struct ieee80211vap *, enum ieee80211_state, int)
 
static void upgt_set_chan (struct upgt_softc *, struct ieee80211_channel *)
 
static void upgt_set_led (struct upgt_softc *, int)
 
static void upgt_set_led_blink (void *)
 
static void upgt_get_stats (struct upgt_softc *)
 
static void upgt_mem_free (struct upgt_softc *, uint32_t)
 
static uint32_t upgt_mem_alloc (struct upgt_softc *)
 
static void upgt_free_tx (struct upgt_softc *)
 
static void upgt_free_rx (struct upgt_softc *)
 
static void upgt_watchdog (void *)
 
static void upgt_abort_xfers (struct upgt_softc *)
 
static void upgt_abort_xfers_locked (struct upgt_softc *)
 
static void upgt_sysctl_node (struct upgt_softc *)
 
static struct upgt_dataupgt_getbuf (struct upgt_softc *)
 
static struct upgt_dataupgt_gettxbuf (struct upgt_softc *)
 
static int upgt_tx_start (struct upgt_softc *, struct mbuf *, struct ieee80211_node *, struct upgt_data *)
 
static int upgt_match (device_t dev)
 
static int upgt_attach (device_t dev)
 
static int upgt_detach (device_t dev)
 
static struct upgt_data_upgt_getbuf (struct upgt_softc *sc)
 
static void upgt_bulk_rx_callback (struct usb_xfer *xfer, usb_error_t error)
 
static void upgt_bulk_tx_callback (struct usb_xfer *xfer, usb_error_t error)
 
 DRIVER_MODULE (if_upgt, uhub, upgt_driver, upgt_devclass, NULL, 0)
 
 MODULE_VERSION (if_upgt, 1)
 
 MODULE_DEPEND (if_upgt, usb, 1, 1, 1)
 
 MODULE_DEPEND (if_upgt, wlan, 1, 1, 1)
 
 MODULE_DEPEND (if_upgt, upgtfw_fw, 1, 1, 1)
 
 USB_PNP_HOST_INFO (upgt_devs)
 

Variables

static device_probe_t upgt_match
 
static device_attach_t upgt_attach
 
static device_detach_t upgt_detach
 
static const char * upgt_fwname = "upgt-gw3887"
 
static const STRUCT_USB_HOST_ID upgt_devs []
 
static usb_callback_t upgt_bulk_rx_callback
 
static usb_callback_t upgt_bulk_tx_callback
 
static const struct usb_config upgt_config [UPGT_N_XFERS]
 
static device_method_t upgt_methods []
 
static driver_t upgt_driver
 
static devclass_t upgt_devclass
 

Macro Definition Documentation

◆ DPRINTF

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

Definition at line 99 of file if_upgt.c.

◆ UPGT_DEV

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

◆ UPGT_SYSCTL_STAT_ADD32

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

Definition at line 2028 of file if_upgt.c.

Function Documentation

◆ _upgt_getbuf()

static struct upgt_data * _upgt_getbuf ( struct upgt_softc sc)
static

Definition at line 2057 of file if_upgt.c.

References DPRINTF, next, upgt_softc::sc_tx_inactive, and UPGT_STAT_DEC.

Referenced by upgt_getbuf().

Here is the caller graph for this function:

◆ DRIVER_MODULE()

DRIVER_MODULE ( if_upgt  ,
uhub  ,
upgt_driver  ,
upgt_devclass  ,
NULL  ,
 
)

◆ MODULE_DEPEND() [1/3]

MODULE_DEPEND ( if_upgt  ,
upgtfw_fw  ,
,
,
 
)

◆ MODULE_DEPEND() [2/3]

MODULE_DEPEND ( if_upgt  ,
usb  ,
,
,
 
)

◆ MODULE_DEPEND() [3/3]

MODULE_DEPEND ( if_upgt  ,
wlan  ,
,
,
 
)

◆ MODULE_VERSION()

MODULE_VERSION ( if_upgt  ,
 
)

◆ SYSCTL_NODE()

static SYSCTL_NODE ( _hw  ,
OID_AUTO  ,
upgt  ,
CTLFLAG_RD|  CTLFLAG_MPSAFE,
,
"USB PrismGT GW3887 driver parameters"   
)
static

◆ upgt_abort_xfers()

static void upgt_abort_xfers ( struct upgt_softc sc)
static

Definition at line 2020 of file if_upgt.c.

References upgt_abort_xfers_locked(), UPGT_LOCK, and UPGT_UNLOCK.

Referenced by upgt_attach().

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

◆ upgt_abort_xfers_locked()

static void upgt_abort_xfers_locked ( struct upgt_softc sc)
static

Definition at line 2009 of file if_upgt.c.

References upgt_softc::sc_xfer, UPGT_ASSERT_LOCKED, UPGT_N_XFERS, and usbd_transfer_stop().

Referenced by upgt_abort_xfers(), and upgt_stop().

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

◆ upgt_alloc_rx()

static int upgt_alloc_rx ( struct upgt_softc sc)
static

Definition at line 1917 of file if_upgt.c.

References data, next, upgt_softc::sc_rx_active, upgt_softc::sc_rx_data, upgt_softc::sc_rx_dma_buf, upgt_softc::sc_rx_inactive, and UPGT_RX_MAXCOUNT.

Referenced by upgt_attach().

Here is the caller graph for this function:

◆ upgt_alloc_tx()

static int upgt_alloc_tx ( struct upgt_softc sc)
static

Definition at line 1898 of file if_upgt.c.

References data, next, upgt_softc::sc_tx_active, upgt_softc::sc_tx_data, upgt_softc::sc_tx_dma_buf, upgt_softc::sc_tx_inactive, upgt_softc::sc_tx_pending, UPGT_STAT_INC, and UPGT_TX_MAXCOUNT.

Referenced by upgt_attach().

Here is the caller graph for this function:

◆ upgt_attach()

◆ upgt_bulk_rx_callback()

◆ upgt_bulk_tx()

static void upgt_bulk_tx ( struct upgt_softc sc,
struct upgt_data data 
)
static

◆ upgt_bulk_tx_callback()

◆ upgt_chksum_le()

static uint32_t upgt_chksum_le ( const uint32_t *  buf,
size_t  size 
)
static

Definition at line 1422 of file if_upgt.c.

References size.

Referenced by upgt_eeprom_read(), upgt_get_stats(), upgt_set_chan(), upgt_set_led(), upgt_set_macfilter(), and upgt_tx_start().

Here is the caller graph for this function:

◆ upgt_crc32_le()

static uint32_t upgt_crc32_le ( const void *  buf,
size_t  size 
)
static

Definition at line 1652 of file if_upgt.c.

References upgt_fw_x2_header::crc, and size.

Referenced by upgt_fw_load().

Here is the caller graph for this function:

◆ upgt_detach()

◆ upgt_device_reset()

static int upgt_device_reset ( struct upgt_softc sc)
static

Definition at line 1875 of file if_upgt.c.

References data, DPRINTF, upgt_softc::sc_mtx, upgt_bulk_tx(), upgt_getbuf(), UPGT_LOCK, UPGT_UNLOCK, and usb_pause_mtx().

Referenced by upgt_attach().

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

◆ upgt_eeprom_parse()

◆ upgt_eeprom_parse_freq3()

static void upgt_eeprom_parse_freq3 ( struct upgt_softc sc,
uint8_t *  data,
int  len 
)
static

Definition at line 1150 of file if_upgt.c.

References data, DPRINTF, upgt_eeprom_freq3_header::elements, upgt_eeprom_freq3_header::flags, upgt_lmac_freq3::freq, upgt_softc::sc_eeprom_freq3, and UPGT_EEPROM_SIZE.

Referenced by upgt_eeprom_parse().

Here is the caller graph for this function:

◆ upgt_eeprom_parse_freq4()

void upgt_eeprom_parse_freq4 ( struct upgt_softc sc,
uint8_t *  data,
int  len 
)
static

◆ upgt_eeprom_parse_freq6()

void upgt_eeprom_parse_freq6 ( struct upgt_softc sc,
uint8_t *  data,
int  len 
)
static

Definition at line 1228 of file if_upgt.c.

References upgt_lmac_freq6::data, DPRINTF, upgt_lmac_freq6::freq, len, upgt_softc::sc_eeprom_freq6, and UPGT_EEPROM_SIZE.

Referenced by upgt_eeprom_parse().

Here is the caller graph for this function:

◆ upgt_eeprom_parse_hwrx()

static void upgt_eeprom_parse_hwrx ( struct upgt_softc sc,
uint8_t *  data 
)
static

Definition at line 1256 of file if_upgt.c.

References data, DPRINTF, upgt_eeprom_option_hwrx::rxfilter, upgt_softc::sc_eeprom_hwrx, and UPGT_EEPROM_RX_CONST.

Referenced by upgt_eeprom_parse().

Here is the caller graph for this function:

◆ upgt_eeprom_read()

◆ upgt_free_rx()

static void upgt_free_rx ( struct upgt_softc sc)
static

Definition at line 1980 of file if_upgt.c.

References data, upgt_softc::sc_rx_data, and UPGT_RX_MAXCOUNT.

Referenced by upgt_attach(), and upgt_detach().

Here is the caller graph for this function:

◆ upgt_free_tx()

static void upgt_free_tx ( struct upgt_softc sc)
static

Definition at line 1993 of file if_upgt.c.

References data, upgt_softc::sc_tx_data, and UPGT_TX_MAXCOUNT.

Referenced by upgt_attach(), and upgt_detach().

Here is the caller graph for this function:

◆ upgt_fw_copy()

static int upgt_fw_copy ( const uint8_t *  src,
char *  dst,
int  size 
)
static

Definition at line 1671 of file if_upgt.c.

References size.

Referenced by upgt_fw_load().

Here is the caller graph for this function:

◆ upgt_fw_load()

◆ upgt_fw_verify()

◆ upgt_get_stats()

◆ upgt_getbuf()

static struct upgt_data * upgt_getbuf ( struct upgt_softc sc)
static

Definition at line 2074 of file if_upgt.c.

References _upgt_getbuf(), DPRINTF, and UPGT_ASSERT_LOCKED.

Referenced by upgt_device_reset(), upgt_eeprom_read(), upgt_fw_load(), upgt_get_stats(), upgt_gettxbuf(), upgt_set_chan(), upgt_set_led(), and upgt_set_macfilter().

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

◆ upgt_gettxbuf()

static struct upgt_data * upgt_gettxbuf ( struct upgt_softc sc)
static

Definition at line 2088 of file if_upgt.c.

References upgt_data::addr, DPRINTF, next, upgt_softc::sc_tx_inactive, UPGT_ASSERT_LOCKED, upgt_getbuf(), upgt_mem_alloc(), and UPGT_STAT_INC.

Referenced by upgt_raw_xmit(), and upgt_start().

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

◆ upgt_init()

static void upgt_init ( struct upgt_softc sc)
static

Definition at line 560 of file if_upgt.c.

References upgt_softc::sc_flags, upgt_softc::sc_watchdog_ch, upgt_softc::sc_xfer, UPGT_ASSERT_LOCKED, UPGT_BULK_RX, UPGT_FLAG_INITDONE, upgt_set_macfilter(), upgt_stop(), upgt_watchdog(), and usbd_transfer_start().

Referenced by upgt_parent().

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

◆ upgt_match()

static int upgt_match ( device_t  dev)
static

◆ upgt_mem_alloc()

static uint32_t upgt_mem_alloc ( struct upgt_softc sc)
static

Definition at line 844 of file if_upgt.c.

References upgt_memory_page::addr, upgt_memory::page, upgt_memory::pages, upgt_softc::sc_memory, and upgt_memory_page::used.

Referenced by upgt_gettxbuf().

Here is the caller graph for this function:

◆ upgt_mem_free()

static void upgt_mem_free ( struct upgt_softc sc,
uint32_t  addr 
)
static

Definition at line 1536 of file if_upgt.c.

References upgt_data::addr, upgt_memory_page::addr, upgt_memory::page, upgt_memory::pages, upgt_softc::sc_dev, upgt_softc::sc_memory, and upgt_memory_page::used.

Referenced by upgt_tx_done().

Here is the caller graph for this function:

◆ upgt_mem_init()

static int upgt_mem_init ( struct upgt_softc sc)
static

◆ upgt_newstate()

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

Definition at line 984 of file if_upgt.c.

References upgt_vap::newstate, upgt_softc::sc_led_ch, upgt_softc::sc_state, upgt_softc::sc_watchdog_ch, UPGT_LED_OFF, UPGT_LED_ON, UPGT_LOCK, upgt_set_chan(), upgt_set_led(), upgt_set_macfilter(), UPGT_UNLOCK, UPGT_VAP, and upgt_vap::vap.

Referenced by upgt_vap_create().

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

◆ upgt_parent()

static void upgt_parent ( struct ieee80211com *  ic)
static

Definition at line 433 of file if_upgt.c.

References upgt_softc::sc_flags, UPGT_FLAG_DETACHED, UPGT_FLAG_INITDONE, upgt_init(), UPGT_LOCK, upgt_set_multi(), upgt_stop(), and UPGT_UNLOCK.

Referenced by upgt_attach().

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

◆ upgt_raw_xmit()

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

Definition at line 792 of file if_upgt.c.

References upgt_data::m, next, upgt_data::ni, upgt_softc::sc_flags, upgt_softc::sc_tx_inactive, upgt_softc::sc_tx_timer, UPGT_FLAG_INITDONE, upgt_gettxbuf(), UPGT_LOCK, UPGT_STAT_INC, upgt_tx_start(), and UPGT_UNLOCK.

Referenced by upgt_attach().

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

◆ upgt_rx()

static struct mbuf * upgt_rx ( struct upgt_softc sc,
uint8_t *  data,
int  pkglen,
int *  rssi 
)
static

◆ upgt_rx_rate()

static uint8_t upgt_rx_rate ( struct upgt_softc sc,
const int  rate 
)
static

Definition at line 1479 of file if_upgt.c.

References upgt_softc::sc_ic.

Referenced by upgt_rx().

Here is the caller graph for this function:

◆ upgt_rxeof()

◆ upgt_scan_end()

static void upgt_scan_end ( struct ieee80211com *  ic)
static

Definition at line 865 of file if_upgt.c.

Referenced by upgt_attach().

Here is the caller graph for this function:

◆ upgt_scan_start()

static void upgt_scan_start ( struct ieee80211com *  ic)
static

Definition at line 859 of file if_upgt.c.

Referenced by upgt_attach().

Here is the caller graph for this function:

◆ upgt_set_chan()

◆ upgt_set_channel()

static void upgt_set_channel ( struct ieee80211com *  ic)
static

Definition at line 871 of file if_upgt.c.

References UPGT_LOCK, upgt_set_chan(), and UPGT_UNLOCK.

Referenced by upgt_attach().

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

◆ upgt_set_led()

◆ upgt_set_led_blink()

static void upgt_set_led_blink ( void *  arg)
static

Definition at line 551 of file if_upgt.c.

References upgt_softc::sc_led_blink.

Referenced by upgt_set_led().

Here is the caller graph for this function:

◆ upgt_set_macfilter()

◆ upgt_set_multi()

static void upgt_set_multi ( void *  arg)
static

Definition at line 729 of file if_upgt.c.

Referenced by upgt_parent(), and upgt_update_mcast().

Here is the caller graph for this function:

◆ upgt_setup_rates()

static void upgt_setup_rates ( struct ieee80211vap *  vap,
struct ieee80211com *  ic 
)
static

Definition at line 682 of file if_upgt.c.

References upgt_softc::sc_cur_rateset.

Referenced by upgt_vap_create().

Here is the caller graph for this function:

◆ upgt_start()

static void upgt_start ( struct upgt_softc sc)
static

Definition at line 758 of file if_upgt.c.

References next, upgt_softc::sc_flags, upgt_softc::sc_snd, upgt_softc::sc_tx_inactive, upgt_softc::sc_tx_timer, UPGT_ASSERT_LOCKED, UPGT_FLAG_INITDONE, upgt_gettxbuf(), UPGT_STAT_INC, and upgt_tx_start().

Referenced by upgt_bulk_rx_callback(), upgt_bulk_tx_callback(), upgt_transmit(), and upgt_tx_done().

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

◆ upgt_stop()

static void upgt_stop ( struct upgt_softc sc)
static

Definition at line 459 of file if_upgt.c.

References upgt_softc::sc_flags, upgt_softc::sc_tx_timer, upgt_abort_xfers_locked(), UPGT_ASSERT_LOCKED, UPGT_FLAG_INITDONE, and upgt_set_macfilter().

Referenced by upgt_detach(), upgt_init(), and upgt_parent().

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

◆ upgt_sysctl_node()

static void upgt_sysctl_node ( struct upgt_softc sc)
static

Definition at line 2032 of file if_upgt.c.

References child, upgt_softc::sc_dev, upgt_softc::sc_stat, upgt_stat::st_tx_active, upgt_stat::st_tx_inactive, upgt_stat::st_tx_pending, and UPGT_SYSCTL_STAT_ADD32.

Referenced by upgt_attach().

Here is the caller graph for this function:

◆ upgt_transmit()

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

Definition at line 736 of file if_upgt.c.

References error, upgt_softc::sc_flags, upgt_softc::sc_snd, UPGT_FLAG_INITDONE, UPGT_LOCK, upgt_start(), and UPGT_UNLOCK.

Referenced by upgt_attach().

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

◆ upgt_tx_done()

static void upgt_tx_done ( struct upgt_softc sc,
uint8_t *  data 
)
static

Definition at line 1498 of file if_upgt.c.

References upgt_data::addr, data, desc, DPRINTF, upgt_data::m, upgt_data::ni, upgt_softc::sc_tx_data, upgt_softc::sc_tx_timer, UPGT_ASSERT_LOCKED, UPGT_LOCK, upgt_mem_free(), upgt_start(), UPGT_TX_MAXCOUNT, and UPGT_UNLOCK.

Referenced by upgt_rxeof().

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

◆ upgt_tx_start()

◆ upgt_txeof()

static void upgt_txeof ( struct usb_xfer xfer,
struct upgt_data data 
)
static

Definition at line 380 of file if_upgt.c.

References data.

Referenced by upgt_bulk_tx_callback().

Here is the caller graph for this function:

◆ upgt_update_mcast()

static void upgt_update_mcast ( struct ieee80211com *  ic)
static

Definition at line 1034 of file if_upgt.c.

References upgt_set_multi().

Referenced by upgt_attach().

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

◆ upgt_vap_create()

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

Definition at line 948 of file if_upgt.c.

References name, upgt_vap::newstate, upgt_newstate(), upgt_setup_rates(), and upgt_vap::vap.

Referenced by upgt_attach().

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

◆ upgt_vap_delete()

static void upgt_vap_delete ( struct ieee80211vap *  vap)
static

Definition at line 1025 of file if_upgt.c.

References UPGT_VAP, and upgt_vap::vap.

Referenced by upgt_attach().

Here is the caller graph for this function:

◆ upgt_watchdog()

static void upgt_watchdog ( void *  arg)
static

Definition at line 827 of file if_upgt.c.

References upgt_softc::sc_dev, upgt_softc::sc_ic, upgt_softc::sc_tx_timer, upgt_softc::sc_watchdog_ch, and upgt_watchdog().

Referenced by upgt_init(), and upgt_watchdog().

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

◆ USB_PNP_HOST_INFO()

USB_PNP_HOST_INFO ( upgt_devs  )

Variable Documentation

◆ upgt_attach

device_attach_t upgt_attach
static

Definition at line 108 of file if_upgt.c.

◆ upgt_bulk_rx_callback

usb_callback_t upgt_bulk_rx_callback
static

Definition at line 197 of file if_upgt.c.

◆ upgt_bulk_tx_callback

usb_callback_t upgt_bulk_tx_callback
static

Definition at line 198 of file if_upgt.c.

◆ upgt_config

const struct usb_config upgt_config[UPGT_N_XFERS]
static
Initial value:
= {
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
.bufsize = MCLBYTES * UPGT_TX_MAXCOUNT,
.flags = {
.force_short_xfer = 1,
.pipe_bof = 1
},
.callback = upgt_bulk_tx_callback,
.timeout = UPGT_USB_TIMEOUT,
},
.type = UE_BULK,
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_IN,
.bufsize = MCLBYTES * UPGT_RX_MAXCOUNT,
.flags = {
.pipe_bof = 1,
.short_xfer_ok = 1
},
.callback = upgt_bulk_rx_callback,
},
}
static usb_callback_t upgt_bulk_rx_callback
Definition: if_upgt.c:197
static usb_callback_t upgt_bulk_tx_callback
Definition: if_upgt.c:198
#define UPGT_TX_MAXCOUNT
Definition: if_upgtvar.h:41
#define UPGT_RX_MAXCOUNT
Definition: if_upgtvar.h:40
#define UPGT_USB_TIMEOUT
Definition: if_upgtvar.h:33
@ UPGT_BULK_TX
Definition: if_upgtvar.h:27
@ UPGT_BULK_RX
Definition: if_upgtvar.h:26
#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 200 of file if_upgt.c.

Referenced by upgt_attach().

◆ upgt_detach

device_detach_t upgt_detach
static

Definition at line 109 of file if_upgt.c.

◆ upgt_devclass

devclass_t upgt_devclass
static

Definition at line 2347 of file if_upgt.c.

◆ upgt_devs

const STRUCT_USB_HOST_ID upgt_devs[]
static
Initial value:
= {
#define UPGT_DEV(v,p)
UPGT_DEV(ACCTON, PRISM_GT),
UPGT_DEV(BELKIN, F5D7050),
UPGT_DEV(CISCOLINKSYS, WUSB54AG),
UPGT_DEV(CONCEPTRONIC, PRISM_GT),
UPGT_DEV(DELL, PRISM_GT_1),
UPGT_DEV(DELL, PRISM_GT_2),
UPGT_DEV(FSC, E5400),
UPGT_DEV(GLOBESPAN, PRISM_GT_1),
UPGT_DEV(GLOBESPAN, PRISM_GT_2),
UPGT_DEV(NETGEAR, WG111V1_2),
UPGT_DEV(INTERSIL, PRISM_GT),
UPGT_DEV(SMC, 2862WG),
UPGT_DEV(USR, USR5422),
UPGT_DEV(WISTRONNEWEB, UR045G),
UPGT_DEV(XYRATEX, PRISM_GT_1),
UPGT_DEV(XYRATEX, PRISM_GT_2),
UPGT_DEV(ZCOM, XG703A),
}
#define UPGT_DEV(v, p)

Definition at line 174 of file if_upgt.c.

Referenced by upgt_match().

◆ upgt_driver

driver_t upgt_driver
static
Initial value:
= {
.name = "upgt",
.methods = upgt_methods,
.size = sizeof(struct upgt_softc)
}
static device_method_t upgt_methods[]
Definition: if_upgt.c:2333

Definition at line 2341 of file if_upgt.c.

◆ upgt_fwname

const char* upgt_fwname = "upgt-gw3887"
static

Definition at line 172 of file if_upgt.c.

Referenced by upgt_fw_load(), and upgt_fw_verify().

◆ upgt_match

device_probe_t upgt_match
static

Definition at line 107 of file if_upgt.c.

◆ upgt_methods

device_method_t upgt_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, upgt_match),
DEVMETHOD(device_attach, upgt_attach),
DEVMETHOD(device_detach, upgt_detach),
DEVMETHOD_END
}
static device_detach_t upgt_detach
Definition: if_upgt.c:109
static device_probe_t upgt_match
Definition: if_upgt.c:107
static device_attach_t upgt_attach
Definition: if_upgt.c:108

Definition at line 2333 of file if_upgt.c.