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

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

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h
Extension
.h
Size
11179 bytes
Lines
409
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_hif_ctrl_basic_tlv {
	__le16 tag;
	__le16 len;
	u8 cid;
	u8 pad[3];
	u32 status;
	u8 hif_type;
	u8 hif_tx_traffic_status;
	u8 hif_rx_traffic_status;
	u8 hifsuspend;
	u8 rsv[4];
} __packed;

enum {
	UNI_ROC_ACQUIRE,
	UNI_ROC_ABORT,
	UNI_ROC_SUB_LINK = 3,
	UNI_ROC_NUM
};

enum mt7925_roc_req {
	MT7925_ROC_REQ_JOIN,
	MT7925_ROC_REQ_ROC,
	MT7925_ROC_REQ_SUB_LINK,
	MT7925_ROC_REQ_MLSR_AG = 10,
	MT7925_ROC_REQ_MLSR_AA,
	MT7925_ROC_REQ_NUM
};

enum {
	UNI_EVENT_ROC_GRANT = 0,
	UNI_EVENT_ROC_GRANT_SUB_LINK = 4,
	UNI_EVENT_ROC_TAG_NUM
};

struct mt7925_roc_grant_tlv {
	__le16 tag;
	__le16 len;
	u8 bss_idx;
	u8 tokenid;
	u8 status;
	u8 primarychannel;
	u8 rfsco;
	u8 rfband;
	u8 channelwidth;
	u8 centerfreqseg1;
	u8 centerfreqseg2;
	u8 reqtype;
	u8 dbdcband;
	u8 rsv[1];
	__le32 max_interval;
} __packed;

struct mt7925_beacon_loss_tlv {
	__le16 tag;
	__le16 len;
	u8 reason;
	u8 nr_btolink;
	u8 pad[2];
} __packed;

struct mt7925_uni_beacon_loss_event {
	struct {
		u8 bss_idx;
		u8 pad[3];
	} __packed hdr;
	struct mt7925_beacon_loss_tlv beacon_loss;
} __packed;

struct mt7925_uni_rssi_monitor_event {
		__le16 tag;
		__le16 len;
		__le32 rssi;
} __packed;

#define to_rssi(field, rxv)		((FIELD_GET(field, rxv) - 220) / 2)
#define to_rcpi(rssi)			(2 * (rssi) + 220)

enum mt7925_txq_id {
	MT7925_TXQ_BAND0,
	MT7925_TXQ_BAND1,
	MT7925_TXQ_MCU_WM = 15,
	MT7925_TXQ_FWDL,
};

enum mt7925_rxq_id {
	MT7925_RXQ_BAND0 = 2,
	MT7925_RXQ_BAND1,
	MT7925_RXQ_MCU_WM = 0,
	MT7925_RXQ_MCU_WM2, /* for tx done */

Annotation

Implementation Notes