drivers/net/wireless/marvell/libertas/firmware.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/marvell/libertas/firmware.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/marvell/libertas/firmware.c- Extension
.c- Size
- 5721 bytes
- Lines
- 229
- 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
linux/sched.hlinux/firmware.hlinux/module.hdev.hdecl.h
Detected Declarations
function lbs_fw_loadedfunction do_load_firmwarefunction main_firmware_cbfunction helper_firmware_cbfunction load_next_firmware_from_tablefunction lbs_wait_for_firmware_loadfunction firmwarefunction lbs_get_firmwareexport lbs_get_firmware_asyncexport lbs_get_firmware
Annotated Snippet
if (*helper == NULL) {
ret = request_firmware(helper, iter->helper, dev);
if (ret)
goto next;
/* If the device has one-stage firmware (ie cf8305) and
* we've got it then we don't need to bother with the
* main firmware.
*/
if (iter->fwname == NULL)
return 0;
}
if (*mainfw == NULL) {
ret = request_firmware(mainfw, iter->fwname, dev);
if (ret) {
/* Clear the helper to ensure we don't have
* mismatched firmware pairs.
*/
release_firmware(*helper);
*helper = NULL;
}
}
if (*helper && *mainfw)
return 0;
next:
iter++;
}
/* Failed */
release_firmware(*helper);
*helper = NULL;
release_firmware(*mainfw);
*mainfw = NULL;
return -ENOENT;
}
EXPORT_SYMBOL_GPL(lbs_get_firmware);
Annotation
- Immediate include surface: `linux/sched.h`, `linux/firmware.h`, `linux/module.h`, `dev.h`, `decl.h`.
- Detected declarations: `function lbs_fw_loaded`, `function do_load_firmware`, `function main_firmware_cb`, `function helper_firmware_cb`, `function load_next_firmware_from_table`, `function lbs_wait_for_firmware_load`, `function firmware`, `function lbs_get_firmware`, `export lbs_get_firmware_async`, `export lbs_get_firmware`.
- 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.