drivers/net/wireless/ath/ath12k/htc.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/htc.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath12k/htc.h- Extension
.h- Size
- 9385 bytes
- Lines
- 317
- 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/kernel.hlinux/list.hlinux/bug.hlinux/skbuff.hlinux/timer.h
Detected Declarations
struct ath12k_basestruct ath12k_htc_hdrstruct ath12k_htc_readystruct ath12k_htc_ready_extendedstruct ath12k_htc_conn_svcstruct ath12k_htc_conn_svc_respstruct ath12k_htc_setup_complete_extendedstruct ath12k_htc_msgstruct ath12k_htc_record_hdrstruct ath12k_htc_credit_reportstruct ath12k_htc_recordstruct ath12k_htc_ep_opsstruct ath12k_htc_svc_conn_reqstruct ath12k_htc_svc_conn_respstruct ath12k_htc_epstruct ath12k_htc_svc_tx_creditsstruct ath12k_htcenum ath12k_htc_tx_flagsenum ath12k_htc_rx_flagsenum ath12k_htc_msg_idenum ath12k_htc_versionenum ath12k_htc_conn_flag_threshold_levelenum ath12k_htc_conn_svc_statusenum ath12k_htc_record_idenum ath12k_htc_svc_gidenum ath12k_htc_svc_idenum ath12k_htc_ep_id
Annotated Snippet
struct ath12k_htc_hdr {
__le32 htc_info;
__le32 ctrl_info;
} __packed __aligned(4);
enum ath12k_htc_msg_id {
ATH12K_HTC_MSG_READY_ID = 1,
ATH12K_HTC_MSG_CONNECT_SERVICE_ID = 2,
ATH12K_HTC_MSG_CONNECT_SERVICE_RESP_ID = 3,
ATH12K_HTC_MSG_SETUP_COMPLETE_ID = 4,
ATH12K_HTC_MSG_SETUP_COMPLETE_EX_ID = 5,
ATH12K_HTC_MSG_SEND_SUSPEND_COMPLETE = 6,
ATH12K_HTC_MSG_NACK_SUSPEND = 7,
ATH12K_HTC_MSG_WAKEUP_FROM_SUSPEND_ID = 8,
};
enum ath12k_htc_version {
ATH12K_HTC_VERSION_2P0 = 0x00, /* 2.0 */
ATH12K_HTC_VERSION_2P1 = 0x01, /* 2.1 */
};
enum ath12k_htc_conn_flag_threshold_level {
ATH12K_HTC_CONN_FLAGS_THRESHOLD_LEVEL_ONE_FOURTH,
ATH12K_HTC_CONN_FLAGS_THRESHOLD_LEVEL_ONE_HALF,
ATH12K_HTC_CONN_FLAGS_THRESHOLD_LEVEL_THREE_FOURTHS,
ATH12K_HTC_CONN_FLAGS_THRESHOLD_LEVEL_UNITY,
};
#define ATH12K_HTC_CONN_FLAGS_THRESHOLD_LEVEL_MASK GENMASK(1, 0)
#define ATH12K_HTC_CONN_FLAGS_REDUCE_CREDIT_DRIBBLE BIT(2)
#define ATH12K_HTC_CONN_FLAGS_DISABLE_CREDIT_FLOW_CTRL BIT(3)
#define ATH12K_HTC_CONN_FLAGS_RECV_ALLOC GENMASK(15, 8)
enum ath12k_htc_conn_svc_status {
ATH12K_HTC_CONN_SVC_STATUS_SUCCESS = 0,
ATH12K_HTC_CONN_SVC_STATUS_NOT_FOUND = 1,
ATH12K_HTC_CONN_SVC_STATUS_FAILED = 2,
ATH12K_HTC_CONN_SVC_STATUS_NO_RESOURCES = 3,
ATH12K_HTC_CONN_SVC_STATUS_NO_MORE_EP = 4
};
struct ath12k_htc_ready {
__le32 id_credit_count;
__le32 size_ep;
} __packed;
struct ath12k_htc_ready_extended {
struct ath12k_htc_ready base;
__le32 ver_bundle;
} __packed;
struct ath12k_htc_conn_svc {
__le32 msg_svc_id;
__le32 flags_len;
} __packed;
struct ath12k_htc_conn_svc_resp {
__le32 msg_svc_id;
__le32 flags_len;
__le32 svc_meta_pad;
} __packed;
struct ath12k_htc_setup_complete_extended {
__le32 msg_id;
__le32 flags;
__le32 max_msgs_per_bundled_recv;
} __packed;
struct ath12k_htc_msg {
__le32 msg_svc_id;
__le32 flags_len;
} __packed __aligned(4);
enum ath12k_htc_record_id {
ATH12K_HTC_RECORD_NULL = 0,
ATH12K_HTC_RECORD_CREDITS = 1
};
struct ath12k_htc_record_hdr {
u8 id; /* @enum ath12k_htc_record_id */
u8 len;
u8 pad0;
u8 pad1;
} __packed;
struct ath12k_htc_credit_report {
u8 eid; /* @enum ath12k_htc_ep_id */
u8 credits;
u8 pad0;
u8 pad1;
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/list.h`, `linux/bug.h`, `linux/skbuff.h`, `linux/timer.h`.
- Detected declarations: `struct ath12k_base`, `struct ath12k_htc_hdr`, `struct ath12k_htc_ready`, `struct ath12k_htc_ready_extended`, `struct ath12k_htc_conn_svc`, `struct ath12k_htc_conn_svc_resp`, `struct ath12k_htc_setup_complete_extended`, `struct ath12k_htc_msg`, `struct ath12k_htc_record_hdr`, `struct ath12k_htc_credit_report`.
- 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.