drivers/net/wireless/ath/ath10k/hif.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath10k/hif.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath10k/hif.h- Extension
.h- Size
- 6716 bytes
- Lines
- 259
- 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.hcore.hbmi.hdebug.h
Detected Declarations
struct ath10k_hif_sg_itemstruct ath10k_hif_opsenum ath_dbg_modefunction ath10k_hif_tx_sgfunction ath10k_hif_diag_readfunction ath10k_hif_diag_writefunction ath10k_hif_exchange_bmi_msgfunction ath10k_hif_startfunction ath10k_hif_stopfunction ath10k_hif_start_postfunction ath10k_hif_get_htt_tx_completefunction ath10k_hif_map_service_to_pipefunction ath10k_hif_get_default_pipefunction ath10k_hif_send_complete_checkfunction ath10k_hif_get_free_queue_numberfunction ath10k_hif_power_upfunction ath10k_hif_power_downfunction ath10k_hif_suspendfunction ath10k_hif_resumefunction ath10k_hif_read32function ath10k_hif_write32function ath10k_hif_fetch_cal_eepromfunction ath10k_hif_get_target_infofunction ath10k_hif_set_target_log_mode
Annotated Snippet
struct ath10k_hif_sg_item {
u16 transfer_id;
void *transfer_context; /* NULL = tx completion callback not called */
void *vaddr; /* for debugging mostly */
dma_addr_t paddr;
u16 len;
};
struct ath10k_hif_ops {
/* send a scatter-gather list to the target */
int (*tx_sg)(struct ath10k *ar, u8 pipe_id,
struct ath10k_hif_sg_item *items, int n_items);
/* read firmware memory through the diagnose interface */
int (*diag_read)(struct ath10k *ar, u32 address, void *buf,
size_t buf_len);
int (*diag_write)(struct ath10k *ar, u32 address, const void *data,
int nbytes);
/*
* API to handle HIF-specific BMI message exchanges, this API is
* synchronous and only allowed to be called from a context that
* can block (sleep)
*/
int (*exchange_bmi_msg)(struct ath10k *ar,
void *request, u32 request_len,
void *response, u32 *response_len);
/* Post BMI phase, after FW is loaded. Starts regular operation */
int (*start)(struct ath10k *ar);
/* Clean up what start() did. This does not revert to BMI phase. If
* desired so, call power_down() and power_up()
*/
void (*stop)(struct ath10k *ar);
int (*start_post)(struct ath10k *ar);
int (*get_htt_tx_complete)(struct ath10k *ar);
int (*map_service_to_pipe)(struct ath10k *ar, u16 service_id,
u8 *ul_pipe, u8 *dl_pipe);
void (*get_default_pipe)(struct ath10k *ar, u8 *ul_pipe, u8 *dl_pipe);
/*
* Check if prior sends have completed.
*
* Check whether the pipe in question has any completed
* sends that have not yet been processed.
* This function is only relevant for HIF pipes that are configured
* to be polled rather than interrupt-driven.
*/
void (*send_complete_check)(struct ath10k *ar, u8 pipe_id, int force);
u16 (*get_free_queue_number)(struct ath10k *ar, u8 pipe_id);
u32 (*read32)(struct ath10k *ar, u32 address);
void (*write32)(struct ath10k *ar, u32 address, u32 value);
/* Power up the device and enter BMI transfer mode for FW download */
int (*power_up)(struct ath10k *ar, enum ath10k_firmware_mode fw_mode);
/* Power down the device and free up resources. stop() must be called
* before this if start() was called earlier
*/
void (*power_down)(struct ath10k *ar);
int (*suspend)(struct ath10k *ar);
int (*resume)(struct ath10k *ar);
/* fetch calibration data from target eeprom */
int (*fetch_cal_eeprom)(struct ath10k *ar, void **data,
size_t *data_len);
int (*get_target_info)(struct ath10k *ar,
struct bmi_target_info *target_info);
int (*set_target_log_mode)(struct ath10k *ar, u8 fw_log_mode);
};
static inline int ath10k_hif_tx_sg(struct ath10k *ar, u8 pipe_id,
struct ath10k_hif_sg_item *items,
int n_items)
{
return ar->hif.ops->tx_sg(ar, pipe_id, items, n_items);
}
static inline int ath10k_hif_diag_read(struct ath10k *ar, u32 address, void *buf,
size_t buf_len)
Annotation
- Immediate include surface: `linux/kernel.h`, `core.h`, `bmi.h`, `debug.h`.
- Detected declarations: `struct ath10k_hif_sg_item`, `struct ath10k_hif_ops`, `enum ath_dbg_mode`, `function ath10k_hif_tx_sg`, `function ath10k_hif_diag_read`, `function ath10k_hif_diag_write`, `function ath10k_hif_exchange_bmi_msg`, `function ath10k_hif_start`, `function ath10k_hif_stop`, `function ath10k_hif_start_post`.
- 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.