drivers/net/wireless/mediatek/mt76/mt7925/mcu.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/mediatek/mt76/mt7925/mcu.h
Extension
.h
Size
14023 bytes
Lines
723
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 mt7925_mcu_eeprom_info {
	__le32 addr;
	__le32 valid;
	u8 data[MT7925_EEPROM_BLOCK_SIZE];
} __packed;

#define MT_RA_RATE_NSS			GENMASK(8, 6)
#define MT_RA_RATE_MCS			GENMASK(3, 0)
#define MT_RA_RATE_TX_MODE		GENMASK(12, 9)
#define MT_RA_RATE_DCM_EN		BIT(4)
#define MT_RA_RATE_BW			GENMASK(14, 13)

struct mt7925_mcu_rxd {
	__le32 rxd[8];

	__le16 len;
	__le16 pkt_type_id;

	u8 eid;
	u8 seq;
	u8 option;
	u8 __rsv;

	u8 ext_eid;
	u8 __rsv1[2];
	u8 s2d_index;

	u8 tlv[];
};

struct mt7925_mcu_uni_event {
	u8 cid;
	u8 pad[3];
	__le32 status; /* 0: success, others: fail */
} __packed;

enum {
	MT_EBF = BIT(0),	/* explicit beamforming */
	MT_IBF = BIT(1)		/* implicit beamforming */
};

struct mt7925_mcu_reg_event {
	__le32 reg;
	__le32 val;
} __packed;

struct mt7925_mcu_ant_id_config {
	u8 ant_id[4];
} __packed;

struct mt7925_txpwr_req {
	u8 _rsv[4];
	__le16 tag;
	__le16 len;

	u8 format_id;
	u8 catg;
	u8 band_idx;
	u8 _rsv1;
} __packed;

struct mt7925_txpwr_event {
	u8 rsv[4];
	__le16 tag;
	__le16 len;

	u8 catg;
	u8 band_idx;
	u8 ch_band;
	u8 format; /* 0:Legacy, 1:HE */

	/* Rate power info */
	struct mt7925_txpwr txpwr;

	s8 pwr_max;
	s8 pwr_min;
	u8 rsv1;
} __packed;

enum {
	TM_SWITCH_MODE,
	TM_SET_AT_CMD,
	TM_QUERY_AT_CMD,
};

enum {
	MT7925_TM_NORMAL,
	MT7925_TM_TESTMODE,
	MT7925_TM_ICAP,
	MT7925_TM_ICAP_OVERLAP,

Annotation

Implementation Notes