drivers/net/wireless/ath/ath12k/wifi7/hal_desc.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/wifi7/hal_desc.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/ath/ath12k/wifi7/hal_desc.h
Extension
.h
Size
98051 bytes
Lines
2743
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 rx_mpdu_desc {
	__le32 info0; /* %RX_MPDU_DESC_INFO */
	__le32 peer_meta_data;
} __packed;

/* rx_mpdu_desc
 *		Producer: RXDMA
 *		Consumer: REO/SW/FW
 *
 * msdu_count
 *		The number of MSDUs within the MPDU
 *
 * fragment_flag
 *		When set, this MPDU is a fragment and REO should forward this
 *		fragment MPDU to the REO destination ring without any reorder
 *		checks, pn checks or bitmap update. This implies that REO is
 *		forwarding the pointer to the MSDU link descriptor.
 *
 * mpdu_retry_bit
 *		The retry bit setting from the MPDU header of the received frame
 *
 * ampdu_flag
 *		Indicates the MPDU was received as part of an A-MPDU.
 *
 * bar_frame
 *		Indicates the received frame is a BAR frame. After processing,
 *		this frame shall be pushed to SW or deleted.
 *
 * valid_pn
 *		When not set, REO will not perform a PN sequence number check.
 *
 * raw_mpdu
 *		Field only valid when first_msdu_in_mpdu_flag is set. Indicates
 *		the contents in the MSDU buffer contains a 'RAW' MPDU. This
 *		'RAW' MPDU might be spread out over multiple MSDU buffers.
 *
 * more_fragment_flag
 *		The More Fragment bit setting from the MPDU header of the
 *		received frame
 *
 * src_info
 *		Source (Virtual) device/interface info associated with this peer.
 *		This field gets passed on by REO to PPE in the EDMA descriptor.
 *
 * mpdu_qos_control_valid
 *		When set, the MPDU has a QoS control field
 *
 * tid
 *		Field only valid when mpdu_qos_control_valid is set
 */

enum hal_rx_msdu_desc_reo_dest_ind {
	HAL_RX_MSDU_DESC_REO_DEST_IND_TCL,
	HAL_RX_MSDU_DESC_REO_DEST_IND_SW1,
	HAL_RX_MSDU_DESC_REO_DEST_IND_SW2,
	HAL_RX_MSDU_DESC_REO_DEST_IND_SW3,
	HAL_RX_MSDU_DESC_REO_DEST_IND_SW4,
	HAL_RX_MSDU_DESC_REO_DEST_IND_RELEASE,
	HAL_RX_MSDU_DESC_REO_DEST_IND_FW,
	HAL_RX_MSDU_DESC_REO_DEST_IND_SW5,
	HAL_RX_MSDU_DESC_REO_DEST_IND_SW6,
	HAL_RX_MSDU_DESC_REO_DEST_IND_SW7,
	HAL_RX_MSDU_DESC_REO_DEST_IND_SW8,
};

#define RX_MSDU_DESC_INFO0_FIRST_MSDU_IN_MPDU	BIT(0)
#define RX_MSDU_DESC_INFO0_LAST_MSDU_IN_MPDU	BIT(1)
#define RX_MSDU_DESC_INFO0_MSDU_CONTINUATION	BIT(2)
#define RX_MSDU_DESC_INFO0_MSDU_LENGTH		GENMASK(16, 3)
#define RX_MSDU_DESC_INFO0_MSDU_DROP		BIT(17)
#define RX_MSDU_DESC_INFO0_VALID_SA		BIT(18)
#define RX_MSDU_DESC_INFO0_VALID_DA		BIT(19)
#define RX_MSDU_DESC_INFO0_DA_MCBC		BIT(20)
#define RX_MSDU_DESC_INFO0_L3_HDR_PAD_MSB	BIT(21)
#define RX_MSDU_DESC_INFO0_TCP_UDP_CHKSUM_FAIL	BIT(22)
#define RX_MSDU_DESC_INFO0_IP_CHKSUM_FAIL	BIT(23)
#define RX_MSDU_DESC_INFO0_FROM_DS		BIT(24)
#define RX_MSDU_DESC_INFO0_TO_DS		BIT(25)
#define RX_MSDU_DESC_INFO0_INTRA_BSS		BIT(26)
#define RX_MSDU_DESC_INFO0_DST_CHIP_ID		GENMASK(28, 27)
#define RX_MSDU_DESC_INFO0_DECAP_FORMAT		GENMASK(30, 29)

#define HAL_RX_MSDU_PKT_LENGTH_GET(val)		\
	(le32_get_bits((val), RX_MSDU_DESC_INFO0_MSDU_LENGTH))

struct rx_msdu_desc {
	__le32 info0;
} __packed;

/* rx_msdu_desc

Annotation

Implementation Notes