FreeBSD kernel WPI device code
if_wpi.c File Reference
#include <sys/cdefs.h>
#include "opt_wlan.h"
#include "opt_wpi.h"
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/sockio.h>
#include <sys/mbuf.h>
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/queue.h>
#include <sys/taskqueue.h>
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/endian.h>
#include <sys/linker.h>
#include <sys/firmware.h>
#include <machine/bus.h>
#include <machine/resource.h>
#include <sys/rman.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.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 <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_radiotap.h>
#include <net80211/ieee80211_regdomain.h>
#include <net80211/ieee80211_ratectl.h>
#include <dev/wpi/if_wpireg.h>
#include <dev/wpi/if_wpivar.h>
#include <dev/wpi/if_wpi_debug.h>
Include dependency graph for if_wpi.c:

Go to the source code of this file.

Data Structures

struct  wpi_ident
 

Macros

#define WPI_CHK(res)
 
#define WPI_RATE_IS_OFDM(rate)   ((rate) >= 12 && (rate) != 22)
 
#define WPI_EXP2(x)   ((1 << (x)) - 1) /* CWmin = 2^ECWmin - 1 */
 
#define fdivround(a, b, n)    ((((1 << n) * (a)) / (b) + (1 << n) / 2) / (1 << n))
 
#define interpolate(x, x1, y1, x2, y2, n)    ((y1) + fdivround(((x) - (x1)) * ((y2) - (y1)), (x2) - (x1), n))
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int wpi_probe (device_t)
 
static int wpi_attach (device_t)
 
static void wpi_radiotap_attach (struct wpi_softc *)
 
static void wpi_sysctlattach (struct wpi_softc *)
 
static void wpi_init_beacon (struct wpi_vap *)
 
static struct ieee80211vap * wpi_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 wpi_vap_delete (struct ieee80211vap *)
 
static int wpi_detach (device_t)
 
static int wpi_shutdown (device_t)
 
static int wpi_suspend (device_t)
 
static int wpi_resume (device_t)
 
static int wpi_nic_lock (struct wpi_softc *)
 
static int wpi_read_prom_data (struct wpi_softc *, uint32_t, void *, int)
 
static void wpi_dma_map_addr (void *, bus_dma_segment_t *, int, int)
 
static int wpi_dma_contig_alloc (struct wpi_softc *, struct wpi_dma_info *, void **, bus_size_t, bus_size_t)
 
static void wpi_dma_contig_free (struct wpi_dma_info *)
 
static int wpi_alloc_shared (struct wpi_softc *)
 
static void wpi_free_shared (struct wpi_softc *)
 
static int wpi_alloc_fwmem (struct wpi_softc *)
 
static void wpi_free_fwmem (struct wpi_softc *)
 
static int wpi_alloc_rx_ring (struct wpi_softc *)
 
static void wpi_update_rx_ring (struct wpi_softc *)
 
static void wpi_update_rx_ring_ps (struct wpi_softc *)
 
static void wpi_reset_rx_ring (struct wpi_softc *)
 
static void wpi_free_rx_ring (struct wpi_softc *)
 
static int wpi_alloc_tx_ring (struct wpi_softc *, struct wpi_tx_ring *, uint8_t)
 
static void wpi_update_tx_ring (struct wpi_softc *, struct wpi_tx_ring *)
 
static void wpi_update_tx_ring_ps (struct wpi_softc *, struct wpi_tx_ring *)
 
static void wpi_reset_tx_ring (struct wpi_softc *, struct wpi_tx_ring *)
 
static void wpi_free_tx_ring (struct wpi_softc *, struct wpi_tx_ring *)
 
static int wpi_read_eeprom (struct wpi_softc *, uint8_t macaddr[IEEE80211_ADDR_LEN])
 
static uint32_t wpi_eeprom_channel_flags (struct wpi_eeprom_chan *)
 
static void wpi_read_eeprom_band (struct wpi_softc *, uint8_t, int, int *, struct ieee80211_channel[])
 
static int wpi_read_eeprom_channels (struct wpi_softc *, uint8_t)
 
static struct wpi_eeprom_chanwpi_find_eeprom_channel (struct wpi_softc *, struct ieee80211_channel *)
 
static void wpi_getradiocaps (struct ieee80211com *, int, int *, struct ieee80211_channel[])
 
static int wpi_setregdomain (struct ieee80211com *, struct ieee80211_regdomain *, int, struct ieee80211_channel[])
 
static int wpi_read_eeprom_group (struct wpi_softc *, uint8_t)
 
static struct ieee80211_node * wpi_node_alloc (struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN])
 
static void wpi_node_free (struct ieee80211_node *)
 
static void wpi_ibss_recv_mgmt (struct ieee80211_node *, struct mbuf *, int, const struct ieee80211_rx_stats *, int, int)
 
static void wpi_restore_node (void *, struct ieee80211_node *)
 
static void wpi_restore_node_table (struct wpi_softc *, struct wpi_vap *)
 
static int wpi_newstate (struct ieee80211vap *, enum ieee80211_state, int)
 
static void wpi_calib_timeout (void *)
 
static void wpi_rx_done (struct wpi_softc *, struct wpi_rx_desc *, struct wpi_rx_data *)
 
static void wpi_rx_statistics (struct wpi_softc *, struct wpi_rx_desc *, struct wpi_rx_data *)
 
static void wpi_tx_done (struct wpi_softc *, struct wpi_rx_desc *)
 
static void wpi_cmd_done (struct wpi_softc *, struct wpi_rx_desc *)
 
static void wpi_notif_intr (struct wpi_softc *)
 
static void wpi_wakeup_intr (struct wpi_softc *)
 
static void wpi_fatal_intr (struct wpi_softc *)
 
static void wpi_intr (void *)
 
static void wpi_free_txfrags (struct wpi_softc *, uint16_t)
 
static int wpi_cmd2 (struct wpi_softc *, struct wpi_buf *)
 
static int wpi_tx_data (struct wpi_softc *, struct mbuf *, struct ieee80211_node *)
 
static int wpi_tx_data_raw (struct wpi_softc *, struct mbuf *, struct ieee80211_node *, const struct ieee80211_bpf_params *)
 
static int wpi_raw_xmit (struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *)
 
static int wpi_transmit (struct ieee80211com *, struct mbuf *)
 
static void wpi_watchdog_rfkill (void *)
 
static void wpi_scan_timeout (void *)
 
static void wpi_tx_timeout (void *)
 
static void wpi_parent (struct ieee80211com *)
 
static int wpi_cmd (struct wpi_softc *, uint8_t, const void *, uint16_t, int)
 
static int wpi_mrr_setup (struct wpi_softc *)
 
static int wpi_add_node (struct wpi_softc *, struct ieee80211_node *)
 
static int wpi_add_broadcast_node (struct wpi_softc *, int)
 
static int wpi_add_ibss_node (struct wpi_softc *, struct ieee80211_node *)
 
static void wpi_del_node (struct wpi_softc *, struct ieee80211_node *)
 
static int wpi_updateedca (struct ieee80211com *)
 
static void wpi_set_promisc (struct wpi_softc *)
 
static void wpi_update_promisc (struct ieee80211com *)
 
static void wpi_update_mcast (struct ieee80211com *)
 
static void wpi_set_led (struct wpi_softc *, uint8_t, uint8_t, uint8_t)
 
static int wpi_set_timing (struct wpi_softc *, struct ieee80211_node *)
 
static void wpi_power_calibration (struct wpi_softc *)
 
static int wpi_set_txpower (struct wpi_softc *, int)
 
static int wpi_get_power_index (struct wpi_softc *, struct wpi_power_group *, uint8_t, int, int)
 
static int wpi_set_pslevel (struct wpi_softc *, uint8_t, int, int)
 
static int wpi_send_btcoex (struct wpi_softc *)
 
static int wpi_send_rxon (struct wpi_softc *, int, int)
 
static int wpi_config (struct wpi_softc *)
 
static uint16_t wpi_get_active_dwell_time (struct wpi_softc *, struct ieee80211_channel *, uint8_t)
 
