drivers/net/wireless/ath/ath11k/hw.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath11k/hw.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath11k/hw.c- Extension
.c- Size
- 97530 bytes
- Lines
- 2876
- 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/types.hlinux/bitops.hlinux/bitfield.hcore.hce.hhif.hhal.hhw.h
Detected Declarations
function Copyrightfunction ath11k_hw_ipq6018_mac_from_pdev_idfunction ath11k_hw_ipq8074_tx_mesh_enablefunction ath11k_hw_qcn9074_tx_mesh_enablefunction ath11k_hw_wcn6855_tx_mesh_enablefunction ath11k_init_wmi_config_qca6390function ath11k_hw_ipq8074_reo_setupfunction ath11k_init_wmi_config_ipq8074function ath11k_hw_mac_id_to_pdev_id_ipq8074function ath11k_hw_mac_id_to_srng_id_ipq8074function ath11k_hw_mac_id_to_pdev_id_qca6390function ath11k_hw_mac_id_to_srng_id_qca6390function ath11k_hw_ipq8074_rx_desc_get_first_msdufunction ath11k_hw_ipq8074_rx_desc_get_last_msdufunction ath11k_hw_ipq8074_rx_desc_get_l3_pad_bytesfunction ath11k_hw_ipq8074_rx_desc_encrypt_validfunction ath11k_hw_ipq8074_rx_desc_get_encrypt_typefunction ath11k_hw_ipq8074_rx_desc_get_decap_typefunction ath11k_hw_ipq8074_rx_desc_get_mesh_ctlfunction ath11k_hw_ipq8074_rx_desc_get_ldpc_supportfunction ath11k_hw_ipq8074_rx_desc_get_mpdu_seq_ctl_vldfunction ath11k_hw_ipq8074_rx_desc_get_mpdu_fc_validfunction ath11k_hw_ipq8074_rx_desc_get_mpdu_start_seq_nofunction ath11k_hw_ipq8074_rx_desc_get_msdu_lenfunction ath11k_hw_ipq8074_rx_desc_get_msdu_sgifunction ath11k_hw_ipq8074_rx_desc_get_msdu_rate_mcsfunction ath11k_hw_ipq8074_rx_desc_get_msdu_rx_bwfunction ath11k_hw_ipq8074_rx_desc_get_msdu_freqfunction ath11k_hw_ipq8074_rx_desc_get_msdu_pkt_typefunction ath11k_hw_ipq8074_rx_desc_get_msdu_nssfunction ath11k_hw_ipq8074_rx_desc_get_mpdu_tidfunction ath11k_hw_ipq8074_rx_desc_get_mpdu_peer_idfunction ath11k_hw_ipq8074_rx_desc_copy_attn_endfunction ath11k_hw_ipq8074_rx_desc_get_mpdu_start_tagfunction ath11k_hw_ipq8074_rx_desc_get_mpdu_ppdu_idfunction ath11k_hw_ipq8074_rx_desc_set_msdu_lenfunction ath11k_hw_ipq8074_rx_desc_mac_addr2_validfunction ath11k_hw_qcn9074_rx_desc_get_first_msdufunction ath11k_hw_qcn9074_rx_desc_get_last_msdufunction ath11k_hw_qcn9074_rx_desc_get_l3_pad_bytesfunction ath11k_hw_qcn9074_rx_desc_encrypt_validfunction ath11k_hw_qcn9074_rx_desc_get_encrypt_typefunction ath11k_hw_qcn9074_rx_desc_get_decap_typefunction ath11k_hw_qcn9074_rx_desc_get_mesh_ctlfunction ath11k_hw_qcn9074_rx_desc_get_ldpc_supportfunction ath11k_hw_qcn9074_rx_desc_get_mpdu_seq_ctl_vldfunction ath11k_hw_qcn9074_rx_desc_get_mpdu_fc_validfunction ath11k_hw_qcn9074_rx_desc_get_mpdu_start_seq_no
Annotated Snippet
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/bitfield.h>
#include "core.h"
#include "ce.h"
#include "hif.h"
#include "hal.h"
#include "hw.h"
/* Map from pdev index to hw mac index */
static u8 ath11k_hw_ipq8074_mac_from_pdev_id(int pdev_idx)
{
switch (pdev_idx) {
case 0:
return 0;
case 1:
return 2;
case 2:
return 1;
default:
return ATH11K_INVALID_HW_MAC_ID;
}
}
static u8 ath11k_hw_ipq6018_mac_from_pdev_id(int pdev_idx)
{
return pdev_idx;
}
static void ath11k_hw_ipq8074_tx_mesh_enable(struct ath11k_base *ab,
struct hal_tcl_data_cmd *tcl_cmd)
{
tcl_cmd->info2 |= FIELD_PREP(HAL_IPQ8074_TCL_DATA_CMD_INFO2_MESH_ENABLE,
true);
}
static void ath11k_hw_qcn9074_tx_mesh_enable(struct ath11k_base *ab,
struct hal_tcl_data_cmd *tcl_cmd)
{
tcl_cmd->info3 |= FIELD_PREP(HAL_QCN9074_TCL_DATA_CMD_INFO3_MESH_ENABLE,
true);
}
static void ath11k_hw_wcn6855_tx_mesh_enable(struct ath11k_base *ab,
struct hal_tcl_data_cmd *tcl_cmd)
{
tcl_cmd->info3 |= FIELD_PREP(HAL_QCN9074_TCL_DATA_CMD_INFO3_MESH_ENABLE,
true);
}
static void ath11k_init_wmi_config_qca6390(struct ath11k_base *ab,
struct target_resource_config *config)
{
config->num_vdevs = ab->hw_params.num_vdevs;
config->num_peers = 16;
config->num_tids = 32;
config->num_offload_peers = 3;
config->num_offload_reorder_buffs = 3;
config->num_peer_keys = TARGET_NUM_PEER_KEYS;
config->ast_skid_limit = TARGET_AST_SKID_LIMIT;
config->tx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1;
config->rx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1;
config->rx_timeout_pri[0] = TARGET_RX_TIMEOUT_LO_PRI;
config->rx_timeout_pri[1] = TARGET_RX_TIMEOUT_LO_PRI;
config->rx_timeout_pri[2] = TARGET_RX_TIMEOUT_LO_PRI;
config->rx_timeout_pri[3] = TARGET_RX_TIMEOUT_HI_PRI;
config->rx_decap_mode = TARGET_DECAP_MODE_NATIVE_WIFI;
config->scan_max_pending_req = TARGET_SCAN_MAX_PENDING_REQS;
config->bmiss_offload_max_vdev = TARGET_BMISS_OFFLOAD_MAX_VDEV;
config->roam_offload_max_vdev = TARGET_ROAM_OFFLOAD_MAX_VDEV;
config->roam_offload_max_ap_profiles = TARGET_ROAM_OFFLOAD_MAX_AP_PROFILES;
config->num_mcast_groups = 0;
config->num_mcast_table_elems = 0;
config->mcast2ucast_mode = 0;
config->tx_dbg_log_size = TARGET_TX_DBG_LOG_SIZE;
config->num_wds_entries = 0;
config->dma_burst_size = 0;
config->rx_skip_defrag_timeout_dup_detection_check = 0;
config->vow_config = TARGET_VOW_CONFIG;
config->gtk_offload_max_vdev = 2;
config->num_msdu_desc = 0x400;
config->beacon_tx_offload_max_vdev = 2;
Annotation
- Immediate include surface: `linux/types.h`, `linux/bitops.h`, `linux/bitfield.h`, `core.h`, `ce.h`, `hif.h`, `hal.h`, `hw.h`.
- Detected declarations: `function Copyright`, `function ath11k_hw_ipq6018_mac_from_pdev_id`, `function ath11k_hw_ipq8074_tx_mesh_enable`, `function ath11k_hw_qcn9074_tx_mesh_enable`, `function ath11k_hw_wcn6855_tx_mesh_enable`, `function ath11k_init_wmi_config_qca6390`, `function ath11k_hw_ipq8074_reo_setup`, `function ath11k_init_wmi_config_ipq8074`, `function ath11k_hw_mac_id_to_pdev_id_ipq8074`, `function ath11k_hw_mac_id_to_srng_id_ipq8074`.
- 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.