drivers/net/wireless/ath/ath12k/acpi.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/acpi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath12k/acpi.c- Extension
.c- Size
- 13593 bytes
- Lines
- 511
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
core.hacpi.hdebug.h
Detected Declarations
function Copyrightfunction ath12k_acpi_set_power_limitfunction ath12k_acpi_set_bios_sar_powerfunction ath12k_acpi_dsm_notifyfunction ath12k_acpi_set_bios_sar_paramsfunction ath12k_acpi_set_tas_paramsfunction ath12k_acpi_get_disable_rfkillfunction ath12k_acpi_get_disable_11befunction ath12k_acpi_set_dsm_funcfunction ath12k_acpi_startfunction ath12k_acpi_check_bdf_variant_namefunction ath12k_acpi_stop
Annotated Snippet
switch (func) {
case ATH12K_ACPI_DSM_FUNC_SUPPORT_FUNCS:
ab->acpi.func_bit = obj->integer.value;
break;
case ATH12K_ACPI_DSM_FUNC_DISABLE_FLAG:
ab->acpi.bit_flag = obj->integer.value;
break;
}
} else if (obj->type == ACPI_TYPE_STRING) {
switch (func) {
case ATH12K_ACPI_DSM_FUNC_BDF_EXT:
if (obj->string.length <= ATH12K_ACPI_BDF_ANCHOR_STRING_LEN ||
obj->string.length > ATH12K_ACPI_BDF_MAX_LEN ||
memcmp(obj->string.pointer, ATH12K_ACPI_BDF_ANCHOR_STRING,
ATH12K_ACPI_BDF_ANCHOR_STRING_LEN)) {
ath12k_warn(ab, "invalid ACPI DSM BDF size: %d\n",
obj->string.length);
ret = -EINVAL;
goto out;
}
memcpy(ab->acpi.bdf_string, obj->string.pointer,
obj->buffer.length);
break;
}
} else if (obj->type == ACPI_TYPE_BUFFER) {
switch (func) {
case ATH12K_ACPI_DSM_FUNC_SUPPORT_FUNCS:
if (obj->buffer.length < ATH12K_ACPI_DSM_FUNC_MIN_BITMAP_SIZE ||
obj->buffer.length > ATH12K_ACPI_DSM_FUNC_MAX_BITMAP_SIZE) {
ath12k_warn(ab, "invalid ACPI DSM func size: %d\n",
obj->buffer.length);
ret = -EINVAL;
goto out;
}
ab->acpi.func_bit = 0;
for (i = 0; i < obj->buffer.length; i++)
ab->acpi.func_bit += obj->buffer.pointer[i] << (i * 8);
break;
case ATH12K_ACPI_DSM_FUNC_TAS_CFG:
if (obj->buffer.length != ATH12K_ACPI_DSM_TAS_CFG_SIZE) {
ath12k_warn(ab, "invalid ACPI DSM TAS config size: %d\n",
obj->buffer.length);
ret = -EINVAL;
goto out;
}
memcpy(&ab->acpi.tas_cfg, obj->buffer.pointer,
obj->buffer.length);
break;
case ATH12K_ACPI_DSM_FUNC_TAS_DATA:
if (obj->buffer.length != ATH12K_ACPI_DSM_TAS_DATA_SIZE) {
ath12k_warn(ab, "invalid ACPI DSM TAS data size: %d\n",
obj->buffer.length);
ret = -EINVAL;
goto out;
}
memcpy(&ab->acpi.tas_sar_power_table, obj->buffer.pointer,
obj->buffer.length);
break;
case ATH12K_ACPI_DSM_FUNC_BIOS_SAR:
if (obj->buffer.length != ATH12K_ACPI_DSM_BIOS_SAR_DATA_SIZE) {
ath12k_warn(ab, "invalid ACPI BIOS SAR data size: %d\n",
obj->buffer.length);
ret = -EINVAL;
goto out;
}
memcpy(&ab->acpi.bios_sar_data, obj->buffer.pointer,
obj->buffer.length);
break;
case ATH12K_ACPI_DSM_FUNC_GEO_OFFSET:
if (obj->buffer.length != ATH12K_ACPI_DSM_GEO_OFFSET_DATA_SIZE) {
ath12k_warn(ab, "invalid ACPI GEO OFFSET data size: %d\n",
obj->buffer.length);
ret = -EINVAL;
goto out;
}
memcpy(&ab->acpi.geo_offset_data, obj->buffer.pointer,
obj->buffer.length);
break;
Annotation
- Immediate include surface: `core.h`, `acpi.h`, `debug.h`.
- Detected declarations: `function Copyright`, `function ath12k_acpi_set_power_limit`, `function ath12k_acpi_set_bios_sar_power`, `function ath12k_acpi_dsm_notify`, `function ath12k_acpi_set_bios_sar_params`, `function ath12k_acpi_set_tas_params`, `function ath12k_acpi_get_disable_rfkill`, `function ath12k_acpi_get_disable_11be`, `function ath12k_acpi_set_dsm_func`, `function ath12k_acpi_start`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.