static uint16_t wpi_limit_dwell (struct wpi_softc *, uint16_t)
 
static uint16_t wpi_get_passive_dwell_time (struct wpi_softc *, struct ieee80211_channel *)
 
static uint32_t wpi_get_scan_pause_time (uint32_t, uint16_t)
 
static int wpi_scan (struct wpi_softc *, struct ieee80211_channel *)
 
static int wpi_auth (struct wpi_softc *, struct ieee80211vap *)
 
static int wpi_config_beacon (struct wpi_vap *)
 
static int wpi_setup_beacon (struct wpi_softc *, struct ieee80211_node *)
 
static void wpi_update_beacon (struct ieee80211vap *, int)
 
static void wpi_newassoc (struct ieee80211_node *, int)
 
static int wpi_run (struct wpi_softc *, struct ieee80211vap *)
 
static int wpi_load_key (struct ieee80211_node *, const struct ieee80211_key *)
 
static void wpi_load_key_cb (void *, struct ieee80211_node *)
 
static int wpi_set_global_keys (struct ieee80211_node *)
 
static int wpi_del_key (struct ieee80211_node *, const struct ieee80211_key *)
 
static void wpi_del_key_cb (void *, struct ieee80211_node *)
 
static int wpi_process_key (struct ieee80211vap *, const struct ieee80211_key *, int)
 
static int wpi_key_set (struct ieee80211vap *, const struct ieee80211_key *)
 
static int wpi_key_delete (struct ieee80211vap *, const struct ieee80211_key *)
 
static int wpi_post_alive (struct wpi_softc *)
 
static int wpi_load_bootcode (struct wpi_softc *, const uint8_t *, uint32_t)
 
static int wpi_load_firmware (struct wpi_softc *)
 
static int wpi_read_firmware (struct wpi_softc *)
 
static void wpi_unload_firmware (struct wpi_softc *)
 
static int wpi_clock_wait (struct wpi_softc *)
 
static int wpi_apm_init (struct wpi_softc *)
 
static void wpi_apm_stop_master (struct wpi_softc *)
 
static void wpi_apm_stop (struct wpi_softc *)
 
static void wpi_nic_config (struct wpi_softc *)
 
static int wpi_hw_init (struct wpi_softc *)
 
static void wpi_hw_stop (struct wpi_softc *)
 
static void wpi_radio_on (void *, int)
 
static void wpi_radio_off (void *, int)
 
static int wpi_init (struct wpi_softc *)
 
static void wpi_stop_locked (struct wpi_softc *)
 
static void wpi_stop (struct wpi_softc *)
 
static void wpi_scan_start (struct ieee80211com *)
 
static void wpi_scan_end (struct ieee80211com *)
 
static void wpi_set_channel (struct ieee80211com *)
 
static void wpi_scan_curchan (struct ieee80211_scan_state *, unsigned long)
 
static void wpi_scan_mindwell (struct ieee80211_scan_state *)
 
 DRIVER_MODULE (wpi, pci, wpi_driver, wpi_devclass, NULL, NULL)
 
 MODULE_VERSION (wpi, 1)
 
 MODULE_DEPEND (wpi, pci, 1, 1, 1)
 
 MODULE_DEPEND (wpi, wlan, 1, 1, 1)
 
 MODULE_DEPEND (wpi, firmware, 1, 1, 1)
 
static __inline void wpi_nic_unlock (struct wpi_softc *sc)
 
static __inline uint32_t wpi_prph_read (struct wpi_softc *sc, uint32_t addr)
 
static __inline void wpi_prph_write (struct wpi_softc *sc, uint32_t addr, uint32_t data)
 
static __inline void wpi_prph_setbits (struct wpi_softc *sc, uint32_t addr, uint32_t mask)
 
static __inline void wpi_prph_clrbits (struct wpi_softc *sc, uint32_t addr, uint32_t mask)
 
static __inline void wpi_prph_write_region_4 (struct wpi_softc *sc, uint32_t addr, const uint32_t *data, uint32_t count)
 
static __inline uint32_t wpi_mem_read (struct wpi_softc *sc, uint32_t addr)
 
static __inline void wpi_mem_read_region_4 (struct wpi_softc *sc, uint32_t addr, uint32_t *data, int count)
 
static __inline uint8_t wpi_add_node_entry_adhoc (struct wpi_softc *sc)
 
static __inline uint8_t wpi_add_node_entry_sta (struct wpi_softc *sc)
 
static __inline int wpi_check_node_entry (struct wpi_softc *sc, uint8_t id)
 
static __inline void wpi_clear_node_table (struct wpi_softc *sc)
 
static __inline void wpi_del_node_entry (struct wpi_softc *sc, uint8_t id)
 
static __inline int wpi_check_bss_filter (struct wpi_softc *sc)
 
static __inline uint8_t rate2plcp (const uint8_t rate)
 
static __inline uint8_t plcp2rate (const uint8_t plcp)
 
static __inline int wpi_tx_ring_free_space (struct wpi_softc *sc, uint16_t ac)
 
static int wpi_add_sta_node (struct wpi_softc *sc, struct ieee80211_node *ni)
 

Variables

static const struct wpi_ident wpi_ident_table []
 
static device_method_t wpi_methods []
 
static driver_t wpi_driver
 
static devclass_t wpi_devclass
 

Macro Definition Documentation

◆ fdivround

#define fdivround (   a,
  b,
 
)     ((((1 << n) * (a)) / (b) + (1 << n) / 2) / (1 << n))

◆ interpolate

#define interpolate (   x,
  x1,
  y1,
  x2,
  y2,
 
)     ((y1) + fdivround(((x) - (x1)) * ((y2) - (y1)), (x2) - (x1), n))

◆ WPI_CHK

#define WPI_CHK (   res)
Value:
do { \
if ((error = res) != 0) \
goto fail; \
} while (0)

◆ WPI_EXP2

#define WPI_EXP2 (   x)    ((1 << (x)) - 1) /* CWmin = 2^ECWmin - 1 */

◆ WPI_RATE_IS_OFDM

#define WPI_RATE_IS_OFDM (   rate)    ((rate) >= 12 && (rate) != 22)

Definition at line 1906 of file if_wpi.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ DRIVER_MODULE()

DRIVER_MODULE ( wpi  ,
pci  ,
wpi_driver  ,
wpi_devclass  ,
NULL  ,
NULL   
)

◆ MODULE_DEPEND() [1/3]

MODULE_DEPEND ( wpi  ,
firmware  ,
,
,
 
)

◆ MODULE_DEPEND() [2/3]

MODULE_DEPEND ( wpi  ,
pci  ,
,
,
 
)

◆ MODULE_DEPEND() [3/3]

MODULE_DEPEND ( wpi  ,
wlan  ,
,
,
 
)

◆ MODULE_VERSION()

MODULE_VERSION ( wpi  ,
 
)

◆ plcp2rate()

static __inline uint8_t plcp2rate ( const uint8_t  plcp)
static

Definition at line 1886 of file if_wpi.c.

Referenced by wpi_rx_done().

Here is the caller graph for this function:

◆ rate2plcp()

static __inline uint8_t rate2plcp ( const uint8_t  rate)
static

Definition at line 1866 of file if_wpi.c.

Referenced by wpi_tx_data(), and wpi_tx_data_raw().

Here is the caller graph for this function:

◆ wpi_add_broadcast_node()

static int wpi_add_broadcast_node ( struct wpi_softc sc,
int  async 
)
static

◆ wpi_add_ibss_node()

static int wpi_add_ibss_node ( struct wpi_softc sc,
struct ieee80211_node *  ni 
)
static

Definition at line 3472 of file if_wpi.c.

References DPRINTF, wpi_node::id, wpi_node::ni, wpi_softc::sc_dev, wpi_add_node(), wpi_add_node_entry_adhoc(), wpi_del_node_entry(), WPI_ID_UNDEFINED, and WPI_NODE.

Referenced by wpi_newassoc(), and wpi_restore_node().

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

