drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h
Extension
.h
Size
9620 bytes
Lines
398
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_drv_info_92c {
	/*
	 * Driver info contain PHY status and other variabel size info
	 * PHY Status content as below
	 */

	/* DWORD 0 */
	u8 gain_trsw[4];

	/* DWORD 1 */
	u8 pwdb_all;
	u8 cfosho[4];

	/* DWORD 2 */
	u8 cfotail[4];

	/* DWORD 3 */
	s8 rxevm[2];
	s8 rxsnr[4];

	/* DWORD 4 */
	u8 pdsnr[2];

	/* DWORD 5 */
	u8 csi_current[2];
	u8 csi_target[2];

	/* DWORD 6 */
	u8 sigevm;
	u8 max_ex_pwr;
	u8 ex_intf_flag:1;
	u8 sgi_en:1;
	u8 rxsc:2;
	u8 reserve:4;
} __packed;

/* macros to read various fields in RX descriptor */

/* DWORD 0 */
static inline u32 get_rx_desc_pkt_len(__le32 *__rxdesc)
{
	return le32_get_bits(*__rxdesc, GENMASK(13, 0));
}

static inline u32 get_rx_desc_crc32(__le32 *__rxdesc)
{
	return le32_get_bits(*__rxdesc, BIT(14));
}

static inline u32 get_rx_desc_icv(__le32 *__rxdesc)
{
	return le32_get_bits(*__rxdesc, BIT(15));
}

static inline u32 get_rx_desc_drvinfo_size(__le32 *__rxdesc)
{
	return le32_get_bits(*__rxdesc, GENMASK(19, 16));
}

static inline u32 get_rx_desc_shift(__le32 *__rxdesc)
{
	return le32_get_bits(*__rxdesc, GENMASK(25, 24));
}

static inline u32 get_rx_desc_phy_status(__le32 *__rxdesc)
{
	return le32_get_bits(*__rxdesc, BIT(26));
}

static inline u32 get_rx_desc_swdec(__le32 *__rxdesc)
{
	return le32_get_bits(*__rxdesc, BIT(27));
}


/* DWORD 1 */
static inline u32 get_rx_desc_paggr(__le32 *__rxdesc)
{
	return le32_get_bits(*(__rxdesc + 1), BIT(14));
}

static inline u32 get_rx_desc_faggr(__le32 *__rxdesc)
{
	return le32_get_bits(*(__rxdesc + 1), BIT(15));
}


/* DWORD 3 */
static inline u32 get_rx_desc_rx_mcs(__le32 *__rxdesc)
{

Annotation

Implementation Notes