drivers/net/wireless/mediatek/mt76/scan.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/mediatek/mt76/scan.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/mediatek/mt76/scan.c- Extension
.c- Size
- 5413 bytes
- Lines
- 225
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
mt76.h
Detected Declarations
function Copyrightfunction mt76_abort_scanfunction mt76_scan_send_probefunction mt76_scan_rx_beaconfunction mt76_scan_workfunction mt76_hw_scanfunction mt76_cancel_hw_scanexport mt76_abort_scanexport mt76_hw_scanexport mt76_cancel_hw_scan
Annotated Snippet
test_bit(MT76_MCU_RESET, &dev->phy.state)) {
ret = -EBUSY;
goto out;
}
mlink = mt76_get_vif_phy_link(phy, vif);
if (IS_ERR(mlink)) {
ret = PTR_ERR(mlink);
goto out;
}
memset(&dev->scan, 0, sizeof(dev->scan));
dev->scan.req = &req->req;
dev->scan.vif = vif;
dev->scan.phy = phy;
dev->scan.mlink = mlink;
ieee80211_queue_delayed_work(dev->phy.hw, &dev->scan_work, 0);
out:
mutex_unlock(&dev->mutex);
return ret;
}
EXPORT_SYMBOL_GPL(mt76_hw_scan);
void mt76_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{
struct mt76_phy *phy = hw->priv;
mt76_abort_scan(phy->dev);
}
EXPORT_SYMBOL_GPL(mt76_cancel_hw_scan);
Annotation
- Immediate include surface: `mt76.h`.
- Detected declarations: `function Copyright`, `function mt76_abort_scan`, `function mt76_scan_send_probe`, `function mt76_scan_rx_beacon`, `function mt76_scan_work`, `function mt76_hw_scan`, `function mt76_cancel_hw_scan`, `export mt76_abort_scan`, `export mt76_hw_scan`, `export mt76_cancel_hw_scan`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration 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.