◆ wpi_add_node()

static int wpi_add_node ( struct wpi_softc sc,
struct ieee80211_node *  ni 
)
static

◆ wpi_add_node_entry_adhoc()

static __inline uint8_t wpi_add_node_entry_adhoc ( struct wpi_softc sc)
static

Definition at line 1579 of file if_wpi.c.

References wpi_softc::nodesmsk, WPI_ID_IBSS_MAX, WPI_ID_IBSS_MIN, and WPI_ID_UNDEFINED.

Referenced by wpi_add_ibss_node().

Here is the caller graph for this function:

◆ wpi_add_node_entry_sta()

static __inline uint8_t wpi_add_node_entry_sta ( struct wpi_softc sc)
static

Definition at line 1594 of file if_wpi.c.

References wpi_softc::nodesmsk, and WPI_ID_BSS.

Referenced by wpi_add_sta_node().

Here is the caller graph for this function:

◆ wpi_add_sta_node()

static int wpi_add_sta_node ( struct wpi_softc sc,
struct ieee80211_node *  ni 
)
static

Definition at line 3453 of file if_wpi.c.

References DPRINTF, wpi_node::id, wpi_node::ni, wpi_add_node(), wpi_add_node_entry_sta(), wpi_del_node_entry(), WPI_ID_UNDEFINED, and WPI_NODE.

Referenced by wpi_run().

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

◆ wpi_alloc_fwmem()

static int wpi_alloc_fwmem ( struct wpi_softc sc)
static

Definition at line 979 of file if_wpi.c.

References wpi_softc::fw_dma, wpi_dma_contig_alloc(), WPI_FW_DATA_MAXSZ, and WPI_FW_TEXT_MAXSZ.

Referenced by wpi_attach().

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

◆ wpi_alloc_rx_ring()

static int wpi_alloc_rx_ring ( struct wpi_softc sc)
static

◆ wpi_alloc_shared()

static int wpi_alloc_shared ( struct wpi_softc sc)
static

Definition at line 962 of file if_wpi.c.

References wpi_softc::shared, wpi_softc::shared_dma, and wpi_dma_contig_alloc().

Referenced by wpi_attach().

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

◆ wpi_alloc_tx_ring()

◆ wpi_apm_init()

◆ wpi_apm_stop()

static void wpi_apm_stop ( struct wpi_softc sc)
static

Definition at line 5211 of file if_wpi.c.

References wpi_apm_stop_master(), WPI_CLRBITS, WPI_GP_CNTRL, WPI_GP_CNTRL_INIT_DONE, WPI_RESET, WPI_RESET_SW, and WPI_SETBITS.

Referenced by wpi_hw_stop(), and wpi_read_eeprom().

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

◆ wpi_apm_stop_master()

static void wpi_apm_stop_master ( struct wpi_softc sc)
static

Definition at line 5190 of file if_wpi.c.

References wpi_softc::sc_dev, WPI_GP_CNTRL, WPI_GP_CNTRL_MAC_PS, WPI_GP_CNTRL_PS_MASK, WPI_READ, WPI_RESET, WPI_RESET_MASTER_DISABLED, WPI_RESET_STOP_MASTER, and WPI_SETBITS.

Referenced by wpi_apm_stop().

Here is the caller graph for this function:

◆ wpi_attach()

◆ wpi_auth()

static int wpi_auth ( struct wpi_softc sc,
struct ieee80211vap *  vap 
)
static

◆ wpi_calib_timeout()

static void wpi_calib_timeout ( void *  arg)
static

Definition at line 1853 of file if_wpi.c.

References wpi_softc::calib_to, wpi_calib_timeout(), wpi_check_bss_filter(), and wpi_power_calibration().

Referenced by wpi_calib_timeout(), wpi_newstate(), and wpi_run().

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

◆ wpi_check_bss_filter()

static __inline int wpi_check_bss_filter ( struct wpi_softc sc)
static

Definition at line 1657 of file if_wpi.c.

References wpi_rxon::filter, wpi_softc::rxon, and WPI_FILTER_BSS.

Referenced by wpi_calib_timeout(), wpi_newstate(), wpi_scan(), and wpi_send_rxon().

Here is the caller graph for this function:

◆ wpi_check_node_entry()

static __inline int wpi_check_node_entry ( struct wpi_softc sc,
uint8_t  id 
)
static

Definition at line 1602 of file if_wpi.c.

References wpi_softc::nodesmsk, and WPI_ID_UNDEFINED.

Referenced by wpi_del_key(), wpi_load_key(), and wpi_node_free().

Here is the caller graph for this function:

◆ wpi_clear_node_table()

static __inline void wpi_clear_node_table ( struct wpi_softc sc)
static

Definition at line 1611 of file if_wpi.c.

References wpi_softc::nodesmsk.

Referenced by wpi_notif_intr(), and wpi_send_rxon().

Here is the caller graph for this function:

◆ wpi_clock_wait()

static int wpi_clock_wait ( struct wpi_softc sc)
static

Definition at line 5123 of file if_wpi.c.

References wpi_softc::sc_dev, WPI_GP_CNTRL, WPI_GP_CNTRL_INIT_DONE, WPI_GP_CNTRL_MAC_CLOCK_READY, WPI_READ, and WPI_SETBITS.

Referenced by wpi_apm_init().

Here is the caller graph for this function:

◆ wpi_cmd()

◆ wpi_cmd2()

◆ wpi_cmd_done()

◆ wpi_config()

static int wpi_config ( struct wpi_softc sc)
static

Configure the card to listen to a particular channel, this transisions the card in to being able to receive frames from remote devices.

Definition at line 3935 of file if_wpi.c.

References wpi_rxon::cck_mask, wpi_rxon::chan, DPRINTF, wpi_rxon::filter, wpi_rxon::flags, wpi_rxon::mode, wpi_rxon::myaddr, wpi_rxon::ofdm_mask, wpi_softc::rxon, wpi_softc::sc_dev, wpi_softc::sc_ic, WPI_FILTER_ASSOC, WPI_FILTER_BEACON, WPI_FILTER_MULTICAST, WPI_FILTER_PROMISC, WPI_MODE_HOSTAP, WPI_MODE_IBSS, WPI_MODE_MONITOR, WPI_MODE_STA, wpi_mrr_setup(), WPI_RXON_24GHZ, WPI_RXON_AUTO, WPI_RXON_CTS_TO_SELF, WPI_RXON_TSF, wpi_send_btcoex(), wpi_send_rxon(), wpi_set_promisc(), and wpi_set_pslevel().

Referenced by wpi_init().

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

◆ wpi_config_beacon()

static int wpi_config_beacon ( struct wpi_vap wvp)
static

◆ wpi_del_key()

static int wpi_del_key ( struct ieee80211_node *  ni,
const struct ieee80211_key *  k 
)
static

◆ wpi_del_key_cb()

static void wpi_del_key_cb ( void *  arg,
struct ieee80211_node *  ni 
)
static

Definition at line 4747 of file if_wpi.c.

References wpi_node::id, wpi_node::ni, wpi_softc::sc_dev, wpi_del_key(), WPI_ID_UNDEFINED, WPI_NODE, WPI_NT_LOCK, and WPI_NT_UNLOCK.

Referenced by wpi_process_key().

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

◆ wpi_del_node()

static void wpi_del_node ( struct wpi_softc sc,
struct ieee80211_node *  ni 
)
static

Definition at line 3497 of file if_wpi.c.

References wpi_cmd_del_node::count, DPRINTF, wpi_node::id, wpi_cmd_del_node::macaddr, wpi_node::ni, wpi_softc::sc_dev, wpi_cmd(), WPI_CMD_DEL_NODE, WPI_ID_UNDEFINED, and WPI_NODE.

Referenced by wpi_node_free().

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

◆ wpi_del_node_entry()

static __inline void wpi_del_node_entry ( struct wpi_softc sc,
uint8_t  id 
)
static

Definition at line 1617 of file if_wpi.c.

References wpi_softc::nodesmsk.

