FreeBSD kernel usb device Code
|
#include <sys/cdefs.h>
#include "opt_wlan.h"
#include <sys/param.h>
#include <sys/sockio.h>
#include <sys/sysctl.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/condvar.h>
#include <sys/mbuf.h>
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/endian.h>
#include <sys/kdb.h>
#include <net/bpf.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_arp.h>
#include <net/ethernet.h>
#include <net/if_dl.h>
#include <net/if_media.h>
#include <net/if_types.h>
#include <net80211/ieee80211_var.h>
#include <net80211/ieee80211_regdomain.h>
#include <net80211/ieee80211_radiotap.h>
#include <net80211/ieee80211_ratectl.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdi_util.h>
#include "usbdevs.h"
#include <dev/usb/wlan/if_zydreg.h>
#include <dev/usb/wlan/if_zydfw.h>
Go to the source code of this file.
Macros | |
#define | DPRINTF(sc, m, fmt, ...) |
#define | zyd_do_request(sc, req, data) usbd_do_request_flags((sc)->sc_udev, &(sc)->sc_mtx, req, data, 0, NULL, 5000) |
#define | ZYD_ZD1211 0 |
#define | ZYD_ZD1211B 1 |
#define | ZYD_ZD1211_DEV(v, p) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, ZYD_ZD1211) } |
#define | ZYD_ZD1211B_DEV(v, p) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, ZYD_ZD1211B) } |
#define | zyd_read16_m(sc, val, data) |
#define | zyd_write16_m(sc, val, data) |
#define | zyd_read32_m(sc, val, data) |
#define | zyd_write32_m(sc, val, data) |
#define | ZYD_AL2230_PHY_BANDEDGE6 |
#define | ZYD_GCT_INTR_REG 0x85c1 |
Functions | |
__FBSDID ("$FreeBSD$") | |
static struct ieee80211vap * | zyd_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 | zyd_vap_delete (struct ieee80211vap *) |
static void | zyd_tx_free (struct zyd_tx_data *, int) |
static void | zyd_setup_tx_list (struct zyd_softc *) |
static void | zyd_unsetup_tx_list (struct zyd_softc *) |
static int | zyd_newstate (struct ieee80211vap *, enum ieee80211_state, int) |
static int | zyd_cmd (struct zyd_softc *, uint16_t, const void *, int, void *, int, int) |
static int | zyd_read16 (struct zyd_softc *, uint16_t, uint16_t *) |
static int | zyd_read32 (struct zyd_softc *, uint16_t, uint32_t *) |
static int | zyd_write16 (struct zyd_softc *, uint16_t, uint16_t) |
static int | zyd_write32 (struct zyd_softc *, uint16_t, uint32_t) |
static int | zyd_rfwrite (struct zyd_softc *, uint32_t) |
static int | zyd_lock_phy (struct zyd_softc *) |
static int | zyd_unlock_phy (struct zyd_softc *) |
static int | zyd_rf_attach (struct zyd_softc *, uint8_t) |
static const char * | zyd_rf_name (uint8_t) |
static int | zyd_hw_init (struct zyd_softc *) |
static int | zyd_read_pod (struct zyd_softc *) |
static int | zyd_read_eeprom (struct zyd_softc *) |
static int | zyd_get_macaddr (struct zyd_softc *) |
static int | zyd_set_macaddr (struct zyd_softc *, const uint8_t *) |
static int | zyd_set_bssid (struct zyd_softc *, const uint8_t *) |
static int | zyd_switch_radio (struct zyd_softc *, int) |
static int | zyd_set_led (struct zyd_softc *, int, int) |
static void | zyd_set_multi (struct zyd_softc *) |
static void | zyd_update_mcast (struct ieee80211com *) |
static int | zyd_set_rxfilter (struct zyd_softc *) |
static void | zyd_set_chan (struct zyd_softc *, struct ieee80211_channel *) |
static int | zyd_set_beacon_interval (struct zyd_softc *, int) |
static void | zyd_rx_data (struct usb_xfer *, int, uint16_t) |
static int | zyd_tx_start (struct zyd_softc *, struct mbuf *, struct ieee80211_node *) |
static int | zyd_transmit (struct ieee80211com *, struct mbuf *) |
static void | zyd_start (struct zyd_softc *) |
static int | zyd_raw_xmit (struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *) |
static void | zyd_parent (struct ieee80211com *) |
static void | zyd_init_locked (struct zyd_softc *) |
static void | zyd_stop (struct zyd_softc *) |
static int | zyd_loadfirmware (struct zyd_softc *) |
static void | zyd_scan_start (struct ieee80211com *) |
static void | zyd_scan_end (struct ieee80211com *) |
static void | zyd_getradiocaps (struct ieee80211com *, int, int *, struct ieee80211_channel[]) |
static void | zyd_set_channel (struct ieee80211com *) |
static int | zyd_rfmd_init (struct zyd_rf *) |
static int | zyd_rfmd_switch_radio (struct zyd_rf *, int) |
static int | zyd_rfmd_set_channel (struct zyd_rf *, uint8_t) |
static int | zyd_al2230_init (struct zyd_rf *) |
static int | zyd_al2230_switch_radio (struct zyd_rf *, int) |
static int | zyd_al2230_set_channel (struct zyd_rf *, uint8_t) |
static int | zyd_al2230_set_channel_b (struct zyd_rf *, uint8_t) |
static int | zyd_al2230_init_b (struct zyd_rf *) |
static int | zyd_al7230B_init (struct zyd_rf *) |
static int | zyd_al7230B_switch_radio (struct zyd_rf *, int) |
static int | zyd_al7230B_set_channel (struct zyd_rf *, uint8_t) |
static int | zyd_al2210_init (struct zyd_rf *) |
static int | zyd_al2210_switch_radio (struct zyd_rf *, int) |
static int | zyd_al2210_set_channel (struct zyd_rf *, uint8_t) |
static int | zyd_gct_init (struct zyd_rf *) |
static int | zyd_gct_switch_radio (struct zyd_rf *, int) |
static int | zyd_gct_set_channel (struct zyd_rf *, uint8_t) |
static int | zyd_gct_mode (struct zyd_rf *) |
static int | zyd_gct_set_channel_synth (struct zyd_rf *, int, int) |
static int | zyd_gct_write (struct zyd_rf *, uint16_t) |
static int | zyd_gct_txgain (struct zyd_rf *, uint8_t) |
static int | zyd_maxim2_init (struct zyd_rf *) |
static int | zyd_maxim2_switch_radio (struct zyd_rf *, int) |
static int | zyd_maxim2_set_channel (struct zyd_rf *, uint8_t) |
static int | zyd_match (device_t dev) |
static int | zyd_attach (device_t dev) |
static void | zyd_drain_mbufq (struct zyd_softc *sc) |
static int | zyd_detach (device_t dev) |
static void | zyd_intr_read_callback (struct usb_xfer *xfer, usb_error_t error) |
static void | zyd_intr_write_callback (struct usb_xfer *xfer, usb_error_t error) |
static int | zyd_rfwrite_cr (struct zyd_softc *sc, uint32_t val) |
static int | zyd_al2230_fini (struct zyd_rf *rf) |
static int | zyd_al2230_bandedge6 (struct zyd_rf *rf, struct ieee80211_channel *c) |
static u_int | zyd_hash_maddr (void *arg, struct sockaddr_dl *sdl, u_int cnt) |
static void | zyd_bulk_read_callback (struct usb_xfer *xfer, usb_error_t error) |
static uint8_t | zyd_plcp_signal (struct zyd_softc *sc, int rate) |
static void | zyd_bulk_write_callback (struct usb_xfer *xfer, usb_error_t error) |
DRIVER_MODULE (zyd, uhub, zyd_driver, zyd_devclass, NULL, 0) | |
MODULE_DEPEND (zyd, usb, 1, 1, 1) | |
MODULE_DEPEND (zyd, wlan, 1, 1, 1) | |
MODULE_VERSION (zyd, 1) | |
USB_PNP_HOST_INFO (zyd_devs) | |
Variables | |
static device_probe_t | zyd_match |
static device_attach_t | zyd_attach |
static device_detach_t | zyd_detach |
static usb_callback_t | zyd_intr_read_callback |
static usb_callback_t | zyd_intr_write_callback |
static usb_callback_t | zyd_bulk_read_callback |
static usb_callback_t | zyd_bulk_write_callback |
static const struct zyd_phy_pair | zyd_def_phy [] = ZYD_DEF_PHY |
static const struct zyd_phy_pair | zyd_def_phyB [] = ZYD_DEF_PHYB |
static const STRUCT_USB_HOST_ID | zyd_devs [] |
static const struct usb_config | zyd_config [ZYD_N_TRANSFER] |
static device_method_t | zyd_methods [] |
static driver_t | zyd_driver |
static devclass_t | zyd_devclass |
#define DPRINTF | ( | sc, | |
m, | |||
fmt, | |||
... | |||
) |
#define ZYD_AL2230_PHY_BANDEDGE6 |
#define zyd_do_request | ( | sc, | |
req, | |||
data | |||
) | usbd_do_request_flags((sc)->sc_udev, &(sc)->sc_mtx, req, data, 0, NULL, 5000) |
#define ZYD_GCT_INTR_REG 0x85c1 |
#define ZYD_ZD1211_DEV | ( | v, | |
p | |||
) | { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, ZYD_ZD1211) } |
#define ZYD_ZD1211B_DEV | ( | v, | |
p | |||
) | { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, ZYD_ZD1211B) } |
__FBSDID | ( | "$FreeBSD$" | ) |
DRIVER_MODULE | ( | zyd | , |
uhub | , | ||
zyd_driver | , | ||
zyd_devclass | , | ||
NULL | , | ||
0 | |||
) |
MODULE_DEPEND | ( | zyd | , |
usb | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_DEPEND | ( | zyd | , |
wlan | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_VERSION | ( | zyd | , |
1 | |||
) |
USB_PNP_HOST_INFO | ( | zyd_devs | ) |
|
static |
Definition at line 1345 of file if_zyd.c.
References error, fail, reg, zyd_rf::rf_sc, val, ZYD_AL2210_PHY, ZYD_AL2210_RF, ZYD_CR18, ZYD_CR47, ZYD_CR_RADIO_PD, ZYD_CR_RFCFG, zyd_read32_m, zyd_rfwrite(), zyd_write16_m, and zyd_write32_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1385 of file if_zyd.c.
References chan, error, fail, zyd_rf::rf_sc, ZYD_AL2210_CHANTABLE, ZYD_CR18, ZYD_CR47, ZYD_CR_RADIO_PD, ZYD_CR_RFCFG, zyd_read32_m, zyd_rfwrite(), zyd_write16_m, and zyd_write32_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1377 of file if_zyd.c.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1230 of file if_zyd.c.
References chan, error, fail, r, reg, zyd_rf::rf_sc, zyd_softc::sc_ic, val, ZYD_AL2230_PHY_BANDEDGE6, and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1070 of file if_zyd.c.
References error, fail, reg, zyd_rf::rf_sc, zyd_softc::sc_newphy, val, ZYD_AL2230_PHY_FINI_PART1, ZYD_CR203, ZYD_CR9, and zyd_write16_m.
Referenced by zyd_al2230_init_b(), and zyd_al2230_set_channel_b().
|
static |
Definition at line 1014 of file if_zyd.c.
References error, fail, reg, zyd_rf::rf_sc, zyd_softc::sc_al2230s, zyd_softc::sc_rfrev, val, ZYD_AL2230_PHY, ZYD_AL2230_RF_PART1, ZYD_AL2230_RF_PART2, ZYD_AL2230_RF_PART3, ZYD_AL2230S_PHY_INIT, ZYD_CR138, ZYD_CR203, ZYD_CR251, ZYD_RF_AL2230S, zyd_rfwrite(), and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1088 of file if_zyd.c.
References error, fail, reg, zyd_rf::rf_sc, zyd_softc::sc_al2230s, zyd_softc::sc_rfrev, val, ZYD_AL2230_CHANTABLE, zyd_al2230_fini(), ZYD_AL2230_PHY_B, ZYD_AL2230_PHY_PART1, ZYD_AL2230_PHY_PART2, ZYD_AL2230_PHY_PART3, ZYD_AL2230_RF_B_PART1, ZYD_AL2230_RF_B_PART2, ZYD_AL2230_RF_B_PART3, ZYD_AL2230S_PHY_INIT, ZYD_RF_AL2230S, zyd_rfwrite(), zyd_rfwrite_cr(), and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1169 of file if_zyd.c.
References chan, error, fail, r1, r2, reg, zyd_rf::rf_sc, val, ZYD_AL2230_CHANTABLE, ZYD_CR138, ZYD_CR203, zyd_rfwrite(), and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1197 of file if_zyd.c.
References chan, error, fail, r1, r2, reg, zyd_rf::rf_sc, val, ZYD_AL2230_CHANTABLE_B, zyd_al2230_fini(), ZYD_AL2230_PHY_PART1, zyd_rfwrite_cr(), and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1157 of file if_zyd.c.
References error, fail, zyd_rf::rf_sc, zyd_softc::sc_macrev, ZYD_CR11, ZYD_CR251, zyd_write16_m, and ZYD_ZD1211.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1251 of file if_zyd.c.
References error, fail, reg, zyd_rf::rf_sc, val, ZYD_AL7230B_PHY_1, ZYD_AL7230B_PHY_2, ZYD_AL7230B_PHY_3, ZYD_AL7230B_RF_1, ZYD_AL7230B_RF_2, zyd_rfwrite(), and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1301 of file if_zyd.c.
References chan, error, fail, r1, r2, zyd_rf::rf_sc, ZYD_AL7230B_CHANTABLE, ZYD_AL7230B_RF_SETCHANNEL, ZYD_CR128, ZYD_CR129, ZYD_CR130, ZYD_CR136, ZYD_CR203, ZYD_CR240, ZYD_CR251, ZYD_CR38, zyd_rfwrite(), and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1289 of file if_zyd.c.
References error, fail, zyd_rf::rf_sc, ZYD_CR11, ZYD_CR251, and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 333 of file if_zyd.c.
References usbd_lookup_info::bcdDevice, dev, usb_attach_arg::device, device_set_usb_desc(), error, usb_attach_arg::info, zyd_softc::sc_dev, zyd_softc::sc_ic, zyd_softc::sc_macrev, zyd_softc::sc_mtx, zyd_softc::sc_rxtap, zyd_softc::sc_snd, zyd_softc::sc_txtap, zyd_softc::sc_udev, zyd_softc::sc_xfer, USB_GET_DRIVER_INFO, usbd_errstr(), usbd_transfer_setup(), zyd_rx_radiotap_header::wr_ihdr, zyd_tx_radiotap_header::wt_ihdr, zyd_config, zyd_detach, zyd_get_macaddr(), zyd_getradiocaps(), ZYD_IFACE_INDEX, ZYD_LOCK, ZYD_N_TRANSFER, zyd_parent(), zyd_raw_xmit(), ZYD_RX_RADIOTAP_PRESENT, zyd_scan_end(), zyd_scan_start(), zyd_set_channel(), zyd_transmit(), ZYD_TX_RADIOTAP_PRESENT, ZYD_UNLOCK, zyd_update_mcast(), zyd_vap_create(), and zyd_vap_delete().
|
static |
Definition at line 2220 of file if_zyd.c.
References desc, DPRINTF, error, zyd_rx_data::m, offset, zyd_rx_data::rssi, zyd_softc::sc_ic, zyd_softc::sc_rx_count, zyd_softc::sc_rx_data, UGETW, USB_ERR_CANCELLED, USB_GET_STATE, USB_ST_SETUP, USB_ST_TRANSFERRED, usbd_copy_out(), usbd_errstr(), usbd_transfer_submit(), usbd_xfer_get_frame(), usbd_xfer_max_len(), usbd_xfer_set_frame_len(), usbd_xfer_set_stall(), usbd_xfer_softc(), usbd_xfer_status(), ZYD_LOCK, ZYD_MAX_RXFRAMECNT, zyd_rx_data(), zyd_start(), ZYD_TAG_MULTIFRAME, and ZYD_UNLOCK.
|
static |
Definition at line 2351 of file if_zyd.c.
References data, DPRINTF, error, next, zyd_softc::sc_dev, zyd_softc::sc_ic, zyd_softc::sc_txtap, zyd_softc::tx_q, USB_ERR_CANCELLED, USB_ERR_TIMEOUT, USB_GET_STATE, USB_ST_SETUP, USB_ST_TRANSFERRED, usbd_copy_in(), usbd_errstr(), usbd_m_copy_in(), usbd_transfer_submit(), usbd_xfer_get_frame(), usbd_xfer_get_priv(), usbd_xfer_set_frame_len(), usbd_xfer_set_priv(), usbd_xfer_set_stall(), usbd_xfer_softc(), usbd_xfer_status(), zyd_tx_radiotap_header::wt_flags, zyd_tx_radiotap_header::wt_rate, ZYD_MAX_TXBUFSZ, zyd_start(), ZYD_TX_DESC_SIZE, and zyd_tx_free().
|
static |
Definition at line 802 of file if_zyd.c.
References zyd_rq::cmd, zyd_cmd::code, zyd_cmd::data, DPRINTF, error, zyd_rq::flags, zyd_rq::idata, zyd_rq::ilen, zyd_rq::odata, zyd_rq::olen, zyd_softc::sc_dev, zyd_softc::sc_mtx, zyd_softc::sc_xfer, usbd_transfer_start(), ZYD_INTR_RD, and ZYD_INTR_WR.
Referenced by zyd_read16(), zyd_read32(), zyd_rfwrite(), zyd_write16(), and zyd_write32().
|
static |
Definition at line 439 of file if_zyd.c.
References dev, zyd_softc::sc_flags, zyd_softc::sc_ic, zyd_softc::sc_mtx, zyd_softc::sc_xfer, zyd_softc::tx_free, zyd_softc::tx_q, usbd_transfer_drain(), usbd_transfer_unsetup(), zyd_drain_mbufq(), ZYD_FLAG_DETACHED, ZYD_LOCK, ZYD_N_TRANSFER, ZYD_UNLOCK, and zyd_unsetup_tx_list().
|
static |
Definition at line 424 of file if_zyd.c.
References zyd_softc::sc_snd, and ZYD_LOCK_ASSERT.
Referenced by zyd_detach(), and zyd_stop().
|
static |
Definition at line 1415 of file if_zyd.c.
References data, error, fail, zyd_rf::idx, reg, zyd_rf::rf_sc, val, ZYD_CR203, ZYD_GCT_INTR_REG, zyd_gct_mode(), ZYD_GCT_PHY, ZYD_GCT_RF, zyd_gct_set_channel_synth(), ZYD_GCT_VCO, zyd_gct_write(), zyd_read16_m, zyd_rfwrite(), and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1470 of file if_zyd.c.
References error, zyd_rf::rf_sc, and zyd_rfwrite().
Referenced by zyd_gct_init(), and zyd_gct_set_channel().
|
static |
Definition at line 1527 of file if_zyd.c.
References chan, error, fail, zyd_rf::idx, reg, zyd_rf::rf_sc, val, ZYD_CR12, ZYD_CR203, ZYD_CR77, ZYD_CR78, ZYD_CR79, ZYD_CR80, ZYD_CR81, zyd_gct_mode(), zyd_gct_set_channel_synth(), zyd_gct_txgain(), ZYD_GCT_VCO, zyd_gct_write(), and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1486 of file if_zyd.c.
References chan, error, zyd_rf::rf_sc, ZYD_GCT_CHANNEL_ACAL, ZYD_GCT_CHANNEL_DIV, ZYD_GCT_CHANNEL_STD, and zyd_rfwrite().
Referenced by zyd_gct_init(), and zyd_gct_set_channel().
|
static |
Definition at line 1510 of file if_zyd.c.
References error, fail, zyd_rf::rf_sc, zyd_softc::sc_macrev, ZYD_CR11, ZYD_CR251, zyd_rfwrite(), zyd_write16_m, and ZYD_ZD1211B.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1558 of file if_zyd.c.
References chan, zyd_rf::rf_sc, zyd_softc::sc_dev, zyd_softc::sc_pwrint, ZYD_GCT_TXGAIN, and zyd_rfwrite().
Referenced by zyd_gct_set_channel().
|
static |
Definition at line 1502 of file if_zyd.c.
References zyd_rf::rf_sc, value, and zyd_rfwrite().
Referenced by zyd_gct_init(), and zyd_gct_set_channel().
|
static |
Definition at line 1892 of file if_zyd.c.
References error, req, zyd_softc::sc_dev, zyd_softc::sc_ic, usbd_errstr(), USETW, UT_READ_VENDOR_DEVICE, zyd_do_request, ZYD_EEPROM_MAC_ADDR_P1, and ZYD_READFWDATAREQ.
Referenced by zyd_attach().
|
static |
Definition at line 2881 of file if_zyd.c.
Referenced by zyd_attach().
|
static |
Definition at line 1973 of file if_zyd.c.
Referenced by zyd_set_multi().
|
static |
Definition at line 1731 of file if_zyd.c.
References DPRINTF, error, fail, zyd_rf::init, zyd_phy_pair::reg, zyd_softc::sc_dev, zyd_softc::sc_fix_cr157, zyd_softc::sc_fwbase, zyd_softc::sc_fwrev, zyd_softc::sc_macrev, zyd_softc::sc_rf, zyd_softc::sc_rfrev, val, zyd_phy_pair::val, ZYD_CR157, ZYD_CR_ADDA_MBIAS_WT, ZYD_CR_ADDA_PWR_DWN, ZYD_CR_GPI_EN, ZYD_CR_INTERRUPT, ZYD_CR_PS_CTRL, ZYD_CR_RX_PE_DELAY, zyd_def_phy, zyd_def_phyB, ZYD_EEPROM_PHY_REG, ZYD_FIRMWARE_BASE_ADDR, ZYD_FW_FIRMWARE_REV, zyd_lock_phy(), ZYD_MAC_ACK_EXT, ZYD_MAC_AFTER_PNP, ZYD_MAC_BACKOFF_PROTECT, ZYD_MAC_BCNCFG, ZYD_MAC_CAM_MODE, ZYD_MAC_CONT_WIN_LIMIT, ZYD_MAC_DIFS_EIFS_SIFS, ZYD_MAC_GHTBH, ZYD_MAC_GHTBL, ZYD_MAC_MAN_RATE, ZYD_MAC_MISC, ZYD_MAC_PHY_DELAY2, ZYD_MAC_RETRY, ZYD_MAC_RTSCTSRATE, ZYD_MAC_RX_THRESHOLD, ZYD_MAC_RXFILTER, ZYD_MAC_SIFS_ACK_TIME, ZYD_MAC_SNIFFER, ZYD_MACB_AIFS_CTL1, ZYD_MACB_AIFS_CTL2, ZYD_MACB_MAX_RETRY, ZYD_MACB_TXOP, ZYD_MACB_TXPWR_CTL1, ZYD_MACB_TXPWR_CTL2, ZYD_MACB_TXPWR_CTL3, ZYD_MACB_TXPWR_CTL4, zyd_read16_m, zyd_read_eeprom(), zyd_read_pod(), zyd_rf_attach(), zyd_set_beacon_interval(), zyd_unlock_phy(), zyd_write16_m, zyd_write32_m, ZYD_ZD1211, and ZYD_ZD1211B.
Referenced by zyd_init_locked().
|
static |
Definition at line 2654 of file if_zyd.c.
References usb_config_descriptor::bConfigurationValue, DPRINTF, error, fail, zyd_softc::sc_al2230s, zyd_softc::sc_bandedge6, zyd_softc::sc_cckgain, zyd_softc::sc_dev, zyd_softc::sc_fix_cr157, zyd_softc::sc_flags, zyd_softc::sc_fwrev, zyd_softc::sc_ic, zyd_softc::sc_ledtype, zyd_softc::sc_macrev, zyd_softc::sc_mtx, zyd_softc::sc_newphy, zyd_softc::sc_parev, zyd_softc::sc_regdomain, zyd_softc::sc_rfrev, zyd_softc::sc_udev, zyd_softc::sc_xfer, usbd_get_config_descriptor(), usbd_req_set_config(), usbd_transfer_start(), usbd_xfer_set_stall(), val, ZYD_BULK_RD, ZYD_BULK_WR, ZYD_CR_INTERRUPT, ZYD_EEPROM_SUBID, ZYD_ENC_SNIFFER, ZYD_FLAG_INITONCE, ZYD_FLAG_RUNNING, zyd_hw_init(), ZYD_HWINT_MASK, ZYD_INTR_RD, zyd_loadfirmware(), ZYD_LOCK_ASSERT, ZYD_MAC_BAS_RATE, ZYD_MAC_ENCRYPTION_TYPE, ZYD_MAC_SNIFFER, zyd_read32_m, zyd_rf_name(), zyd_set_chan(), zyd_set_macaddr(), zyd_set_multi(), zyd_set_rxfilter(), zyd_setup_tx_list(), zyd_stop(), zyd_switch_radio(), zyd_write32_m, and ZYD_ZD1211.
Referenced by zyd_parent().
|
static |
Definition at line 626 of file if_zyd.c.
References zyd_rq::cmd, zyd_cmd::code, zyd_notif_retry::count, count, zyd_cmd::data, DPRINTF, error, zyd_rq::idata, zyd_rq::odata, zyd_rq::olen, retry, zyd_softc::sc_dev, zyd_softc::sc_ibuf, zyd_softc::sc_ic, zyd_softc::sc_txs, USB_ERR_CANCELLED, USB_GET_STATE, USB_ST_SETUP, USB_ST_TRANSFERRED, usbd_copy_out(), usbd_errstr(), usbd_transfer_submit(), usbd_xfer_get_frame(), usbd_xfer_max_len(), usbd_xfer_set_frame_len(), usbd_xfer_set_stall(), usbd_xfer_softc(), usbd_xfer_status(), ZYD_CR_INTERRUPT, ZYD_NOTIF_IORD, and ZYD_NOTIF_RETRYSTATUS.
|
static |
Definition at line 753 of file if_zyd.c.
References zyd_rq::cmd, DPRINTF, error, zyd_rq::flags, zyd_rq::ilen, USB_ERR_CANCELLED, USB_GET_STATE, USB_ST_SETUP, USB_ST_TRANSFERRED, usbd_copy_in(), usbd_errstr(), usbd_transfer_submit(), usbd_xfer_get_frame(), usbd_xfer_get_priv(), usbd_xfer_set_frame_len(), usbd_xfer_set_priv(), usbd_xfer_set_stall(), usbd_xfer_softc(), ZYD_CMD_FLAG_READ, and ZYD_CMD_FLAG_SENT.
|
static |
Definition at line 2799 of file if_zyd.c.
References addr, DPRINTF, req, zyd_softc::sc_flags, zyd_softc::sc_macrev, size, USETW, UT_READ_VENDOR_DEVICE, UT_WRITE_VENDOR_DEVICE, zd1211_firmware, zd1211b_firmware, zyd_do_request, ZYD_DOWNLOADREQ, ZYD_DOWNLOADSTS, ZYD_FIRMWARE_START_ADDR, ZYD_FLAG_FWLOADED, and ZYD_ZD1211.
Referenced by zyd_init_locked().
|
static |
Definition at line 928 of file if_zyd.c.
References error, fail, ZYD_MAC_MISC, zyd_read32_m, and zyd_write32_m.
Referenced by zyd_hw_init(), zyd_set_chan(), and zyd_switch_radio().
|
static |
Definition at line 318 of file if_zyd.c.
References usbd_lookup_info::bConfigIndex, usbd_lookup_info::bIfaceIndex, dev, usb_attach_arg::info, usb_attach_arg::usb_mode, USB_MODE_HOST, usbd_lookup_id_by_uaa(), ZYD_CONFIG_INDEX, zyd_devs, and ZYD_IFACE_INDEX.
|
static |
Definition at line 1577 of file if_zyd.c.
References error, fail, reg, zyd_rf::rf_sc, val, ZYD_CR203, ZYD_MAXIM2_PHY, ZYD_MAXIM2_RF, zyd_read16_m, zyd_rfwrite(), and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1612 of file if_zyd.c.
References chan, error, fail, r1, r2, reg, zyd_rf::rf_sc, val, ZYD_CR203, ZYD_MAXIM2_CHANTABLE, ZYD_MAXIM2_PHY, ZYD_MAXIM2_RF, zyd_read16_m, zyd_rfwrite(), and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 1604 of file if_zyd.c.
Referenced by zyd_rf_attach().
|
static |
Definition at line 581 of file if_zyd.c.
References DPRINTF, error, fail, zyd_vap::newstate, zyd_softc::sc_bssid, zyd_softc::sc_fwbase, zyd_vap::vap, ZYD_FW_LINK_STATUS, ZYD_LED1, ZYD_LOCK, zyd_set_bssid(), zyd_set_chan(), zyd_set_led(), ZYD_UNLOCK, ZYD_VAP, and zyd_write32_m.
Referenced by zyd_vap_create().
|
static |
Definition at line 2630 of file if_zyd.c.
References zyd_softc::sc_flags, ZYD_FLAG_DETACHED, ZYD_FLAG_RUNNING, zyd_init_locked(), ZYD_LOCK, zyd_set_multi(), zyd_stop(), and ZYD_UNLOCK.
Referenced by zyd_attach().
|
static |
Definition at line 2315 of file if_zyd.c.
References zyd_softc::sc_dev.
Referenced by zyd_tx_start().
|
static |
Definition at line 2596 of file if_zyd.c.
References zyd_softc::sc_flags, zyd_softc::tx_nfree, ZYD_FLAG_RUNNING, ZYD_LOCK, zyd_tx_start(), and ZYD_UNLOCK.
Referenced by zyd_attach().
|
static |
Definition at line 839 of file if_zyd.c.
References error, reg, val, zyd_pair::val, zyd_cmd(), ZYD_CMD_FLAG_READ, and ZYD_CMD_IORD.
|
static |
Definition at line 853 of file if_zyd.c.
References error, reg, val, zyd_cmd(), ZYD_CMD_FLAG_READ, ZYD_CMD_IORD, ZYD_REG32_HI, and ZYD_REG32_LO.
Referenced by zyd_set_chan().
|
static |
Definition at line 1864 of file if_zyd.c.
References error, fail, zyd_softc::sc_ofdm36_cal, zyd_softc::sc_ofdm48_cal, zyd_softc::sc_ofdm54_cal, zyd_softc::sc_pwrcal, zyd_softc::sc_pwrint, val, ZYD_EEPROM_36M_CAL, ZYD_EEPROM_48M_CAL, ZYD_EEPROM_54M_CAL, ZYD_EEPROM_PWR_CAL, ZYD_EEPROM_PWR_INT, and zyd_read16_m.
Referenced by zyd_hw_init().
|
static |
Definition at line 1844 of file if_zyd.c.
References error, fail, zyd_softc::sc_al2230s, zyd_softc::sc_bandedge6, zyd_softc::sc_cckgain, zyd_softc::sc_fix_cr157, zyd_softc::sc_ledtype, zyd_softc::sc_newphy, zyd_softc::sc_parev, zyd_softc::sc_rfrev, zyd_softc::sc_txled, ZYD_EEPROM_POD, and zyd_read32_m.
Referenced by zyd_hw_init().
|
static |
Definition at line 1655 of file if_zyd.c.
References zyd_rf::bandedge6, zyd_rf::init, zyd_rf::rf_sc, zyd_softc::sc_dev, zyd_softc::sc_macrev, zyd_softc::sc_rf, zyd_rf::set_channel, zyd_rf::switch_radio, type, zyd_rf::update_pwr, zyd_rf::width, zyd_al2210_init(), zyd_al2210_set_channel(), zyd_al2210_switch_radio(), zyd_al2230_bandedge6(), zyd_al2230_init(), zyd_al2230_init_b(), zyd_al2230_set_channel(), zyd_al2230_set_channel_b(), zyd_al2230_switch_radio(), zyd_al7230B_init(), zyd_al7230B_set_channel(), zyd_al7230B_switch_radio(), zyd_gct_init(), zyd_gct_set_channel(), zyd_gct_switch_radio(), zyd_maxim2_init(), zyd_maxim2_set_channel(), zyd_maxim2_switch_radio(), ZYD_RF_AL2210, ZYD_RF_AL2230, ZYD_RF_AL2230S, ZYD_RF_AL7230B, ZYD_RF_GCT, ZYD_RF_MAXIM_NEW, ZYD_RF_MAXIM_NEW2, zyd_rf_name(), ZYD_RF_RFMD, zyd_rfmd_init(), zyd_rfmd_set_channel(), zyd_rfmd_switch_radio(), and ZYD_ZD1211B.
Referenced by zyd_hw_init().
|
static |
Definition at line 1718 of file if_zyd.c.
References type.
Referenced by zyd_init_locked(), and zyd_rf_attach().
|
static |
Definition at line 957 of file if_zyd.c.
References error, fail, reg, zyd_rf::rf_sc, val, ZYD_RFMD_PHY, ZYD_RFMD_RF, zyd_rfwrite(), and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 991 of file if_zyd.c.
References chan, error, fail, r1, r2, zyd_rf::rf_sc, ZYD_RFMD_CHANTABLE, and zyd_rfwrite().
Referenced by zyd_rf_attach().
|
static |
Definition at line 979 of file if_zyd.c.
References error, fail, zyd_rf::rf_sc, ZYD_CR10, ZYD_CR11, and zyd_write16_m.
Referenced by zyd_rf_attach().
|
static |
Definition at line 893 of file if_zyd.c.
References error, fail, req, zyd_softc::sc_rf, val, zyd_rf::width, zyd_cmd(), ZYD_CMD_RFCFG, ZYD_CR203, zyd_read16_m, ZYD_RF_CLK, ZYD_RF_DATA, and ZYD_RF_IF_LE.
Referenced by zyd_al2210_init(), zyd_al2210_set_channel(), zyd_al2230_init(), zyd_al2230_init_b(), zyd_al2230_set_channel(), zyd_al7230B_init(), zyd_al7230B_set_channel(), zyd_gct_init(), zyd_gct_mode(), zyd_gct_set_channel_synth(), zyd_gct_switch_radio(), zyd_gct_txgain(), zyd_gct_write(), zyd_maxim2_init(), zyd_maxim2_set_channel(), zyd_rfmd_init(), and zyd_rfmd_set_channel().
|
static |
Definition at line 916 of file if_zyd.c.
References error, fail, val, ZYD_CR242, ZYD_CR243, ZYD_CR244, and zyd_write16_m.
Referenced by zyd_al2230_init_b(), and zyd_al2230_set_channel_b().
|
static |
Definition at line 2146 of file if_zyd.c.
References DPRINTF, zyd_rx_stat::flags, len, zyd_rx_data::m, offset, zyd_rx_stat::rssi, zyd_rx_data::rssi, zyd_softc::sc_dev, zyd_softc::sc_ic, zyd_softc::sc_rx_count, zyd_softc::sc_rx_data, zyd_softc::sc_rxtap, zyd_plcphdr::signal, usbd_copy_out(), usbd_xfer_get_frame(), usbd_xfer_softc(), zyd_rx_radiotap_header::wr_antnoise, zyd_rx_radiotap_header::wr_antsignal, zyd_rx_radiotap_header::wr_flags, zyd_rx_radiotap_header::wr_rate, ZYD_MIN_FRAGSZ, ZYD_RX_BADCRC16, ZYD_RX_BADCRC32, ZYD_RX_DECRYPTERR, ZYD_RX_ERROR, and ZYD_RX_OFDM.
Referenced by zyd_bulk_read_callback().
|
static |
Definition at line 2870 of file if_zyd.c.
References zyd_softc::sc_bssid, ZYD_LOCK, zyd_set_bssid(), and ZYD_UNLOCK.
Referenced by zyd_attach().
|
static |
Definition at line 2859 of file if_zyd.c.
References ZYD_LOCK, zyd_set_bssid(), and ZYD_UNLOCK.
Referenced by zyd_attach().
|
static |
Definition at line 2120 of file if_zyd.c.
References error, fail, zyd_softc::sc_atim_wnd, zyd_softc::sc_bcn_int, zyd_softc::sc_pre_tbtt, val, ZYD_CR_ATIM_WND_PERIOD, ZYD_CR_BCN_INTERVAL, ZYD_CR_PRE_TBTT, zyd_read32_m, and zyd_write32_m.
Referenced by zyd_hw_init().
|
static |
Definition at line 1927 of file if_zyd.c.
References addr, error, fail, ZYD_MAC_BSSADRH, ZYD_MAC_BSSADRL, and zyd_write32_m.
Referenced by zyd_newstate(), zyd_scan_end(), and zyd_scan_start().
|
static |
Definition at line 2055 of file if_zyd.c.
References zyd_rf::bandedge6, chan, error, fail, zyd_softc::sc_bandedge6, zyd_softc::sc_cckgain, zyd_softc::sc_dev, zyd_softc::sc_ic, zyd_softc::sc_macrev, zyd_softc::sc_ofdm36_cal, zyd_softc::sc_ofdm48_cal, zyd_softc::sc_ofdm54_cal, zyd_softc::sc_pwrcal, zyd_softc::sc_pwrint, zyd_softc::sc_rf, zyd_softc::sc_rxtap, zyd_softc::sc_txtap, zyd_rf::set_channel, zyd_rf::update_pwr, zyd_rx_radiotap_header::wr_chan_flags, zyd_rx_radiotap_header::wr_chan_freq, zyd_tx_radiotap_header::wt_chan_flags, zyd_tx_radiotap_header::wt_chan_freq, ZYD_CR31, ZYD_CR47, ZYD_CR65, ZYD_CR66, ZYD_CR67, ZYD_CR68, ZYD_CR69, ZYD_CR_CONFIG_PHILIPS, ZYD_EEPROM_PHY_REG, zyd_lock_phy(), zyd_read32(), zyd_unlock_phy(), zyd_write16_m, zyd_write32_m, and ZYD_ZD1211B.
Referenced by zyd_init_locked(), zyd_newstate(), and zyd_set_channel().
|
static |
Definition at line 2893 of file if_zyd.c.
References ZYD_LOCK, zyd_set_chan(), and ZYD_UNLOCK.
Referenced by zyd_attach().
|
static |
Definition at line 1958 of file if_zyd.c.
References error, fail, ZYD_MAC_TX_PE_CONTROL, zyd_read32_m, and zyd_write32_m.
Referenced by zyd_newstate().
|
static |
Definition at line 1913 of file if_zyd.c.
References addr, error, fail, ZYD_MAC_MACADRH, ZYD_MAC_MACADRL, and zyd_write32_m.
Referenced by zyd_init_locked().
|
static |
Definition at line 1988 of file if_zyd.c.
References error, fail, zyd_softc::sc_dev, zyd_softc::sc_flags, zyd_softc::sc_ic, ZYD_FLAG_RUNNING, zyd_hash_maddr(), ZYD_MAC_GHTBH, ZYD_MAC_GHTBL, and zyd_write32_m.
Referenced by zyd_init_locked(), zyd_parent(), and zyd_update_mcast().
|
static |
Definition at line 2031 of file if_zyd.c.
References zyd_softc::sc_ic, ZYD_FILTER_BSS, ZYD_FILTER_HOSTAP, ZYD_FILTER_MONITOR, ZYD_MAC_RXFILTER, and zyd_write32().
Referenced by zyd_init_locked().
|
static |
Definition at line 536 of file if_zyd.c.
References data, next, zyd_tx_data::sc, zyd_softc::tx_data, zyd_softc::tx_free, zyd_softc::tx_nfree, zyd_softc::tx_q, and ZYD_TX_LIST_CNT.
Referenced by zyd_init_locked().
|
static |
Definition at line 2576 of file if_zyd.c.
References zyd_softc::sc_snd, zyd_softc::tx_nfree, ZYD_LOCK_ASSERT, and zyd_tx_start().
Referenced by zyd_bulk_read_callback(), zyd_bulk_write_callback(), and zyd_transmit().
|
static |
Definition at line 2762 of file if_zyd.c.
References error, fail, zyd_softc::sc_flags, zyd_softc::sc_xfer, usbd_transfer_drain(), ZYD_BULK_RD, ZYD_BULK_WR, ZYD_CR_INTERRUPT, zyd_drain_mbufq(), ZYD_FLAG_INITONCE, ZYD_LOCK, ZYD_LOCK_ASSERT, ZYD_MAC_RXFILTER, zyd_switch_radio(), ZYD_UNLOCK, zyd_unsetup_tx_list(), and zyd_write32_m.
Referenced by zyd_init_locked(), and zyd_parent().
|
static |
Definition at line 1941 of file if_zyd.c.
References error, fail, zyd_softc::sc_rf, zyd_rf::switch_radio, zyd_lock_phy(), and zyd_unlock_phy().
Referenced by zyd_init_locked(), and zyd_stop().
|
static |
Definition at line 2554 of file if_zyd.c.
References error, zyd_softc::sc_flags, zyd_softc::sc_snd, ZYD_FLAG_RUNNING, ZYD_LOCK, zyd_start(), and ZYD_UNLOCK.
Referenced by zyd_attach().
|
static |
Definition at line 522 of file if_zyd.c.
References data, next, zyd_softc::tx_free, and zyd_softc::tx_nfree.
Referenced by zyd_bulk_write_callback().
|
static |
Definition at line 2434 of file if_zyd.c.
References data, desc, DPRINTF, k, next, zyd_softc::sc_dev, zyd_softc::sc_macrev, zyd_softc::sc_txtap, zyd_softc::sc_xfer, zyd_softc::tx_free, zyd_softc::tx_nfree, zyd_softc::tx_q, type, usbd_transfer_start(), zyd_tx_radiotap_header::wt_flags, zyd_tx_radiotap_header::wt_rate, ZYD_BULK_WR, ZYD_PLCP_LENGEXT, zyd_plcp_signal(), ZYD_RATE_IS_OFDM, ZYD_TX_DESC_SIZE, ZYD_TX_FLAG_BACKOFF, ZYD_TX_FLAG_CTS_TO_SELF, ZYD_TX_FLAG_MULTICAST, ZYD_TX_FLAG_RTS, ZYD_TX_FLAG_TYPE, ZYD_TX_PHY_5GHZ, ZYD_TX_PHY_OFDM, ZYD_TX_PHY_SHPREAMBLE, ZYD_TX_RATEDIV, ZYD_TX_TYPE_PS_POLL, and ZYD_ZD1211.
Referenced by zyd_raw_xmit(), and zyd_start().
|
static |
Definition at line 941 of file if_zyd.c.
References error, fail, ZYD_MAC_MISC, zyd_read32_m, ZYD_UNLOCK_PHY_REGS, and zyd_write32_m.
Referenced by zyd_hw_init(), zyd_set_chan(), and zyd_switch_radio().
|
static |
Definition at line 555 of file if_zyd.c.
References data, zyd_tx_data::sc, zyd_softc::tx_data, zyd_softc::tx_free, zyd_softc::tx_nfree, zyd_softc::tx_q, and ZYD_TX_LIST_CNT.
Referenced by zyd_detach(), and zyd_stop().
|
static |
Definition at line 2021 of file if_zyd.c.
References ZYD_LOCK, zyd_set_multi(), and ZYD_UNLOCK.
Referenced by zyd_attach().
|
static |
Definition at line 476 of file if_zyd.c.
References name, zyd_vap::newstate, zyd_vap::vap, and zyd_newstate().
Referenced by zyd_attach().
|
static |
Definition at line 512 of file if_zyd.c.
References zyd_vap::vap, and ZYD_VAP.
Referenced by zyd_attach().
|
static |
Definition at line 869 of file if_zyd.c.
References reg, zyd_pair::reg, val, zyd_pair::val, zyd_cmd(), and ZYD_CMD_IOWR.
|
static |
Definition at line 880 of file if_zyd.c.
References reg, zyd_pair::reg, val, zyd_pair::val, zyd_cmd(), ZYD_CMD_IOWR, ZYD_REG32_HI, and ZYD_REG32_LO.
Referenced by zyd_set_rxfilter().
|
static |
|
static |
|
static |
Definition at line 257 of file if_zyd.c.
Referenced by zyd_attach().
|
static |
Definition at line 194 of file if_zyd.c.
Referenced by zyd_hw_init().
|
static |
Definition at line 195 of file if_zyd.c.
Referenced by zyd_hw_init().
|
static |
Definition at line 113 of file if_zyd.c.
Referenced by zyd_attach().
|
static |
Definition at line 205 of file if_zyd.c.
Referenced by zyd_match().
|
static |
|
static |
|
static |
|
static |