drivers/net/wireless/ath/wil6210/interrupt.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/wil6210/interrupt.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/wil6210/interrupt.c- Extension
.c- Size
- 25167 bytes
- Lines
- 916
- 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/interrupt.hwil6210.htrace.h
Detected Declarations
function Copyrightfunction wil_ioread32_and_clearfunction wil6210_mask_irq_txfunction wil6210_mask_irq_tx_edmafunction wil6210_mask_irq_rxfunction wil6210_mask_irq_rx_edmafunction wil6210_mask_irq_miscfunction wil6210_mask_halpfunction wil6210_mask_irq_pseudofunction wil6210_unmask_irq_txfunction wil6210_unmask_irq_tx_edmafunction wil6210_unmask_irq_rxfunction wil6210_unmask_irq_rx_edmafunction wil6210_unmask_irq_miscfunction wil6210_unmask_halpfunction wil6210_unmask_irq_pseudofunction wil_mask_irqfunction wil_unmask_irqfunction wil_configure_interrupt_moderation_edmafunction wil_configure_interrupt_moderationfunction wil6210_irq_rxfunction wil6210_irq_rx_edmafunction wil6210_irq_tx_edmafunction wil6210_irq_txfunction wil_notify_fw_errorfunction wil_cache_mbox_regsfunction wil_validate_mbox_regsfunction wil6210_irq_miscfunction wil6210_irq_misc_threadfunction wil6210_thread_irqfunction wil6210_debug_irq_maskfunction wil6210_hardirqfunction wil6210_request_3msifunction wil_clear32function wil6210_clear_irqfunction wil6210_set_halpfunction wil6210_clear_halpfunction wil6210_init_irqfunction wil6210_fini_irq
Annotated Snippet
if (likely(test_bit(wil_status_fwready, wil->status))) {
if (likely(test_bit(wil_status_napi_en, wil->status))) {
wil_dbg_txrx(wil, "NAPI(Rx) schedule\n");
need_unmask = false;
napi_schedule(&wil->napi_rx);
} else {
wil_err_ratelimited(
wil,
"Got Rx interrupt while stopping interface\n");
}
} else {
wil_err_ratelimited(wil, "Got Rx interrupt while in reset\n");
}
}
if (unlikely(isr))
wil_err(wil, "un-handled RX ISR bits 0x%08x\n", isr);
/* Rx IRQ will be enabled when NAPI processing finished */
atomic_inc(&wil->isr_count_rx);
if (unlikely(need_unmask))
wil6210_unmask_irq_rx(wil);
return IRQ_HANDLED;
}
static irqreturn_t wil6210_irq_rx_edma(int irq, void *cookie)
{
struct wil6210_priv *wil = cookie;
u32 isr;
bool need_unmask = true;
wil6210_mask_irq_rx_edma(wil);
isr = wil_ioread32_and_clear(wil->csr +
HOSTADDR(RGF_INT_GEN_RX_ICR) +
offsetof(struct RGF_ICR, ICR));
trace_wil6210_irq_rx(isr);
wil_dbg_irq(wil, "ISR RX 0x%08x\n", isr);
if (unlikely(!isr)) {
wil_err(wil, "spurious IRQ: RX\n");
wil6210_unmask_irq_rx_edma(wil);
return IRQ_NONE;
}
if (likely(isr & BIT_RX_STATUS_IRQ)) {
wil_dbg_irq(wil, "RX status ring\n");
isr &= ~BIT_RX_STATUS_IRQ;
if (likely(test_bit(wil_status_fwready, wil->status))) {
if (likely(test_bit(wil_status_napi_en, wil->status))) {
wil_dbg_txrx(wil, "NAPI(Rx) schedule\n");
need_unmask = false;
napi_schedule(&wil->napi_rx);
} else {
wil_err(wil,
"Got Rx interrupt while stopping interface\n");
}
} else {
wil_err(wil, "Got Rx interrupt while in reset\n");
}
}
if (unlikely(isr))
wil_err(wil, "un-handled RX ISR bits 0x%08x\n", isr);
/* Rx IRQ will be enabled when NAPI processing finished */
atomic_inc(&wil->isr_count_rx);
if (unlikely(need_unmask))
wil6210_unmask_irq_rx_edma(wil);
return IRQ_HANDLED;
}
static irqreturn_t wil6210_irq_tx_edma(int irq, void *cookie)
{
struct wil6210_priv *wil = cookie;
u32 isr;
bool need_unmask = true;
wil6210_mask_irq_tx_edma(wil);
isr = wil_ioread32_and_clear(wil->csr +
HOSTADDR(RGF_INT_GEN_TX_ICR) +
offsetof(struct RGF_ICR, ICR));
Annotation
- Immediate include surface: `linux/interrupt.h`, `wil6210.h`, `trace.h`.
- Detected declarations: `function Copyright`, `function wil_ioread32_and_clear`, `function wil6210_mask_irq_tx`, `function wil6210_mask_irq_tx_edma`, `function wil6210_mask_irq_rx`, `function wil6210_mask_irq_rx_edma`, `function wil6210_mask_irq_misc`, `function wil6210_mask_halp`, `function wil6210_mask_irq_pseudo`, `function wil6210_unmask_irq_tx`.
- 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.