FreeBSD kernel usb device Code
|
#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>
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_data * | upgt_getbuf (struct upgt_softc *) |
static struct upgt_data * | upgt_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 |
#define DPRINTF | ( | sc, | |
m, | |||
fmt, | |||
... | |||
) |
#define UPGT_DEV | ( | v, | |
p | |||
) | { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } |
|
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().
DRIVER_MODULE | ( | if_upgt | , |
uhub | , | ||
upgt_driver | , | ||
upgt_devclass | , | ||
NULL | , | ||
0 | |||
) |
MODULE_DEPEND | ( | if_upgt | , |
upgtfw_fw | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_DEPEND | ( | if_upgt | , |
usb | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_DEPEND | ( | if_upgt | , |
wlan | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_VERSION | ( | if_upgt | , |
1 | |||
) |
|
static |
|
static |
Definition at line 2020 of file if_upgt.c.
References upgt_abort_xfers_locked(), UPGT_LOCK, and UPGT_UNLOCK.
Referenced by upgt_attach().
|
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().
|
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().
|
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().
|
static |
Definition at line 242 of file if_upgt.c.
References dev, usb_attach_arg::device, device_set_usb_desc(), DPRINTF, error, upgt_softc::sc_debug, upgt_softc::sc_dev, upgt_softc::sc_ic, upgt_softc::sc_led_ch, upgt_softc::sc_memaddr_frame_end, upgt_softc::sc_memaddr_frame_start, upgt_softc::sc_memaddr_rx_start, upgt_softc::sc_mtx, upgt_softc::sc_rx_dma_buf, upgt_softc::sc_rxtap, upgt_softc::sc_snd, upgt_softc::sc_tx_dma_buf, upgt_softc::sc_txtap, upgt_softc::sc_udev, upgt_softc::sc_watchdog_ch, upgt_softc::sc_xfer, upgt_abort_xfers(), upgt_alloc_rx(), upgt_alloc_tx(), UPGT_BULK_RX, UPGT_BULK_TX, upgt_config, upgt_device_reset(), upgt_eeprom_parse(), upgt_eeprom_read(), upgt_free_rx(), upgt_free_tx(), upgt_fw_load(), upgt_fw_verify(), UPGT_IFACE_INDEX, upgt_mem_init(), UPGT_MEMSIZE_RX, UPGT_N_XFERS, upgt_parent(), upgt_raw_xmit(), UPGT_RX_RADIOTAP_PRESENT, upgt_scan_end(), upgt_scan_start(), upgt_set_channel(), upgt_sysctl_node(), upgt_transmit(), UPGT_TX_RADIOTAP_PRESENT, upgt_update_mcast(), upgt_vap_create(), upgt_vap_delete(), usbd_errstr(), usbd_transfer_setup(), usbd_transfer_unsetup(), usbd_xfer_get_frame_buffer(), upgt_rx_radiotap_header::wr_ihdr, and upgt_tx_radiotap_header::wt_ihdr.
|
static |
Definition at line 2207 of file if_upgt.c.
References data, error, upgt_data::m, next, upgt_data::ni, upgt_softc::sc_ic, upgt_softc::sc_rx_active, upgt_softc::sc_rx_inactive, UPGT_ASSERT_LOCKED, UPGT_LOCK, upgt_rxeof(), upgt_start(), UPGT_UNLOCK, USB_ERR_CANCELLED, USB_GET_STATE, USB_ST_SETUP, USB_ST_TRANSFERRED, usbd_transfer_submit(), usbd_xfer_set_frame_data(), usbd_xfer_set_stall(), and usbd_xfer_softc().
|
static |
Definition at line 1864 of file if_upgt.c.
References upgt_fw_bra_option::data, next, upgt_softc::sc_tx_pending, upgt_softc::sc_xfer, UPGT_ASSERT_LOCKED, UPGT_BULK_TX, UPGT_STAT_INC, and usbd_transfer_start().
Referenced by upgt_device_reset(), upgt_eeprom_read(), upgt_fw_load(), upgt_get_stats(), upgt_set_chan(), upgt_set_led(), upgt_set_macfilter(), and upgt_tx_start().
|
static |
Definition at line 2281 of file if_upgt.c.
References data, DPRINTF, error, next, upgt_softc::sc_tx_active, upgt_softc::sc_tx_inactive, upgt_softc::sc_tx_pending, UPGT_ASSERT_LOCKED, upgt_start(), UPGT_STAT_DEC, UPGT_STAT_INC, upgt_txeof(), USB_ERR_CANCELLED, USB_GET_STATE, USB_ST_SETUP, USB_ST_TRANSFERRED, usbd_transfer_submit(), usbd_xfer_set_frame_data(), usbd_xfer_set_stall(), and usbd_xfer_softc().
|
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().
|
static |
Definition at line 1652 of file if_upgt.c.
References upgt_fw_x2_header::crc, and size.
Referenced by upgt_fw_load().
|
static |
Definition at line 1933 of file if_upgt.c.
References dev, upgt_softc::sc_flags, upgt_softc::sc_ic, upgt_softc::sc_led_ch, upgt_softc::sc_mtx, upgt_softc::sc_rx_active, upgt_softc::sc_rx_inactive, upgt_softc::sc_snd, upgt_softc::sc_tx_active, upgt_softc::sc_tx_inactive, upgt_softc::sc_tx_pending, upgt_softc::sc_watchdog_ch, upgt_softc::sc_xfer, UPGT_FLAG_DETACHED, upgt_free_rx(), upgt_free_tx(), UPGT_LOCK, UPGT_N_XFERS, upgt_stop(), UPGT_UNLOCK, usbd_transfer_drain(), and usbd_transfer_unsetup().
|
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().
|
static |
Definition at line 1042 of file if_upgt.c.
References upgt_eeprom_option::data, DPRINTF, upgt_eeprom_option::len, upgt_eeprom_header::preamble_len, upgt_softc::sc_ic, upgt_eeprom_option::type, upgt_eeprom_parse_freq3(), upgt_eeprom_parse_freq4(), upgt_eeprom_parse_freq6(), upgt_eeprom_parse_hwrx(), UPGT_EEPROM_SIZE, UPGT_EEPROM_TYPE_CHIP, UPGT_EEPROM_TYPE_END, UPGT_EEPROM_TYPE_FREQ3, UPGT_EEPROM_TYPE_FREQ4, UPGT_EEPROM_TYPE_FREQ5, UPGT_EEPROM_TYPE_FREQ6, UPGT_EEPROM_TYPE_HWRX, UPGT_EEPROM_TYPE_MAC, UPGT_EEPROM_TYPE_NAME, UPGT_EEPROM_TYPE_OFF, and UPGT_EEPROM_TYPE_SERIAL.
Referenced by upgt_attach().
|
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().
|
static |
Definition at line 1184 of file if_upgt.c.
References upgt_lmac_freq4::cmd, data, DPRINTF, upgt_eeprom_freq4_header::elements, upgt_eeprom_freq4_header::flags, upgt_eeprom_freq4_1::freq, upgt_lmac_freq4::pad, upgt_softc::sc_eeprom_freq4, upgt_softc::sc_eeprom_freq6_settings, upgt_eeprom_freq4_header::settings, and UPGT_EEPROM_SIZE.
Referenced by upgt_eeprom_parse().
|
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().
|
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().
|
static |
Definition at line 1269 of file if_upgt.c.
References upgt_lmac_mem::addr, upgt_data::buf, upgt_data::buflen, upgt_lmac_mem::chksum, DPRINTF, error, upgt_lmac_h1::flags, upgt_lmac_h2::flags, upgt_lmac_eeprom::header1, upgt_lmac_eeprom::header2, upgt_lmac_h1::len, upgt_lmac_eeprom::len, offset, upgt_lmac_eeprom::offset, upgt_lmac_h2::reqid, upgt_softc::sc_dev, upgt_softc::sc_memaddr_frame_start, upgt_softc::sc_mtx, upgt_lmac_h1::type, upgt_lmac_h2::type, upgt_bulk_tx(), upgt_chksum_le(), UPGT_EEPROM_BLOCK_SIZE, UPGT_EEPROM_SIZE, upgt_getbuf(), UPGT_H1_TYPE_CTRL, UPGT_H2_TYPE_EEPROM, UPGT_LOCK, UPGT_MEMSIZE_FRAME_HEAD, UPGT_UNLOCK, and usb_pause_mtx().
Referenced by upgt_attach().
|
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().
|
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().
|
static |
Definition at line 1671 of file if_upgt.c.
References size.
Referenced by upgt_fw_load().
|
static |
Definition at line 1552 of file if_upgt.c.
References upgt_data::buf, upgt_data::buflen, upgt_fw_x2_header::crc, DPRINTF, error, fail, upgt_fw_x2_header::len, n, offset, upgt_softc::sc_dev, upgt_softc::sc_mtx, upgt_softc::sc_xfer, upgt_fw_x2_header::signature, upgt_fw_x2_header::startaddr, UPGT_BULK_RX, upgt_bulk_tx(), upgt_crc32_le(), UPGT_FW_BLOCK_SIZE, upgt_fw_copy(), upgt_fwname, upgt_getbuf(), UPGT_LOCK, UPGT_MEMADDR_FIRMWARE_START, UPGT_UNLOCK, UPGT_X2_SIGNATURE, UPGT_X2_SIGNATURE_SIZE, and usbd_transfer_start().
Referenced by upgt_attach().
|
static |
Definition at line 1734 of file if_upgt.c.
References upgt_fw_bra_option::data, DPRINTF, error, fail, upgt_fw_bra_option::len, upgt_fw_bra_descr::memaddr_space_end, upgt_fw_bra_descr::memaddr_space_start, offset, upgt_softc::sc_dev, upgt_softc::sc_fw_type, upgt_softc::sc_memaddr_frame_end, upgt_softc::sc_memaddr_frame_start, upgt_fw_bra_option::type, UPGT_BRA_FWTYPE_LM86, UPGT_BRA_FWTYPE_LM87, UPGT_BRA_FWTYPE_SIZE, UPGT_BRA_TYPE_DEPIF, UPGT_BRA_TYPE_DESCR, UPGT_BRA_TYPE_END, UPGT_BRA_TYPE_EXPIF, UPGT_BRA_TYPE_FW, UPGT_BRA_TYPE_VERSION, upgt_fwname, UPGT_FWTYPE_LM86, and UPGT_FWTYPE_LM87.
Referenced by upgt_attach().
|
static |
Definition at line 392 of file if_upgt.c.
References upgt_lmac_mem::addr, upgt_data::buf, upgt_data::buflen, upgt_lmac_mem::chksum, upgt_lmac_h1::flags, upgt_lmac_h2::flags, upgt_lmac_stats::header1, upgt_lmac_stats::header2, upgt_lmac_h1::len, upgt_lmac_h2::reqid, upgt_softc::sc_dev, upgt_softc::sc_memaddr_frame_start, upgt_lmac_h1::type, upgt_lmac_h2::type, upgt_bulk_tx(), upgt_chksum_le(), upgt_getbuf(), UPGT_H1_TYPE_CTRL, UPGT_H2_TYPE_STATS, and UPGT_MEMSIZE_FRAME_HEAD.
Referenced by upgt_tx_start().
|
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().
|
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().
|
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().
|
static |
Definition at line 227 of file if_upgt.c.
References usbd_lookup_info::bConfigIndex, usbd_lookup_info::bIfaceIndex, dev, usb_attach_arg::info, UPGT_CONFIG_INDEX, upgt_devs, UPGT_IFACE_INDEX, usb_attach_arg::usb_mode, USB_MODE_HOST, and usbd_lookup_id_by_uaa().
|
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().
|
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().
|
static |
Definition at line 1700 of file if_upgt.c.
References upgt_memory_page::addr, DPRINTF, upgt_memory::page, upgt_memory::pages, upgt_softc::sc_memaddr_frame_end, upgt_softc::sc_memaddr_frame_start, upgt_softc::sc_memory, UPGT_MEMORY_MAX_PAGES, and upgt_memory_page::used.
Referenced by upgt_attach().
|
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().
|
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().
|
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().
|
static |
Definition at line 1436 of file if_upgt.c.
References upgt_lmac_rx_desc::data, DPRINTF, upgt_lmac_rx_desc::rate, upgt_lmac_rx_desc::rssi, upgt_softc::sc_dev, upgt_softc::sc_flags, upgt_softc::sc_ic, upgt_softc::sc_rxtap, UPGT_FLAG_INITDONE, upgt_rx_rate(), upgt_rx_radiotap_header::wr_antsignal, upgt_rx_radiotap_header::wr_flags, and upgt_rx_radiotap_header::wr_rate.
Referenced by upgt_rxeof().
|
static |
Definition at line 1479 of file if_upgt.c.
References upgt_softc::sc_ic.
Referenced by upgt_rx().
|
static |
Definition at line 1341 of file if_upgt.c.
References data, DPRINTF, upgt_lmac_header::header1, upgt_lmac_header::header2, upgt_lmac_h1::len, upgt_lmac_eeprom::len, upgt_lmac_eeprom::offset, upgt_softc::sc_flags, upgt_lmac_h1::type, upgt_lmac_h2::type, UPGT_ASSERT_LOCKED, UPGT_FLAG_FWLOADED, UPGT_H1_TYPE_CTRL, UPGT_H1_TYPE_RX_DATA, UPGT_H1_TYPE_RX_DATA_MGMT, UPGT_H2_TYPE_EEPROM, UPGT_H2_TYPE_STATS, UPGT_H2_TYPE_TX_DONE, upgt_rx(), UPGT_RX_MINSZ, upgt_tx_done(), usbd_xfer_softc(), and usbd_xfer_status().
Referenced by upgt_bulk_rx_callback().
|
static |
Definition at line 865 of file if_upgt.c.
Referenced by upgt_attach().
|
static |
Definition at line 859 of file if_upgt.c.
Referenced by upgt_attach().
|
static |
Definition at line 881 of file if_upgt.c.
References upgt_lmac_mem::addr, upgt_data::buf, upgt_data::buflen, chan, upgt_lmac_mem::chksum, upgt_lmac_freq3::data, DPRINTF, upgt_softc::sc_dev, upgt_softc::sc_eeprom_freq3, upgt_softc::sc_eeprom_freq4, upgt_softc::sc_eeprom_freq6, upgt_softc::sc_eeprom_freq6_settings, upgt_softc::sc_ic, upgt_softc::sc_memaddr_frame_start, UPGT_ASSERT_LOCKED, upgt_bulk_tx(), UPGT_CHANNEL_UNKNOWN1, UPGT_CHANNEL_UNKNOWN2, UPGT_CHANNEL_UNKNOWN3, upgt_chksum_le(), upgt_getbuf(), UPGT_H1_FLAGS_TX_NO_CALLBACK, UPGT_H1_TYPE_CTRL, UPGT_H2_TYPE_CHANNEL, and UPGT_MEMSIZE_FRAME_HEAD.
Referenced by upgt_newstate(), and upgt_set_channel().
|
static |
Definition at line 871 of file if_upgt.c.
References UPGT_LOCK, upgt_set_chan(), and UPGT_UNLOCK.
Referenced by upgt_attach().
|
static |
Definition at line 473 of file if_upgt.c.
References upgt_lmac_led::action_fix, upgt_lmac_led::action_tmp, upgt_lmac_led::action_tmp_dur, upgt_lmac_mem::addr, upgt_data::buf, upgt_data::buflen, upgt_lmac_mem::chksum, upgt_lmac_h1::flags, upgt_lmac_h2::flags, upgt_lmac_led::header1, upgt_lmac_led::header2, upgt_lmac_h1::len, upgt_lmac_led::mode, next, upgt_lmac_h2::reqid, upgt_softc::sc_dev, upgt_softc::sc_led_blink, upgt_softc::sc_led_ch, upgt_softc::sc_memaddr_frame_start, upgt_softc::sc_state, upgt_softc::sc_tx_inactive, upgt_lmac_h1::type, upgt_lmac_h2::type, upgt_bulk_tx(), upgt_chksum_le(), upgt_getbuf(), UPGT_H1_FLAGS_TX_NO_CALLBACK, UPGT_H1_TYPE_CTRL, UPGT_H2_TYPE_LED, UPGT_LED_ACTION_OFF, UPGT_LED_ACTION_ON, UPGT_LED_ACTION_TMP_DUR, UPGT_LED_BLINK, UPGT_LED_MODE_SET, UPGT_LED_OFF, UPGT_LED_ON, UPGT_MEMSIZE_FRAME_HEAD, and upgt_set_led_blink().
Referenced by upgt_newstate(), and upgt_tx_start().
|
static |
Definition at line 551 of file if_upgt.c.
References upgt_softc::sc_led_blink.
Referenced by upgt_set_led().
|
static |
Definition at line 578 of file if_upgt.c.
References upgt_lmac_mem::addr, upgt_data::buf, upgt_data::buflen, upgt_lmac_mem::chksum, DPRINTF, upgt_lmac_filter::dst, upgt_lmac_h1::flags, upgt_lmac_h2::flags, upgt_lmac_filter::header1, upgt_lmac_filter::header2, upgt_lmac_h1::len, upgt_lmac_h2::reqid, upgt_lmac_filter::rxaddr, upgt_lmac_filter::rxhw, upgt_softc::sc_dev, upgt_softc::sc_eeprom_hwrx, upgt_softc::sc_ic, upgt_softc::sc_memaddr_frame_start, upgt_softc::sc_memaddr_rx_start, upgt_lmac_filter::src, state, upgt_lmac_h1::type, upgt_lmac_h2::type, upgt_lmac_filter::type, upgt_lmac_filter::unknown1, upgt_lmac_filter::unknown2, upgt_lmac_filter::unknown3, UPGT_ASSERT_LOCKED, upgt_bulk_tx(), upgt_chksum_le(), UPGT_FILTER_MONITOR_UNKNOWN1, UPGT_FILTER_MONITOR_UNKNOWN2, UPGT_FILTER_MONITOR_UNKNOWN3, UPGT_FILTER_TYPE_MONITOR, UPGT_FILTER_TYPE_NONE, UPGT_FILTER_TYPE_RESET, UPGT_FILTER_TYPE_STA, UPGT_FILTER_UNKNOWN1, UPGT_FILTER_UNKNOWN2, UPGT_FILTER_UNKNOWN3, upgt_getbuf(), UPGT_H1_FLAGS_TX_NO_CALLBACK, UPGT_H1_TYPE_CTRL, UPGT_H2_TYPE_MACFILTER, and UPGT_MEMSIZE_FRAME_HEAD.
Referenced by upgt_init(), upgt_newstate(), and upgt_stop().
|
static |
Definition at line 729 of file if_upgt.c.
Referenced by upgt_parent(), and upgt_update_mcast().
|
static |
Definition at line 682 of file if_upgt.c.
References upgt_softc::sc_cur_rateset.
Referenced by upgt_vap_create().
|
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().
|
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().
|
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().
|
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().
|
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().
|
static |
Definition at line 2110 of file if_upgt.c.
References upgt_lmac_mem::addr, upgt_lmac_mem::chksum, data, DPRINTF, error, upgt_lmac_h1::flags, upgt_lmac_h2::flags, upgt_lmac_tx_desc::header1, upgt_lmac_tx_desc::header2, k, len, upgt_lmac_h1::len, upgt_lmac_tx_desc::pad3, upgt_lmac_tx_desc::rates, upgt_lmac_h2::reqid, upgt_softc::sc_cur_rateset, upgt_softc::sc_dev, upgt_softc::sc_txtap, upgt_lmac_h1::type, upgt_lmac_h2::type, upgt_lmac_tx_desc::type, UPGT_ASSERT_LOCKED, upgt_bulk_tx(), upgt_chksum_le(), upgt_get_stats(), UPGT_H1_FLAGS_TX_DATA, UPGT_H1_FLAGS_TX_MGMT, UPGT_H1_TYPE_TX_DATA, UPGT_H2_FLAGS_TX_ACK_YES, UPGT_H2_TYPE_TX_ACK_YES, UPGT_LED_BLINK, upgt_set_led(), UPGT_TX_DESC_PAD3_SIZE, UPGT_TX_DESC_TYPE_DATA, UPGT_TX_STAT_INTERVAL, upgt_tx_radiotap_header::wt_flags, and upgt_tx_radiotap_header::wt_rate.
Referenced by upgt_raw_xmit(), and upgt_start().
Definition at line 380 of file if_upgt.c.
References data.
Referenced by upgt_bulk_tx_callback().
|
static |
Definition at line 1034 of file if_upgt.c.
References upgt_set_multi().
Referenced by upgt_attach().
|
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().
|
static |
Definition at line 1025 of file if_upgt.c.
References UPGT_VAP, and upgt_vap::vap.
Referenced by upgt_attach().
|
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().
USB_PNP_HOST_INFO | ( | upgt_devs | ) |
|
static |
|
static |
|
static |
Definition at line 200 of file if_upgt.c.
Referenced by upgt_attach().
|
static |
Definition at line 174 of file if_upgt.c.
Referenced by upgt_match().
|
static |
|
static |
Definition at line 172 of file if_upgt.c.
Referenced by upgt_fw_load(), and upgt_fw_verify().
|
static |