drivers/net/wireless/intel/iwlwifi/mld/fw.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/mld/fw.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intel/iwlwifi/mld/fw.c- Extension
.c- Size
- 12978 bytes
- Lines
- 549
- 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
mld.hfw/api/alive.hfw/api/scan.hfw/api/rx.hphy.hfw/dbg.hfw/pnvm.hhcmd.hpower.hmcc.hled.hcoex.hregulatory.hthermal.h
Detected Declarations
struct iwl_mld_alive_datafunction Copyrightfunction iwl_mld_send_rss_cfg_cmdfunction iwl_mld_config_scanfunction iwl_mld_alive_imr_datafunction iwl_alive_fnfunction iwl_mld_print_alive_notif_timeoutfunction iwl_mld_load_fw_wait_alivefunction iwl_mld_run_fw_init_sequencefunction iwl_mld_load_fwfunction iwl_mld_stop_fwfunction iwl_mld_restart_disconnect_iterfunction iwl_mld_send_recovery_cmdfunction iwl_mld_config_fwfunction iwl_mld_start_fw
Annotated Snippet
struct iwl_mld_alive_data {
__le32 sku_id[3];
bool valid;
};
static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
struct iwl_rx_packet *pkt, void *data)
{
unsigned int pkt_len = iwl_rx_packet_payload_len(pkt);
unsigned int expected_sz;
struct iwl_mld *mld =
container_of(notif_wait, struct iwl_mld, notif_wait);
struct iwl_trans *trans = mld->trans;
u32 version = iwl_fw_lookup_notif_ver(mld->fw, LEGACY_GROUP,
UCODE_ALIVE_NTFY, 0);
struct iwl_mld_alive_data *alive_data = data;
struct iwl_alive_ntf *palive;
struct iwl_umac_alive *umac;
struct iwl_lmac_alive *lmac1;
struct iwl_lmac_alive *lmac2 = NULL;
u32 lmac_error_event_table;
u32 umac_error_table;
u16 status;
switch (version) {
case 7:
expected_sz = sizeof(struct iwl_alive_ntf_v7);
break;
case 8:
expected_sz = sizeof(struct iwl_alive_ntf);
break;
default:
return false;
}
if (pkt_len != expected_sz)
return false;
palive = (void *)pkt->data;
iwl_mld_alive_imr_data(trans, &palive->imr);
umac = &palive->umac_data;
lmac1 = &palive->lmac_data[0];
lmac2 = &palive->lmac_data[1];
status = le16_to_cpu(palive->status);
BUILD_BUG_ON(sizeof(alive_data->sku_id) !=
sizeof(palive->sku_id.data));
memcpy(alive_data->sku_id, palive->sku_id.data,
sizeof(palive->sku_id.data));
IWL_DEBUG_FW(mld, "Got sku_id: 0x0%x 0x0%x 0x0%x\n",
le32_to_cpu(alive_data->sku_id[0]),
le32_to_cpu(alive_data->sku_id[1]),
le32_to_cpu(alive_data->sku_id[2]));
lmac_error_event_table =
le32_to_cpu(lmac1->dbg_ptrs.error_event_table_ptr);
iwl_fw_lmac1_set_alive_err_table(trans, lmac_error_event_table);
if (lmac2)
trans->dbg.lmac_error_event_table[1] =
le32_to_cpu(lmac2->dbg_ptrs.error_event_table_ptr);
umac_error_table = le32_to_cpu(umac->dbg_ptrs.error_info_addr) &
~FW_ADDR_CACHE_CONTROL;
iwl_fw_umac_set_alive_err_table(trans, umac_error_table);
alive_data->valid = status == IWL_ALIVE_STATUS_OK;
IWL_DEBUG_FW(mld,
"Alive ucode status 0x%04x revision 0x%01X 0x%01X\n",
status, lmac1->ver_type, lmac1->ver_subtype);
if (lmac2)
IWL_DEBUG_FW(mld, "Alive ucode CDB\n");
IWL_DEBUG_FW(mld,
"UMAC version: Major - 0x%x, Minor - 0x%x\n",
le32_to_cpu(umac->umac_major),
le32_to_cpu(umac->umac_minor));
IWL_DEBUG_FW(mld, "FW alive flags 0x%x\n",
le16_to_cpu(palive->flags));
if (version >= 8)
IWL_DEBUG_FW(mld, "platform_id 0x%llx\n",
le64_to_cpu(palive->platform_id));
Annotation
- Immediate include surface: `mld.h`, `fw/api/alive.h`, `fw/api/scan.h`, `fw/api/rx.h`, `phy.h`, `fw/dbg.h`, `fw/pnvm.h`, `hcmd.h`.
- Detected declarations: `struct iwl_mld_alive_data`, `function Copyright`, `function iwl_mld_send_rss_cfg_cmd`, `function iwl_mld_config_scan`, `function iwl_mld_alive_imr_data`, `function iwl_alive_fn`, `function iwl_mld_print_alive_notif_timeout`, `function iwl_mld_load_fw_wait_alive`, `function iwl_mld_run_fw_init_sequence`, `function iwl_mld_load_fw`.
- 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.