drivers/net/wireless/ath/wil6210/wil6210.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/wil6210/wil6210.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/wil6210/wil6210.h- Extension
.h- Size
- 49760 bytes
- Lines
- 1449
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/etherdevice.hlinux/netdevice.hlinux/wireless.hnet/cfg80211.hlinux/timex.hlinux/types.hlinux/irqreturn.hwmi.hwil_platform.hfw.h
Detected Declarations
struct wil6210_privstruct wil6210_vifstruct wil_suspend_count_statsstruct wil_suspend_statsstruct RGF_ICRstruct wil_ring_dma_addrstruct fw_mapstruct wil6210_mbox_ringstruct wil6210_mbox_ring_descstruct wil6210_mbox_ctlstruct wil6210_mbox_hdrstruct pending_wmi_eventstruct wil_ctxstruct wil_desc_ring_rx_swtailstruct wil_ringstruct wil_ring_rx_datastruct wil_status_ringstruct wil_net_statsstruct wil_txrx_opsstruct wil_ring_tx_datastruct pci_devstruct wil_tid_ampdu_rxstruct wil_tid_crypto_rx_singlestruct wil_tid_crypto_rxstruct wil_p2p_infostruct wil_sta_infostruct wil_probe_client_reqstruct pmc_ctxstruct wil_halpstruct wil_blob_wrapperstruct blink_on_off_timestruct wil_debugfs_iomem_datastruct wil_debugfs_datastruct wil6210_vifstruct wil_rx_buffstruct wil_rx_buff_mgmtstruct wil_fw_stats_globalstruct wil_brd_infostruct wil6210_privenum wil_sta_statusenum wil_rekey_stateenum wil6210_vif_statusfunction WIL_GET_BITSfunction wil_mtu2macbuffunction mk_cidxtidfunction parse_cidxtidfunction vif_to_radio_wdevfunction wil_r
Annotated Snippet
struct wil_suspend_count_stats {
unsigned long successful_suspends;
unsigned long successful_resumes;
unsigned long failed_suspends;
unsigned long failed_resumes;
};
struct wil_suspend_stats {
struct wil_suspend_count_stats r_off;
struct wil_suspend_count_stats r_on;
unsigned long rejected_by_device; /* only radio on */
unsigned long rejected_by_host;
};
/* Calculate MAC buffer size for the firmware. It includes all overhead,
* as it will go over the air, and need to be 8 byte aligned
*/
static inline u32 wil_mtu2macbuf(u32 mtu)
{
return ALIGN(mtu + WIL_MAX_MPDU_OVERHEAD, 8);
}
/* MTU for Ethernet need to take into account 8-byte SNAP header
* to be added when encapsulating Ethernet frame into 802.11
*/
#define WIL_MAX_ETH_MTU (IEEE80211_MAX_DATA_LEN_DMG - 8)
/* Max supported by wil6210 value for interrupt threshold is 5sec. */
#define WIL6210_ITR_TRSH_MAX (5000000)
#define WIL6210_ITR_TX_INTERFRAME_TIMEOUT_DEFAULT (13) /* usec */
#define WIL6210_ITR_RX_INTERFRAME_TIMEOUT_DEFAULT (13) /* usec */
#define WIL6210_ITR_TX_MAX_BURST_DURATION_DEFAULT (500) /* usec */
#define WIL6210_ITR_RX_MAX_BURST_DURATION_DEFAULT (500) /* usec */
#define WIL6210_FW_RECOVERY_RETRIES (5) /* try to recover this many times */
#define WIL6210_FW_RECOVERY_TO msecs_to_jiffies(5000)
#define WIL6210_SCAN_TO msecs_to_jiffies(10000)
#define WIL6210_DISCONNECT_TO_MS (2000)
#define WIL6210_RX_HIGH_TRSH_INIT (0)
#define WIL6210_RX_HIGH_TRSH_DEFAULT \
(1 << (WIL_RX_RING_SIZE_ORDER_DEFAULT - 3))
#define WIL_MAX_DMG_AID 254 /* for DMG only 1-254 allowed (see
* 802.11REVmc/D5.0, section 9.4.1.8)
*/
/* Hardware definitions begin */
/*
* Mapping
* RGF File | Host addr | FW addr
* | |
* user_rgf | 0x000000 | 0x880000
* dma_rgf | 0x001000 | 0x881000
* pcie_rgf | 0x002000 | 0x882000
* | |
*/
/* Where various structures placed in host address space */
#define WIL6210_FW_HOST_OFF (0x880000UL)
#define HOSTADDR(fwaddr) (fwaddr - WIL6210_FW_HOST_OFF)
/*
* Interrupt control registers block
*
* each interrupt controlled by the same bit in all registers
*/
struct RGF_ICR {
u32 ICC; /* Cause Control, RW: 0 - W1C, 1 - COR */
u32 ICR; /* Cause, W1C/COR depending on ICC */
u32 ICM; /* Cause masked (ICR & ~IMV), W1C/COR depending on ICC */
u32 ICS; /* Cause Set, WO */
u32 IMV; /* Mask, RW+S/C */
u32 IMS; /* Mask Set, write 1 to set */
u32 IMC; /* Mask Clear, write 1 to clear */
} __packed;
/* registers - FW addresses */
#define RGF_USER_USAGE_1 (0x880004)
#define RGF_USER_USAGE_2 (0x880008)
#define RGF_USER_USAGE_6 (0x880018)
#define BIT_USER_OOB_MODE BIT(31)
#define BIT_USER_OOB_R2_MODE BIT(30)
#define RGF_USER_USAGE_8 (0x880020)
#define BIT_USER_PREVENT_DEEP_SLEEP BIT(0)
#define BIT_USER_SUPPORT_T_POWER_ON_0 BIT(1)
#define BIT_USER_EXT_CLK BIT(2)
#define RGF_USER_HW_MACHINE_STATE (0x8801dc)
#define HW_MACHINE_BOOT_DONE (0x3fffffd)
#define RGF_USER_USER_CPU_0 (0x8801e0)
#define BIT_USER_USER_CPU_MAN_RST BIT(1) /* user_cpu_man_rst */
#define RGF_USER_CPU_PC (0x8801e8)
#define RGF_USER_MAC_CPU_0 (0x8801fc)
Annotation
- Immediate include surface: `linux/etherdevice.h`, `linux/netdevice.h`, `linux/wireless.h`, `net/cfg80211.h`, `linux/timex.h`, `linux/types.h`, `linux/irqreturn.h`, `wmi.h`.
- Detected declarations: `struct wil6210_priv`, `struct wil6210_vif`, `struct wil_suspend_count_stats`, `struct wil_suspend_stats`, `struct RGF_ICR`, `struct wil_ring_dma_addr`, `struct fw_map`, `struct wil6210_mbox_ring`, `struct wil6210_mbox_ring_desc`, `struct wil6210_mbox_ctl`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.