drivers/net/wireless/intel/iwlwifi/fw/regulatory.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/fw/regulatory.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/fw/regulatory.c- Extension
.c- Size
- 11645 bytes
- Lines
- 450
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dmi.hiwl-drv.hiwl-debug.hregulatory.hfw/runtime.hfw/uefi.h
Detected Declarations
function iwl_sar_geo_supportfunction iwl_sar_geo_fill_tablefunction iwl_sar_fill_tablefunction iwl_sar_fill_profilefunction iwl_is_ppag_approvedfunction iwl_bios_print_ppagfunction iwl_is_tas_approvedfunction iwl_parse_tas_selectionfunction iwl_add_mcc_to_tas_block_listfunction iwl_bios_get_dsmfunction iwl_puncturing_is_allowed_in_biosfunction iwl_rfi_is_enabled_in_bios
Annotated Snippet
if (!prof->enabled) {
IWL_DEBUG_RADIO(fwrt, "SAR profile %d is disabled.\n",
profs[i]);
/*
* if one of the profiles is disabled, we
* ignore all of them and return 1 to
* differentiate disabled from other failures.
*/
return 1;
}
IWL_DEBUG_INFO(fwrt,
"SAR EWRD: chain %d profile index %d\n",
i, profs[i]);
IWL_DEBUG_RADIO(fwrt, " Chain[%d]:\n", i);
for (j = 0; j < n_subbands; j++) {
per_chain[i * n_subbands + j] =
cpu_to_le16(prof->chains[i].subbands[j]);
IWL_DEBUG_RADIO(fwrt, " Band[%d] = %d * .125dBm\n",
j, prof->chains[i].subbands[j]);
}
}
return 0;
}
int iwl_sar_fill_profile(struct iwl_fw_runtime *fwrt,
__le16 *per_chain, u32 n_tables, u32 n_subbands,
int prof_a, int prof_b)
{
int i, ret = 0;
for (i = 0; i < n_tables; i++) {
ret = iwl_sar_fill_table(fwrt,
&per_chain[i * n_subbands * BIOS_SAR_NUM_CHAINS],
n_subbands, prof_a, prof_b);
if (ret)
break;
}
return ret;
}
IWL_EXPORT_SYMBOL(iwl_sar_fill_profile);
bool iwl_is_ppag_approved(struct iwl_fw_runtime *fwrt)
{
if (!dmi_check_system(dmi_ppag_approved_list)) {
IWL_DEBUG_RADIO(fwrt,
"System vendor '%s' is not in the approved list, disabling PPAG.\n",
dmi_get_system_info(DMI_SYS_VENDOR) ?: "<unknown>");
fwrt->ppag_flags = 0;
return false;
}
return true;
}
IWL_EXPORT_SYMBOL(iwl_is_ppag_approved);
/* Print the PPAG table as read from BIOS */
void iwl_bios_print_ppag(struct iwl_fw_runtime *fwrt, int n_subbands)
{
int i, j;
IWL_DEBUG_RADIO(fwrt, "PPAG table as read from BIOS:\n");
IWL_DEBUG_RADIO(fwrt, "PPAG revision = %d\n", fwrt->ppag_bios_rev);
IWL_DEBUG_RADIO(fwrt, "PPAG flags = 0x%x\n", fwrt->ppag_flags);
if (WARN_ON_ONCE(n_subbands >
ARRAY_SIZE(fwrt->ppag_chains[0].subbands)))
return;
for (i = 0; i < ARRAY_SIZE(fwrt->ppag_chains); i++)
for (j = 0; j < n_subbands; j++)
IWL_DEBUG_RADIO(fwrt,
"ppag_chains[%d].subbands[%d] = %d\n",
i, j,
fwrt->ppag_chains[i].subbands[j]);
}
bool iwl_is_tas_approved(void)
{
return dmi_check_system(dmi_tas_approved_list);
}
IWL_EXPORT_SYMBOL(iwl_is_tas_approved);
struct iwl_tas_selection_data
iwl_parse_tas_selection(const u32 tas_selection_in, const u8 tbl_rev)
{
struct iwl_tas_selection_data tas_selection_out = {};
u8 override_iec = u32_get_bits(tas_selection_in,
Annotation
- Immediate include surface: `linux/dmi.h`, `iwl-drv.h`, `iwl-debug.h`, `regulatory.h`, `fw/runtime.h`, `fw/uefi.h`.
- Detected declarations: `function iwl_sar_geo_support`, `function iwl_sar_geo_fill_table`, `function iwl_sar_fill_table`, `function iwl_sar_fill_profile`, `function iwl_is_ppag_approved`, `function iwl_bios_print_ppag`, `function iwl_is_tas_approved`, `function iwl_parse_tas_selection`, `function iwl_add_mcc_to_tas_block_list`, `function iwl_bios_get_dsm`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.