Referenced by wpi_add_ibss_node(), wpi_add_sta_node(), and wpi_node_free().

Here is the caller graph for this function:

◆ wpi_detach()

◆ wpi_dma_contig_alloc()

static int wpi_dma_contig_alloc ( struct wpi_softc sc,
struct wpi_dma_info dma,
void **  kvap,
bus_size_t  size,
bus_size_t  alignment 
)
static

Definition at line 907 of file if_wpi.c.

References wpi_dma_info::map, wpi_dma_info::paddr, wpi_softc::sc_dev, wpi_dma_info::size, wpi_dma_info::tag, wpi_dma_info::vaddr, wpi_dma_contig_free(), and wpi_dma_map_addr().

Referenced by wpi_alloc_fwmem(), wpi_alloc_rx_ring(), wpi_alloc_shared(), and wpi_alloc_tx_ring().

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

◆ wpi_dma_contig_free()

static void wpi_dma_contig_free ( struct wpi_dma_info dma)
static

Definition at line 943 of file if_wpi.c.

References wpi_dma_info::map, wpi_dma_info::tag, and wpi_dma_info::vaddr.

Referenced by wpi_dma_contig_alloc(), wpi_free_fwmem(), wpi_free_rx_ring(), wpi_free_shared(), and wpi_free_tx_ring().

Here is the caller graph for this function:

◆ wpi_dma_map_addr()

static void wpi_dma_map_addr ( void *  arg,
bus_dma_segment_t *  segs,
int  nsegs,
int  error 
)
static

Definition at line 894 of file if_wpi.c.

Referenced by wpi_alloc_rx_ring(), wpi_cmd(), wpi_dma_contig_alloc(), and wpi_rx_done().

Here is the caller graph for this function:

◆ wpi_eeprom_channel_flags()

static uint32_t wpi_eeprom_channel_flags ( struct wpi_eeprom_chan channel)
static

Definition at line 1392 of file if_wpi.c.

References wpi_eeprom_chan::flags, WPI_EEPROM_CHAN_ACTIVE, WPI_EEPROM_CHAN_IBSS, and WPI_EEPROM_CHAN_RADAR.

Referenced by wpi_read_eeprom_band(), and wpi_setregdomain().

Here is the caller graph for this function:

◆ wpi_fatal_intr()

static void wpi_fatal_intr ( struct wpi_softc sc)
static

◆ wpi_find_eeprom_channel()

static struct wpi_eeprom_chan * wpi_find_eeprom_channel ( struct wpi_softc sc,
struct ieee80211_channel *  c 
)
static

Definition at line 1488 of file if_wpi.c.

References wpi_softc::eeprom_channels, wpi_chan_band::nchan, wpi_bands, and WPI_CHAN_BANDS_COUNT.

Referenced by wpi_setregdomain().

Here is the caller graph for this function:

◆ wpi_free_fwmem()

static void wpi_free_fwmem ( struct wpi_softc sc)
static

Definition at line 987 of file if_wpi.c.

References wpi_softc::fw_dma, and wpi_dma_contig_free().

Referenced by wpi_detach().

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

◆ wpi_free_rx_ring()

static void wpi_free_rx_ring ( struct wpi_softc sc)
static

Definition at line 1130 of file if_wpi.c.

References wpi_rx_ring::data, wpi_rx_ring::data_dmat, wpi_rx_ring::desc_dma, DPRINTF, wpi_rx_data::m, wpi_rx_data::map, wpi_softc::rxq, wpi_dma_contig_free(), and WPI_RX_RING_COUNT.

Referenced by wpi_alloc_rx_ring(), and wpi_detach().

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

◆ wpi_free_shared()

static void wpi_free_shared ( struct wpi_softc sc)
static

Definition at line 970 of file if_wpi.c.

References wpi_softc::shared_dma, and wpi_dma_contig_free().

Referenced by wpi_detach().

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

◆ wpi_free_tx_ring()

static void wpi_free_tx_ring ( struct wpi_softc sc,
struct wpi_tx_ring ring 
)
static

Definition at line 1293 of file if_wpi.c.

References wpi_tx_ring::cmd_dma, wpi_tx_ring::data, wpi_tx_ring::data_dmat, wpi_tx_ring::desc_dma, DPRINTF, wpi_tx_data::m, wpi_tx_data::map, wpi_dma_contig_free(), and WPI_TX_RING_COUNT.

Referenced by wpi_alloc_tx_ring(), and wpi_detach().

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

◆ wpi_free_txfrags()

static void wpi_free_txfrags ( struct wpi_softc sc,
uint16_t  ac 
)
static

◆ wpi_get_active_dwell_time()

static uint16_t wpi_get_active_dwell_time ( struct wpi_softc sc,
struct ieee80211_channel *  c,
uint8_t  n_probes 
)
static

Definition at line 4017 of file if_wpi.c.

References WPI_ACTIVE_DWELL_FACTOR_2GHZ, WPI_ACTIVE_DWELL_FACTOR_5GHZ, WPI_ACTIVE_DWELL_TIME_2GHZ, and WPI_ACTIVE_DWELL_TIME_5GHZ.

Referenced by wpi_scan().

Here is the caller graph for this function:

◆ wpi_get_passive_dwell_time()

static uint16_t wpi_get_passive_dwell_time ( struct wpi_softc sc,
struct ieee80211_channel *  c 
)
static

Definition at line 4065 of file if_wpi.c.

References wpi_limit_dwell(), WPI_PASSIVE_DWELL_BASE, WPI_PASSIVE_DWELL_TIME_2GHZ, and WPI_PASSIVE_DWELL_TIME_5GHZ.

Referenced by wpi_scan().

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

◆ wpi_get_power_index()

static int wpi_get_power_index ( struct wpi_softc sc,
struct wpi_power_group group,
uint8_t  chan,
int  is_chan_5ghz,
int  ridx 
)
static

◆ wpi_get_scan_pause_time()

static uint32_t wpi_get_scan_pause_time ( uint32_t  time,
uint16_t  bintval 
)
static

Definition at line 4079 of file if_wpi.c.

References WPI_PAUSE_MAX_TIME, and WPI_PAUSE_SCAN.

Referenced by wpi_scan().

Here is the caller graph for this function:

◆ wpi_getradiocaps()

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

Definition at line 1502 of file if_wpi.c.

References WPI_CHAN_BANDS_COUNT, and wpi_read_eeprom_band().

Referenced by wpi_attach().

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

◆ wpi_hw_init()

◆ wpi_hw_stop()

◆ wpi_ibss_recv_mgmt()

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

Definition at line 1663 of file if_wpi.c.

References DPRINTF, wpi_softc::rx_tstamp, WPI_VAP, and wpi_vap::wv_recv_mgmt.

Referenced by wpi_vap_create().

Here is the caller graph for this function:

◆ wpi_init()

static int wpi_init ( struct wpi_softc sc)
static

Definition at line 5457 of file if_wpi.c.

References DPRINTF, wpi_softc::sc_dev, wpi_softc::sc_running, wpi_softc::watchdog_rfkill, wpi_config(), WPI_GP_CNTRL, WPI_GP_CNTRL_RFKILL, wpi_hw_init(), WPI_LOCK, WPI_READ, wpi_read_firmware(), wpi_stop_locked(), wpi_unload_firmware(), WPI_UNLOCK, and wpi_watchdog_rfkill().

Referenced by wpi_parent().

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

◆ wpi_init_beacon()

◆ wpi_intr()

static void wpi_intr ( void *  arg)
static

◆ wpi_key_delete()

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

Definition at line 4850 of file if_wpi.c.

References wpi_process_key().

Referenced by wpi_vap_create().

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

◆ wpi_key_set()

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

Definition at line 4844 of file if_wpi.c.

References wpi_process_key().

Referenced by wpi_vap_create().

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

◆ wpi_limit_dwell()

static uint16_t wpi_limit_dwell ( struct wpi_softc sc,
uint16_t  dwell_time 
)
static

Definition at line 4037 of file if_wpi.c.

References DPRINTF, wpi_softc::sc_ic, and WPI_CHANNEL_TUNE_TIME.

