drivers/net/wireless/intel/iwlwifi/fw/runtime.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/fw/runtime.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/intel/iwlwifi/fw/runtime.h
Extension
.h
Size
7591 bytes
Lines
268
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct iwl_fw_runtime_ops {
	void (*dump_start)(void *ctx);
	void (*dump_end)(void *ctx);
	int (*send_hcmd)(void *ctx, struct iwl_host_cmd *host_cmd);
	bool (*d3_debug_enable)(void *ctx);
};

#define MAX_NUM_LMAC 2
#define MAX_NUM_TCM 2
#define MAX_NUM_RCM 2
struct iwl_fwrt_shared_mem_cfg {
	int num_lmacs;
	int num_txfifo_entries;
	struct {
		u32 txfifo_size[TX_FIFO_MAX_NUM];
		u32 rxfifo1_size;
	} lmac[MAX_NUM_LMAC];
	u32 rxfifo2_size;
	u32 rxfifo2_control_size;
	u32 internal_txfifo_addr;
	u32 internal_txfifo_size[TX_FIFO_INTERNAL_MAX_NUM];
};

#define IWL_FW_RUNTIME_DUMP_WK_NUM 5

/**
 * struct iwl_fwrt_dump_data - dump data
 * @trig: trigger the worker was scheduled upon
 * @fw_pkt: packet received from FW
 * @desc: dump descriptor
 * @monitor_only: only dump for monitor
 *
 * Note that the decision which part of the union is used
 * is based on iwl_trans_dbg_ini_valid(): the 'trig' part
 * is used if it is %true, the 'desc' part otherwise.
 */
struct iwl_fwrt_dump_data {
	union {
		struct {
			struct iwl_fw_ini_trigger_tlv *trig;
			struct iwl_rx_packet *fw_pkt;
		};
		struct {
			/* must be first to be same as 'trig' */
			const struct iwl_fw_dump_desc *desc;
			bool monitor_only;
		};
	};
};

/**
 * struct iwl_fwrt_wk_data - dump worker data struct
 * @idx: index of the worker
 * @wk: worker
 * @dump_data: dump data
 */
struct iwl_fwrt_wk_data  {
	u8 idx;
	struct delayed_work wk;
	struct iwl_fwrt_dump_data dump_data;
};

/**
 * struct iwl_txf_iter_data - Tx fifo iterator data struct
 * @fifo: fifo number
 * @lmac: lmac number
 * @fifo_size: fifo size
 * @internal_txf: non zero if fifo is  internal Tx fifo
 */
struct iwl_txf_iter_data {
	int fifo;
	int lmac;
	u32 fifo_size;
	u8 internal_txf;
};

/**
 * struct iwl_fw_runtime - runtime data for firmware
 * @trans: transport pointer
 * @fw: firmware image
 * @dev: device pointer
 * @ops: user ops
 * @ops_ctx: user ops context
 * @fw_paging_db: paging database
 * @num_of_paging_blk: number of paging blocks
 * @num_of_pages_in_last_blk: number of pages in the last block
 * @smem_cfg: saved firmware SMEM configuration
 * @cur_fw_img: current firmware image, must be maintained by
 *	the driver by calling &iwl_fw_set_current_image()
 * @dump: debug dump data

Annotation

Implementation Notes