drivers/net/wireless/mediatek/mt76/mt7996/coredump.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/mediatek/mt76/mt7996/coredump.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/mediatek/mt76/mt7996/coredump.c- Extension
.c- Size
- 6405 bytes
- Lines
- 269
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/devcoredump.hlinux/kernel.hlinux/types.hlinux/utsname.hcoredump.h
Detected Declarations
function mt7996_coredump_get_mem_layoutfunction mt7996_coredump_get_mem_sizefunction mt7996_coredump_fw_statefunction mt7996_coredump_fw_stackfunction mt7996_coredump_submitfunction mt7996_coredump_registerfunction mt7996_coredump_unregister
Annotated Snippet
if (!crash_data->memdump_buf) {
vfree(crash_data);
return -ENOMEM;
}
}
return 0;
}
void mt7996_coredump_unregister(struct mt7996_dev *dev)
{
if (dev->coredump.crash_data->memdump_buf) {
vfree(dev->coredump.crash_data->memdump_buf);
dev->coredump.crash_data->memdump_buf = NULL;
dev->coredump.crash_data->memdump_buf_len = 0;
}
vfree(dev->coredump.crash_data);
dev->coredump.crash_data = NULL;
}
Annotation
- Immediate include surface: `linux/devcoredump.h`, `linux/kernel.h`, `linux/types.h`, `linux/utsname.h`, `coredump.h`.
- Detected declarations: `function mt7996_coredump_get_mem_layout`, `function mt7996_coredump_get_mem_size`, `function mt7996_coredump_fw_state`, `function mt7996_coredump_fw_stack`, `function mt7996_coredump_submit`, `function mt7996_coredump_register`, `function mt7996_coredump_unregister`.
- 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.
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.