Referenced by wpi_get_passive_dwell_time().

Here is the caller graph for this function:

◆ wpi_load_bootcode()

static int wpi_load_bootcode ( struct wpi_softc sc,
const uint8_t *  ucode,
uint32_t  size 
)
static

◆ wpi_load_firmware()

◆ wpi_load_key()

static int wpi_load_key ( struct ieee80211_node *  ni,
const struct ieee80211_key *  k 
)
static

◆ wpi_load_key_cb()

static void wpi_load_key_cb ( void *  arg,
struct ieee80211_node *  ni 
)
static

Definition at line 4662 of file if_wpi.c.

References wpi_node::id, wpi_node::ni, wpi_softc::sc_dev, WPI_ID_UNDEFINED, wpi_load_key(), WPI_NODE, WPI_NT_LOCK, and WPI_NT_UNLOCK.

Referenced by wpi_process_key().

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

◆ wpi_mem_read()

static __inline uint32_t wpi_mem_read ( struct wpi_softc sc,
uint32_t  addr 
)
static

Definition at line 841 of file if_wpi.c.

References WPI_BARRIER_READ_WRITE, WPI_MEM_RADDR, WPI_MEM_RDATA, WPI_READ, and WPI_WRITE.

Referenced by wpi_fatal_intr(), and wpi_mem_read_region_4().

Here is the caller graph for this function:

◆ wpi_mem_read_region_4()

static __inline void wpi_mem_read_region_4 ( struct wpi_softc sc,
uint32_t  addr,
uint32_t *  data,
int  count 
)
static

Definition at line 849 of file if_wpi.c.

References wpi_mem_read().

Referenced by wpi_fatal_intr().

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

◆ wpi_mrr_setup()

◆ wpi_newassoc()

static void wpi_newassoc ( struct ieee80211_node *  ni,
int  isnew 
)
static

Definition at line 4471 of file if_wpi.c.

References DPRINTF, wpi_node::id, wpi_node::ni, wpi_softc::sc_dev, wpi_add_ibss_node(), WPI_ID_UNDEFINED, WPI_NODE, WPI_NT_LOCK, and WPI_NT_UNLOCK.

Referenced by wpi_attach().

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

◆ wpi_newstate()

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

Called by net80211 when ever there is a change to 80211 state machine

Definition at line 1726 of file if_wpi.c.

References DPRINTF, wpi_rxon::filter, wpi_softc::rxon, wpi_softc::sc_dev, wpi_softc::sc_running, wpi_auth(), wpi_calib_timeout(), wpi_check_bss_filter(), WPI_FILTER_BSS, WPI_LED_LINK, wpi_restore_node_table(), wpi_run(), WPI_RXON_LOCK, WPI_RXON_UNLOCK, wpi_send_rxon(), wpi_set_led(), wpi_set_pslevel(), WPI_TXQ_LOCK, WPI_TXQ_UNLOCK, wpi_updateedca(), WPI_VAP, and wpi_vap::wv_newstate.

Referenced by wpi_vap_create().

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

◆ wpi_nic_config()

static void wpi_nic_config ( struct wpi_softc sc)
static

◆ wpi_nic_lock()

◆ wpi_nic_unlock()

static __inline void wpi_nic_unlock ( struct wpi_softc sc)
static

◆ wpi_node_alloc()

static struct ieee80211_node * wpi_node_alloc ( struct ieee80211vap *  vap,
const uint8_t  mac[IEEE80211_ADDR_LEN] 
)
static

Definition at line 1623 of file if_wpi.c.

References wpi_node::id, wpi_node::ni, and WPI_ID_UNDEFINED.

Referenced by wpi_attach().

Here is the caller graph for this function:

◆ wpi_node_free()

static void wpi_node_free ( struct ieee80211_node *  ni)
static

Definition at line 1639 of file if_wpi.c.

References wpi_node::id, wpi_node::ni, wpi_softc::sc_node_free, wpi_check_node_entry(), wpi_del_node(), wpi_del_node_entry(), WPI_ID_UNDEFINED, WPI_NODE, WPI_NT_LOCK, and WPI_NT_UNLOCK.

Referenced by wpi_attach().

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

◆ wpi_notif_intr()

static void wpi_notif_intr ( struct wpi_softc sc)
static

Definition at line 2183 of file if_wpi.c.

References wpi_tx_stat::ackfailcnt, wpi_tx_stat::btkillcnt, wpi_start_scan::chan, wpi_stop_scan::chan, wpi_beacon_missed::consecutive, wpi_rx_ring::cur, wpi_rx_ring::data, wpi_rx_ring::data_dmat, DPRINTF, wpi_tx_stat::duration, wpi_ucode_info::errptr, wpi_softc::errptr, wpi_beacon_missed::expected, wpi_rx_desc::flags, wpi_rx_desc::idx, wpi_rx_desc::len, wpi_rx_data::m, wpi_ucode_info::major, wpi_dma_info::map, wpi_rx_data::map, wpi_ucode_info::minor, wpi_stop_scan::nchan, wpi_shared::next, wpi_rx_desc::qid, wpi_tx_stat::rate, wpi_beacon_missed::received, wpi_tx_stat::rtsfailcnt, wpi_softc::rxq, wpi_softc::sc_dev, wpi_softc::sc_ic, wpi_softc::sc_radiooff_task, wpi_softc::sc_running, wpi_softc::sc_update_rx_ring, wpi_softc::scan_timeout, wpi_softc::shared, wpi_softc::shared_dma, wpi_tx_stat::status, wpi_start_scan::status, wpi_stop_scan::status, wpi_ucode_info::subtype, wpi_dma_info::tag, wpi_beacon_missed::total, wpi_rx_desc::type, wpi_ucode_info::valid, WPI_BEACON_MISSED, WPI_BEACON_SENT, WPI_BEACON_STATISTICS, wpi_clear_node_table(), wpi_cmd(), wpi_cmd_done(), WPI_CMD_SCAN_ABORT, WPI_NT_LOCK, WPI_NT_UNLOCK, wpi_rx_done(), WPI_RX_DONE, WPI_RX_RING_COUNT, wpi_rx_statistics(), WPI_RX_STATISTICS, WPI_RXON_LOCK, WPI_RXON_UNLOCK, WPI_SCAN_ABORTED, WPI_START_SCAN, WPI_STATE_CHANGED, wpi_stop_locked(), WPI_STOP_SCAN, wpi_tx_done(), WPI_TX_DONE, WPI_UC_READY, and WPI_UNSOLICITED_RX_NOTIF.

Referenced by wpi_intr().

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

◆ wpi_parent()

static void wpi_parent ( struct ieee80211com *  ic)
static

Definition at line 3210 of file if_wpi.c.

References wpi_init(), and wpi_stop().

Referenced by wpi_attach().

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

◆ wpi_post_alive()

static int wpi_post_alive ( struct wpi_softc sc)
static

Definition at line 4860 of file if_wpi.c.

References DPRINTF, wpi_softc::sc_dev, wpi_softc::temp, WPI_APMG_RFKILL, wpi_nic_lock(), wpi_nic_unlock(), wpi_prph_read(), WPI_READ, and WPI_UCODE_GP2.

Referenced by wpi_hw_init().

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

◆ wpi_power_calibration()

static void wpi_power_calibration ( struct wpi_softc sc)
static

Definition at line 3647 of file if_wpi.c.

References DPRINTF, wpi_softc::sc_dev, wpi_softc::temp, WPI_READ, wpi_set_txpower(), and WPI_UCODE_GP2.

Referenced by wpi_calib_timeout().

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

◆ wpi_probe()

static int wpi_probe ( device_t  dev)
static

Definition at line 316 of file if_wpi.c.

References wpi_ident::device, wpi_ident::name, wpi_ident::vendor, and wpi_ident_table.

◆ wpi_process_key()

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

Definition at line 4769 of file if_wpi.c.

