drivers/net/wireless/ath/ath11k/core.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath11k/core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath11k/core.c- Extension
.c- Size
- 70383 bytes
- Lines
- 2800
- 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.
- 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/export.hlinux/module.hlinux/slab.hlinux/remoteproc.hlinux/firmware.hlinux/of.hcore.hdp_tx.hdp_rx.hdebug.hhif.hwow.hfw.h
Detected Declarations
enum ath11k_bdf_name_typefunction ath11k_fw_stats_pdevs_freefunction list_for_each_entry_safefunction ath11k_fw_stats_vdevs_freefunction list_for_each_entry_safefunction ath11k_fw_stats_bcn_freefunction list_for_each_entry_safefunction ath11k_fw_stats_initfunction ath11k_fw_stats_freefunction ath11k_core_coldboot_cal_supportfunction ath11k_core_continue_suspend_resumefunction ath11k_core_suspend_wowfunction ath11k_core_suspend_defaultfunction ath11k_core_suspendfunction ath11k_core_suspend_latefunction ath11k_core_resume_earlyfunction ath11k_core_resume_defaultfunction ath11k_core_resume_wowfunction ath11k_core_resumefunction ath11k_core_check_cc_code_bdfextfunction ath11k_core_check_smbiosfunction ath11k_core_check_dtfunction __ath11k_core_create_board_namefunction ath11k_core_create_board_namefunction ath11k_core_create_fallback_board_namefunction ath11k_core_create_bus_type_board_namefunction ath11k_core_create_chip_id_board_namefunction ath11k_core_free_bdffunction ath11k_core_parse_bd_ie_boardfunction ath11k_core_fetch_board_data_api_nfunction ath11k_core_fetch_board_data_api_1function ath11k_core_fetch_bdffunction ath11k_core_fetch_regdbfunction ath11k_core_stopfunction ath11k_core_soc_createfunction ath11k_core_soc_destroyfunction ath11k_core_pdev_createfunction ath11k_core_pdev_suspend_targetfunction ath11k_core_pdev_destroyfunction ath11k_core_startfunction ath11k_core_start_firmwarefunction ath11k_core_qmi_firmware_readyfunction ath11k_core_reconfigure_on_crashfunction ath11k_core_haltfunction ath11k_update_11dfunction ath11k_core_pre_reconfigure_recoveryfunction ath11k_core_post_reconfigure_recoveryfunction ath11k_core_restart
Annotated Snippet
if (ret) {
ath11k_warn(ab, "failed to set country code during resume: %d\n",
ret);
return ret;
}
}
ret = ath11k_dp_rx_pktlog_start(ab);
if (ret)
ath11k_warn(ab, "failed to start rx pktlog during resume: %d\n",
ret);
return ret;
}
static int ath11k_core_resume_wow(struct ath11k_base *ab)
{
int ret;
ret = ath11k_hif_resume(ab);
if (ret) {
ath11k_warn(ab, "failed to resume hif during resume: %d\n", ret);
return ret;
}
ath11k_hif_ce_irq_enable(ab);
ath11k_hif_irq_enable(ab);
ret = ath11k_dp_rx_pktlog_start(ab);
if (ret) {
ath11k_warn(ab, "failed to start rx pktlog during resume: %d\n",
ret);
return ret;
}
ret = ath11k_wow_wakeup(ab);
if (ret) {
ath11k_warn(ab, "failed to wakeup wow during resume: %d\n", ret);
return ret;
}
return 0;
}
int ath11k_core_resume(struct ath11k_base *ab)
{
int ret;
ret = ath11k_core_continue_suspend_resume(ab);
if (ret <= 0)
return ret;
if (ab->actual_pm_policy == ATH11K_PM_WOW)
return ath11k_core_resume_wow(ab);
return ath11k_core_resume_default(ab);
}
EXPORT_SYMBOL(ath11k_core_resume);
static void ath11k_core_check_cc_code_bdfext(const struct dmi_header *hdr, void *data)
{
struct ath11k_base *ab = data;
const char *magic = ATH11K_SMBIOS_BDF_EXT_MAGIC;
struct ath11k_smbios_bdf *smbios = (struct ath11k_smbios_bdf *)hdr;
ssize_t copied;
size_t len;
int i;
if (ab->qmi.target.bdf_ext[0] != '\0')
return;
if (hdr->type != ATH11K_SMBIOS_BDF_EXT_TYPE)
return;
if (hdr->length != ATH11K_SMBIOS_BDF_EXT_LENGTH) {
ath11k_dbg(ab, ATH11K_DBG_BOOT,
"wrong smbios bdf ext type length (%d).\n",
hdr->length);
return;
}
spin_lock_bh(&ab->base_lock);
switch (smbios->country_code_flag) {
case ATH11K_SMBIOS_CC_ISO:
ab->new_alpha2[0] = (smbios->cc_code >> 8) & 0xff;
ab->new_alpha2[1] = smbios->cc_code & 0xff;
ath11k_dbg(ab, ATH11K_DBG_BOOT, "smbios cc_code %c%c\n",
ab->new_alpha2[0], ab->new_alpha2[1]);
break;
Annotation
- Immediate include surface: `linux/export.h`, `linux/module.h`, `linux/slab.h`, `linux/remoteproc.h`, `linux/firmware.h`, `linux/of.h`, `core.h`, `dp_tx.h`.
- Detected declarations: `enum ath11k_bdf_name_type`, `function ath11k_fw_stats_pdevs_free`, `function list_for_each_entry_safe`, `function ath11k_fw_stats_vdevs_free`, `function list_for_each_entry_safe`, `function ath11k_fw_stats_bcn_free`, `function list_for_each_entry_safe`, `function ath11k_fw_stats_init`, `function ath11k_fw_stats_free`, `function ath11k_core_coldboot_cal_support`.
- 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.