drivers/net/wireless/ath/ath12k/wifi7/pci.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/wifi7/pci.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath12k/wifi7/pci.c- Extension
.c- Size
- 5863 bytes
- Lines
- 216
- 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
linux/pci.h../pci.hpci.h../core.h../hif.h../mhi.hhw.h../hal.hdp.hcore.hhal.h
Detected Declarations
function ath12k_wifi7_pci_bus_wake_upfunction ath12k_wifi7_pci_bus_releasefunction ath12k_wifi7_pci_read_hw_versionfunction ath12k_wifi7_pci_probefunction ath12k_wifi7_pci_initfunction ath12k_wifi7_pci_exit
Annotated Snippet
switch (soc_hw_version_major) {
case ATH12K_PCI_W7_SOC_HW_VERSION_2:
ab->hw_rev = ATH12K_HW_QCN9274_HW20;
break;
case ATH12K_PCI_W7_SOC_HW_VERSION_1:
ab->hw_rev = ATH12K_HW_QCN9274_HW10;
break;
default:
dev_err(&pdev->dev,
"Unknown hardware version found for QCN9274: 0x%x\n",
soc_hw_version_major);
return -EOPNOTSUPP;
}
break;
case WCN7850_DEVICE_ID:
ab->id.bdf_search = ATH12K_BDF_SEARCH_BUS_AND_BOARD;
ab_pci->msi_config = &ath12k_wifi7_msi_config[0];
ab->static_window_map = false;
ab_pci->pci_ops = &ath12k_wifi7_pci_ops_wcn7850;
/*
* init window reg addr before reading hardware version
* as it will be used there
*/
ab_pci->window_reg_addr = WINDOW_REG_ADDRESS;
ath12k_wifi7_pci_read_hw_version(ab, &soc_hw_version_major,
&soc_hw_version_minor);
ab->target_mem_mode = ATH12K_QMI_MEMORY_MODE_DEFAULT;
switch (soc_hw_version_major) {
case ATH12K_PCI_W7_SOC_HW_VERSION_2:
ab->hw_rev = ATH12K_HW_WCN7850_HW20;
break;
default:
dev_err(&pdev->dev,
"Unknown hardware version found for WCN7850: 0x%x\n",
soc_hw_version_major);
return -EOPNOTSUPP;
}
break;
case QCC2072_DEVICE_ID:
ab->id.bdf_search = ATH12K_BDF_SEARCH_BUS_AND_BOARD;
ab_pci->msi_config = &ath12k_wifi7_msi_config[0];
ab->static_window_map = false;
ab_pci->pci_ops = &ath12k_wifi7_pci_ops_wcn7850;
ab_pci->window_reg_addr = WINDOW_REG_ADDRESS_QCC2072;
ab->target_mem_mode = ATH12K_QMI_MEMORY_MODE_DEFAULT;
/* there is only one version till now */
ab->hw_rev = ATH12K_HW_QCC2072_HW10;
break;
default:
dev_err(&pdev->dev, "Unknown Wi-Fi 7 PCI device found: 0x%x\n",
pci_dev->device);
return -EOPNOTSUPP;
}
ret = ath12k_wifi7_hw_init(ab);
if (ret) {
dev_err(&pdev->dev, "WiFi-7 hw_init for PCI failed: %d\n", ret);
return ret;
}
return 0;
}
static const struct ath12k_pci_reg_base ath12k_wifi7_reg_base = {
.umac_base = HAL_SEQ_WCSS_UMAC_OFFSET,
.ce_reg_base = HAL_CE_WFSS_CE_REG_BASE,
};
static struct ath12k_pci_driver ath12k_wifi7_pci_driver = {
.name = "ath12k_wifi7_pci",
.id_table = ath12k_wifi7_pci_id_table,
.ops.probe = ath12k_wifi7_pci_probe,
.reg_base = &ath12k_wifi7_reg_base,
.ops.arch_init = ath12k_wifi7_arch_init,
.ops.arch_deinit = ath12k_wifi7_arch_deinit,
};
int ath12k_wifi7_pci_init(void)
{
int ret;
ret = ath12k_pci_register_driver(ATH12K_DEVICE_FAMILY_WIFI7,
&ath12k_wifi7_pci_driver);
if (ret) {
pr_err("Failed to register ath12k Wi-Fi 7 driver: %d\n",
ret);
return ret;
}
return 0;
Annotation
- Immediate include surface: `linux/pci.h`, `../pci.h`, `pci.h`, `../core.h`, `../hif.h`, `../mhi.h`, `hw.h`, `../hal.h`.
- Detected declarations: `function ath12k_wifi7_pci_bus_wake_up`, `function ath12k_wifi7_pci_bus_release`, `function ath12k_wifi7_pci_read_hw_version`, `function ath12k_wifi7_pci_probe`, `function ath12k_wifi7_pci_init`, `function ath12k_wifi7_pci_exit`.
- 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.