References DPRINTF, wpi_softc::sc_dev, wpi_del_key(), wpi_del_key_cb(), wpi_load_key(), wpi_load_key_cb(), WPI_NT_LOCK, WPI_NT_UNLOCK, WPI_VAP, WPI_VAP_KEY, and wpi_vap::wv_gtk.

Referenced by wpi_key_delete(), and wpi_key_set().

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

◆ wpi_prph_clrbits()

static __inline void wpi_prph_clrbits ( struct wpi_softc sc,
uint32_t  addr,
uint32_t  mask 
)
static

Definition at line 827 of file if_wpi.c.

References wpi_prph_read(), and wpi_prph_write().

Referenced by wpi_apm_init(), and wpi_hw_init().

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

◆ wpi_prph_read()

static __inline uint32_t wpi_prph_read ( struct wpi_softc sc,
uint32_t  addr 
)
static

Definition at line 805 of file if_wpi.c.

References WPI_BARRIER_READ_WRITE, WPI_PRPH_DWORD, WPI_PRPH_RADDR, WPI_PRPH_RDATA, WPI_READ, and WPI_WRITE.

Referenced by wpi_post_alive(), wpi_prph_clrbits(), wpi_prph_setbits(), and wpi_watchdog_rfkill().

Here is the caller graph for this function:

◆ wpi_prph_setbits()

static __inline void wpi_prph_setbits ( struct wpi_softc sc,
uint32_t  addr,
uint32_t  mask 
)
static

Definition at line 821 of file if_wpi.c.

References wpi_prph_read(), and wpi_prph_write().

Referenced by wpi_apm_init().

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

◆ wpi_prph_write()

static __inline void wpi_prph_write ( struct wpi_softc sc,
uint32_t  addr,
uint32_t  data 
)
static

◆ wpi_prph_write_region_4()

static __inline void wpi_prph_write_region_4 ( struct wpi_softc sc,
uint32_t  addr,
const uint32_t *  data,
uint32_t  count 
)
static

Definition at line 833 of file if_wpi.c.

References wpi_prph_write().

Referenced by wpi_load_bootcode().

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

◆ wpi_radio_off()

static void wpi_radio_off ( void *  arg0,
int  pending 
)
static

Definition at line 5438 of file if_wpi.c.

References wpi_softc::sc_dev, wpi_softc::sc_ic, wpi_softc::watchdog_rfkill, WPI_LOCK, wpi_stop(), WPI_UNLOCK, and wpi_watchdog_rfkill().

Referenced by wpi_attach().

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

◆ wpi_radio_on()

static void wpi_radio_on ( void *  arg0,
int  pending 
)
static

Definition at line 5421 of file if_wpi.c.

References wpi_softc::sc_dev, wpi_softc::sc_ic, wpi_softc::watchdog_rfkill, WPI_LOCK, and WPI_UNLOCK.

Referenced by wpi_attach().

Here is the caller graph for this function:

◆ wpi_radiotap_attach()

static void wpi_radiotap_attach ( struct wpi_softc sc)
static

◆ wpi_raw_xmit()

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

Definition at line 3074 of file if_wpi.c.

References DPRINTF, wpi_softc::sc_running, wpi_tx_data(), wpi_tx_data_raw(), WPI_TX_LOCK, wpi_tx_ring_free_space(), and WPI_TX_UNLOCK.

Referenced by wpi_attach().

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

◆ wpi_read_eeprom()

static int wpi_read_eeprom ( struct wpi_softc sc,
uint8_t  macaddr[IEEE80211_ADDR_LEN] 
)
static

◆ wpi_read_eeprom_band()

static void wpi_read_eeprom_band ( struct wpi_softc sc,
uint8_t  n,
int  maxchans,
int *  nchans,
struct ieee80211_channel  chans[] 
)
static

Definition at line 1415 of file if_wpi.c.

References wpi_chan_band::chan, DPRINTF, wpi_softc::eeprom_channels, wpi_eeprom_chan::maxpwr, wpi_softc::maxpwr, wpi_chan_band::nchan, wpi_bands, WPI_EEPROM_CHAN_VALID, and wpi_eeprom_channel_flags().

Referenced by wpi_getradiocaps(), and wpi_read_eeprom_channels().

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

◆ wpi_read_eeprom_channels()

static int wpi_read_eeprom_channels ( struct wpi_softc sc,
uint8_t  n 
)
static

Read the eeprom to find out what channels are valid for the given band and update net80211 with what we find.

Definition at line 1462 of file if_wpi.c.

References wpi_chan_band::addr, DPRINTF, wpi_softc::eeprom_channels, wpi_chan_band::nchan, wpi_softc::sc_ic, wpi_bands, wpi_read_eeprom_band(), and wpi_read_prom_data().

Referenced by wpi_read_eeprom().

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

◆ wpi_read_eeprom_group()

◆ wpi_read_firmware()

◆ wpi_read_prom_data()

static int wpi_read_prom_data ( struct wpi_softc sc,
uint32_t  addr,
void *  data,
int  count 
)
static

Definition at line 857 of file if_wpi.c.

References DPRINTF, wpi_softc::sc_dev, WPI_EEPROM, WPI_EEPROM_READ_VALID, wpi_nic_lock(), wpi_nic_unlock(), WPI_READ, and WPI_WRITE.

Referenced by wpi_read_eeprom(), wpi_read_eeprom_channels(), and wpi_read_eeprom_group().

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

◆ wpi_reset_rx_ring()

static void wpi_reset_rx_ring ( struct wpi_softc sc)
static

Definition at line 1107 of file if_wpi.c.

References wpi_rx_ring::cur, DPRINTF, wpi_softc::rxq, wpi_rx_ring::update, WPI_FH_RX_CONFIG, WPI_FH_RX_STATUS, WPI_FH_RX_STATUS_IDLE, wpi_nic_lock(), wpi_nic_unlock(), WPI_READ, and WPI_WRITE.

Referenced by wpi_hw_stop().

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

◆ wpi_reset_tx_ring()

static void wpi_reset_tx_ring ( struct wpi_softc sc,
struct wpi_tx_ring ring 
)
static

◆ wpi_restore_node()

static void wpi_restore_node ( void *  arg,
struct ieee80211_node *  ni 
)
static

Definition at line 1690 of file if_wpi.c.

References wpi_node::id, wpi_node::ni, wpi_softc::sc_dev, wpi_add_ibss_node(), WPI_ID_UNDEFINED, WPI_NODE, WPI_NT_LOCK, and WPI_NT_UNLOCK.

Referenced by wpi_restore_node_table().

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

◆ wpi_restore_node_table()

static void wpi_restore_node_table ( struct wpi_softc sc,
struct wpi_vap wvp 
)
static

Definition at line 1709 of file if_wpi.c.

References wpi_softc::sc_ic, WPI_NT_LOCK, WPI_NT_UNLOCK, wpi_restore_node(), and wpi_vap::wv_gtk.

Referenced by wpi_newstate().

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

◆ wpi_resume()

static int wpi_resume ( device_t  dev)
static

Definition at line 758 of file if_wpi.c.

References wpi_softc::sc_ic.

◆ wpi_run()

◆ wpi_rx_done()

◆ wpi_rx_statistics()

static void wpi_rx_statistics ( struct wpi_softc sc,
struct wpi_rx_desc desc,
struct wpi_rx_data data 
)
static

Definition at line 2053 of file if_wpi.c.

Referenced by wpi_notif_intr().

Here is the caller graph for this function:

◆ wpi_scan()

◆ wpi_scan_curchan()

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

Called by net80211 to indicate that we need to scan the current channel. The channel is previously be set via the wpi_set_channel callback.

Definition at line 5630 of file if_wpi.c.

References WPI_RXON_LOCK, WPI_RXON_UNLOCK, and wpi_scan().

Referenced by wpi_attach().

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

◆ wpi_scan_end()

static void wpi_scan_end ( struct ieee80211com *  ic)
static

Definition at line 5571 of file if_wpi.c.

References WPI_LED_LINK, and wpi_set_led().

Referenced by wpi_attach().

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

◆ wpi_scan_mindwell()

