drivers/net/wireless/ath/wcn36xx/hal.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/wcn36xx/hal.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/ath/wcn36xx/hal.h
Extension
.h
Size
125594 bytes
Lines
4974
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 wcnss_wlan_version {
	u8 revision;
	u8 version;
	u8 minor;
	u8 major;
} __packed;

/* Definition for Encryption Keys */
struct wcn36xx_hal_keys {
	u8 id;

	/* 0 for multicast */
	u8 unicast;

	enum ani_key_direction direction;

	/* Usage is unknown */
	u8 rsc[WLAN_MAX_KEY_RSC_LEN];

	/* =1 for authenticator,=0 for supplicant */
	u8 pae_role;

	u16 length;
	u8 key[WCN36XX_HAL_MAC_MAX_KEY_LENGTH];
} __packed;

/*
 * set_sta_key_params Moving here since it is shared by
 * configbss/setstakey msgs
 */
struct wcn36xx_hal_set_sta_key_params {
	/* STA Index */
	u16 sta_index;

	/* Encryption Type used with peer */
	enum ani_ed_type enc_type;

	/* STATIC/DYNAMIC - valid only for WEP */
	enum ani_wep_type wep_type;

	/* Default WEP key, valid only for static WEP, must between 0 and 3. */
	u8 def_wep_idx;

	/* valid only for non-static WEP encyrptions */
	struct wcn36xx_hal_keys key[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS];

	/*
	 * Control for Replay Count, 1= Single TID based replay count on Tx
	 * 0 = Per TID based replay count on TX
	 */
	u8 single_tid_rc;

} __packed;

/* 4-byte control message header used by HAL*/
struct wcn36xx_hal_msg_header {
	enum wcn36xx_hal_host_msg_type msg_type:16;
	enum wcn36xx_hal_host_msg_version msg_version:16;
	u32 len;
} __packed;

/* Config format required by HAL for each CFG item*/
struct wcn36xx_hal_cfg {
	/* Cfg Id. The Id required by HAL is exported by HAL
	 * in shared header file between UMAC and HAL.*/
	u16 id;

	/* Length of the Cfg. This parameter is used to go to next cfg
	 * in the TLV format.*/
	u16 len;

	/* Padding bytes for unaligned address's */
	u16 pad_bytes;

	/* Reserve bytes for making cfgVal to align address */
	u16 reserve;

	/* Following the uCfgLen field there should be a 'uCfgLen' bytes
	 * containing the uCfgValue ; u8 uCfgValue[uCfgLen] */
} __packed;

struct wcn36xx_hal_mac_start_parameters {
	/* Drive Type - Production or FTM etc */
	enum driver_type type;

	/* Length of the config buffer */
	u32 len;

	/* Following this there is a TLV formatted buffer of length
	 * "len" bytes containing all config values.

Annotation

Implementation Notes