static void wpi_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 5651 of file if_wpi.c.

Referenced by wpi_attach().

Here is the caller graph for this function:

◆ wpi_scan_start()

static void wpi_scan_start ( struct ieee80211com *  ic)
static

Definition at line 5560 of file if_wpi.c.

References WPI_LED_LINK, and wpi_set_led().

Referenced by wpi_attach().

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

◆ wpi_scan_timeout()

static void wpi_scan_timeout ( void *  arg)
static

Definition at line 3190 of file if_wpi.c.

References wpi_softc::sc_ic.

Referenced by wpi_scan().

Here is the caller graph for this function:

◆ wpi_send_btcoex()

static int wpi_send_btcoex ( struct wpi_softc sc)
static

Definition at line 3853 of file if_wpi.c.

References DPRINTF, wpi_bluetooth::flags, wpi_bluetooth::lead_time, wpi_bluetooth::max_kill, WPI_BT_COEX_MODE_4WIRE, WPI_BT_LEAD_TIME_DEF, WPI_BT_MAX_KILL_DEF, wpi_cmd(), and WPI_CMD_BT_COEX.

Referenced by wpi_config().

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

◆ wpi_send_rxon()

◆ wpi_set_channel()

static void wpi_set_channel ( struct ieee80211com *  ic)
static

Called by the net80211 framework to indicate to the driver that the channel should be changed

Definition at line 5585 of file if_wpi.c.

References wpi_rxon::chan, DPRINTF, wpi_rxon::flags, wpi_softc::rxon, wpi_softc::sc_dev, wpi_softc::sc_rxtap, wpi_softc::sc_txtap, WPI_LOCK, WPI_RXON_24GHZ, WPI_RXON_AUTO, WPI_RXON_LOCK, WPI_RXON_UNLOCK, wpi_send_rxon(), WPI_TX_LOCK, WPI_TX_UNLOCK, WPI_UNLOCK, wpi_rx_radiotap_header::wr_chan_flags, wpi_rx_radiotap_header::wr_chan_freq, wpi_tx_radiotap_header::wt_chan_flags, and wpi_tx_radiotap_header::wt_chan_freq.

Referenced by wpi_attach().

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

◆ wpi_set_global_keys()

static int wpi_set_global_keys ( struct ieee80211_node *  ni)
static

Definition at line 4684 of file if_wpi.c.

References wpi_load_key().

Referenced by wpi_add_node().

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

◆ wpi_set_led()

static void wpi_set_led ( struct wpi_softc sc,
uint8_t  which,
uint8_t  off,
uint8_t  on 
)
static

Definition at line 3605 of file if_wpi.c.

References DPRINTF, wpi_cmd_led::off, wpi_cmd_led::on, wpi_cmd_led::unit, wpi_cmd_led::which, wpi_cmd(), and WPI_CMD_SET_LED.

Referenced by wpi_newstate(), wpi_run(), wpi_scan_end(), and wpi_scan_start().

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

◆ wpi_set_promisc()

static void wpi_set_promisc ( struct wpi_softc sc)
static

Definition at line 3560 of file if_wpi.c.

References wpi_rxon::filter, wpi_softc::rxon, wpi_softc::sc_ic, WPI_FILTER_CTL, and WPI_FILTER_PROMISC.

Referenced by wpi_config(), and wpi_update_promisc().

Here is the caller graph for this function:

◆ wpi_set_pslevel()

static int wpi_set_pslevel ( struct wpi_softc sc,
uint8_t  dtim,
int  level,
int  async 
)
static

◆ wpi_set_timing()

static int wpi_set_timing ( struct wpi_softc sc,
struct ieee80211_node *  ni 
)
static

Definition at line 3619 of file if_wpi.c.

References wpi_cmd_timing::binitval, wpi_cmd_timing::bintval, DPRINTF, wpi_cmd_timing::lintval, wpi_cmd_timing::tstamp, wpi_cmd(), and WPI_CMD_TIMING.

Referenced by wpi_run().

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

◆ wpi_set_txpower()

◆ wpi_setregdomain()

static int wpi_setregdomain ( struct ieee80211com *  ic,
struct ieee80211_regdomain *  rd,
int  nchan,
struct ieee80211_channel  chans[] 
)
static

Definition at line 1517 of file if_wpi.c.

References wpi_eeprom_channel_flags(), and wpi_find_eeprom_channel().

Referenced by wpi_attach().

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

◆ wpi_setup_beacon()

static int wpi_setup_beacon ( struct wpi_softc sc,
struct ieee80211_node *  ni 
)
static

Definition at line 4397 of file if_wpi.c.

References DPRINTF, wpi_buf::m, wpi_softc::sc_dev, wpi_config_beacon(), WPI_VAP, WPI_VAP_LOCK, WPI_VAP_UNLOCK, and wpi_vap::wv_bcbuf.

Referenced by wpi_run().

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

◆ wpi_shutdown()

static int wpi_shutdown ( device_t  dev)
static

Definition at line 739 of file if_wpi.c.

References wpi_stop().

Here is the call graph for this function:

◆ wpi_stop()

static void wpi_stop ( struct wpi_softc sc)
static

Definition at line 5549 of file if_wpi.c.

References WPI_LOCK, wpi_stop_locked(), and WPI_UNLOCK.

Referenced by wpi_detach(), wpi_parent(), wpi_radio_off(), and wpi_shutdown().

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

◆ wpi_stop_locked()

static void wpi_stop_locked ( struct wpi_softc sc)
static

Definition at line 5521 of file if_wpi.c.

References wpi_softc::calib_to, wpi_softc::sc_running, wpi_softc::scan_timeout, wpi_softc::tx_timeout, wpi_hw_stop(), WPI_LOCK_ASSERT, WPI_RXON_LOCK, WPI_RXON_UNLOCK, WPI_TX_LOCK, WPI_TX_UNLOCK, WPI_TXQ_LOCK, WPI_TXQ_STATE_LOCK, WPI_TXQ_STATE_UNLOCK, and WPI_TXQ_UNLOCK.

Referenced by wpi_init(), wpi_notif_intr(), and wpi_stop().

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

◆ wpi_suspend()

static int wpi_suspend ( device_t  dev)
static

Definition at line 748 of file if_wpi.c.

References wpi_softc::sc_ic.

◆ wpi_sysctlattach()

static void wpi_sysctlattach ( struct wpi_softc sc)
static

Definition at line 587 of file if_wpi.c.

References wpi_softc::sc_debug, and wpi_softc::sc_dev.

Referenced by wpi_attach().

Here is the caller graph for this function:

◆ wpi_transmit()

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

Definition at line 3123 of file if_wpi.c.

References DPRINTF, wpi_softc::sc_running, wpi_free_txfrags(), wpi_tx_data(), WPI_TX_LOCK, and wpi_tx_ring_free_space().

Referenced by wpi_attach().

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

◆ wpi_tx_data()

◆ wpi_tx_data_raw()

◆ wpi_tx_done()

◆ wpi_tx_ring_free_space()

static __inline int wpi_tx_ring_free_space ( struct wpi_softc sc,
uint16_t  ac 
)
static

Definition at line 3061 of file if_wpi.c.

References wpi_tx_ring::queued, wpi_softc::txq, WPI_TX_RING_HIMARK, WPI_TXQ_STATE_LOCK, and WPI_TXQ_STATE_UNLOCK.

Referenced by wpi_raw_xmit(), and wpi_transmit().

Here is the caller graph for this function:

◆ wpi_tx_timeout()

static void wpi_tx_timeout ( void *  arg)
static

Definition at line 3200 of file if_wpi.c.

References wpi_softc::sc_ic.

Referenced by wpi_cmd2(), and wpi_tx_done().

Here is the caller graph for this function:

◆ wpi_unload_firmware()

static void wpi_unload_firmware ( struct wpi_softc sc)
static

Free the referenced firmware image

Definition at line 5114 of file if_wpi.c.

References wpi_softc::fw_fp.

Referenced by wpi_init(), and wpi_read_firmware().

Here is the caller graph for this function:

◆ wpi_update_beacon()

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

Definition at line 4430 of file if_wpi.c.

References DPRINTF, wpi_buf::m, wpi_softc::sc_dev, wpi_config_beacon(), WPI_VAP, WPI_VAP_LOCK, WPI_VAP_UNLOCK, and wpi_vap::wv_bcbuf.

Referenced by wpi_vap_create().

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

◆ wpi_update_mcast()

static void wpi_update_mcast ( struct ieee80211com *  ic)
static

Definition at line 3599 of file if_wpi.c.

Referenced by wpi_attach().

Here is the caller graph for this function:

◆ wpi_update_promisc()

static void wpi_update_promisc ( struct ieee80211com *  ic)
static

Definition at line 3577 of file if_wpi.c.

References wpi_softc::sc_dev, wpi_softc::sc_running, WPI_LOCK, WPI_RXON_LOCK, WPI_RXON_UNLOCK, wpi_send_rxon(), wpi_set_promisc(), and WPI_UNLOCK.

Referenced by wpi_attach().

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

◆ wpi_update_rx_ring()

static void wpi_update_rx_ring ( struct wpi_softc sc)
static

Definition at line 1078 of file if_wpi.c.

References wpi_rx_ring::cur, wpi_softc::rxq, WPI_FH_RX_WPTR, and WPI_WRITE.

Referenced by wpi_attach(), wpi_cmd_done(), wpi_update_rx_ring_ps(), and wpi_wakeup_intr().

Here is the caller graph for this function:

◆ wpi_update_rx_ring_ps()

static void wpi_update_rx_ring_ps ( struct wpi_softc sc)
static

Definition at line 1084 of file if_wpi.c.

References DPRINTF, wpi_softc::rxq, wpi_rx_ring::update, WPI_CLRBITS, WPI_GP_CNTRL, WPI_GP_CNTRL_MAC_ACCESS_REQ, WPI_GP_CNTRL_SLEEP, WPI_READ, WPI_SETBITS, WPI_TXQ_LOCK, WPI_TXQ_UNLOCK, and wpi_update_rx_ring().

Referenced by wpi_cmd_done().

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

◆ wpi_update_tx_ring()

static void wpi_update_tx_ring ( struct wpi_softc sc,
struct wpi_tx_ring ring 
)
static

Definition at line 1235 of file if_wpi.c.

References wpi_tx_ring::cur, wpi_tx_ring::qid, WPI_HBUS_TARG_WRPTR, and WPI_WRITE.

Referenced by wpi_attach(), wpi_cmd_done(), wpi_update_tx_ring_ps(), and wpi_wakeup_intr().

Here is the caller graph for this function:

◆ wpi_update_tx_ring_ps()

static void wpi_update_tx_ring_ps ( struct wpi_softc sc,
struct wpi_tx_ring ring 
)
static

Definition at line 1241 of file if_wpi.c.

References DPRINTF, wpi_tx_ring::qid, wpi_tx_ring::update, WPI_CLRBITS, WPI_GP_CNTRL, WPI_GP_CNTRL_MAC_ACCESS_REQ, WPI_GP_CNTRL_SLEEP, WPI_READ, WPI_SETBITS, and wpi_update_tx_ring().

Referenced by wpi_cmd_done().

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

◆ wpi_updateedca()

static int wpi_updateedca ( struct ieee80211com *  ic)
static

Definition at line 3523 of file if_wpi.c.

References wpi_edca_params::ac, wpi_edca_params::aifsn, wpi_edca_params::cwmax, wpi_edca_params::cwmin, DPRINTF, wpi_edca_params::flags, wpi_edca_params::txoplimit, wpi_cmd(), WPI_CMD_EDCA_PARAMS, WPI_EDCA_UPDATE, and WPI_EXP2.

Referenced by wpi_attach(), and wpi_newstate().

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

◆ wpi_vap_create()

static struct ieee80211vap * wpi_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 622 of file if_wpi.c.

References wpi_ibss_recv_mgmt(), WPI_ID_IBSS_MAX, WPI_ID_IBSS_MIN, wpi_init_beacon(), wpi_key_delete(), wpi_key_set(), wpi_newstate(), wpi_update_beacon(), WPI_VAP_LOCK_INIT, wpi_vap::wv_newstate, wpi_vap::wv_recv_mgmt, and wpi_vap::wv_vap.

Referenced by wpi_attach(), and wpi_detach().

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

◆ wpi_vap_delete()

static void wpi_vap_delete ( struct ieee80211vap *  vap)
static

Definition at line 663 of file if_wpi.c.

References wpi_buf::m, WPI_VAP, WPI_VAP_LOCK_DESTROY, and wpi_vap::wv_bcbuf.

Referenced by wpi_attach().

Here is the caller graph for this function:

◆ wpi_wakeup_intr()

static void wpi_wakeup_intr ( struct wpi_softc sc)
static

Definition at line 2386 of file if_wpi.c.

References DPRINTF, wpi_tx_ring::qid, wpi_softc::rxq, wpi_softc::txq, wpi_tx_ring::update, wpi_rx_ring::update, WPI_CLRBITS, WPI_DRV_NTXQUEUES, WPI_GP_CNTRL, WPI_GP_CNTRL_MAC_ACCESS_REQ, WPI_TXQ_LOCK, WPI_TXQ_UNLOCK, wpi_update_rx_ring(), and wpi_update_tx_ring().

Referenced by wpi_intr().

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

◆ wpi_watchdog_rfkill()

static void wpi_watchdog_rfkill ( void *  arg)
static

Definition at line 3173 of file if_wpi.c.

References DPRINTF, wpi_softc::sc_ic, wpi_softc::sc_radioon_task, wpi_softc::watchdog_rfkill, WPI_APMG_RFKILL, wpi_prph_read(), and wpi_watchdog_rfkill().

Referenced by wpi_init(), wpi_radio_off(), and wpi_watchdog_rfkill().

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

Variable Documentation

◆ wpi_devclass

devclass_t wpi_devclass
static

Definition at line 305 of file if_wpi.c.

◆ wpi_driver

driver_t wpi_driver
static
Initial value:
= {
"wpi",
sizeof (struct wpi_softc)
}
static device_method_t wpi_methods[]
Definition: if_wpi.c:288

Definition at line 300 of file if_wpi.c.

◆ wpi_ident_table

const struct wpi_ident wpi_ident_table[]
static
Initial value:
= {
{ 0x8086, 0x4222, 0x0, "Intel(R) PRO/Wireless 3945ABG" },
{ 0x8086, 0x4227, 0x0, "Intel(R) PRO/Wireless 3945ABG" },
{ 0x8086, 0x4222, 0x1005, "Intel(R) PRO/Wireless 3945BG" },
{ 0x8086, 0x4222, 0x1034, "Intel(R) PRO/Wireless 3945BG" },
{ 0x8086, 0x4227, 0x1014, "Intel(R) PRO/Wireless 3945BG" },
{ 0x8086, 0x4222, 0x1044, "Intel(R) PRO/Wireless 3945BG" },
{ 0, 0, 0, NULL }
}

Definition at line 118 of file if_wpi.c.

Referenced by wpi_attach(), and wpi_probe().

◆ wpi_methods

device_method_t wpi_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, wpi_probe),
DEVMETHOD(device_attach, wpi_attach),
DEVMETHOD(device_detach, wpi_detach),
DEVMETHOD(device_shutdown, wpi_shutdown),
DEVMETHOD(device_suspend, wpi_suspend),
DEVMETHOD(device_resume, wpi_resume),
DEVMETHOD_END
}
static int wpi_probe(device_t)
Definition: if_wpi.c:316
static int wpi_resume(device_t)
Definition: if_wpi.c:758
static int wpi_shutdown(device_t)
Definition: if_wpi.c:739
static int wpi_suspend(device_t)
Definition: if_wpi.c:748
static int wpi_detach(device_t)
Definition: if_wpi.c:683
static int wpi_attach(device_t)
Definition: if_wpi.c:331

Definition at line 288 of file if_wpi.c.