drivers/net/wireless/mediatek/mt76/mt76x02.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/mediatek/mt76/mt76x02.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/mediatek/mt76/mt76x02.h- Extension
.h- Size
- 7571 bytes
- Lines
- 285
- 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.
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kfifo.hmt76.hmt76x02_regs.hmt76x02_mac.hmt76x02_dfs.hmt76x02_dma.h
Detected Declarations
struct mt76x02_rx_freq_calstruct mt76x02_calibrationstruct mt76x02_beacon_opsstruct mt76x02_rate_powerstruct mt76x02_devstruct beacon_bc_datafunction is_mt76x0function is_mt76x2function mt76x02_irq_enablefunction mt76x02_irq_disablefunction mt76x02_wait_for_txrx_idlefunction mt76x02_rx_get_stafunction mt76x02_rx_get_sta_wcid
Annotated Snippet
struct mt76x02_rx_freq_cal {
s8 high_gain[MT_MAX_CHAINS];
s8 rssi_offset[MT_MAX_CHAINS];
s8 lna_gain;
u32 mcu_gain;
s16 temp_offset;
u8 freq_offset;
};
struct mt76x02_calibration {
struct mt76x02_rx_freq_cal rx;
u8 agc_gain_init[MT_MAX_CHAINS];
u8 agc_gain_cur[MT_MAX_CHAINS];
u16 false_cca;
s8 avg_rssi_all;
s8 agc_gain_adjust;
s8 agc_lowest_gain;
s8 low_gain;
s8 temp_vco;
s8 temp;
bool init_cal_done;
bool tssi_cal_done;
bool tssi_comp_pending;
bool dpd_cal_done;
bool channel_cal_done;
bool gain_init_done;
int tssi_target;
s8 tssi_dc;
};
struct mt76x02_beacon_ops {
unsigned int nslots;
unsigned int slot_size;
void (*pre_tbtt_enable)(struct mt76x02_dev *dev, bool en);
void (*beacon_enable)(struct mt76x02_dev *dev, bool en);
};
#define mt76x02_beacon_enable(dev, enable) \
(dev)->beacon_ops->beacon_enable(dev, enable)
#define mt76x02_pre_tbtt_enable(dev, enable) \
(dev)->beacon_ops->pre_tbtt_enable(dev, enable)
struct mt76x02_rate_power {
union {
struct {
s8 cck[4];
s8 ofdm[8];
s8 ht[16];
s8 vht[2];
};
s8 all[30];
};
};
struct mt76x02_dev {
union { /* must be first */
struct mt76_dev mt76;
struct mt76_phy mphy;
};
struct mac_address macaddr_list[8];
struct mutex phy_mutex;
u8 txdone_seq;
DECLARE_KFIFO_PTR(txstatus_fifo, struct mt76x02_tx_status);
spinlock_t txstatus_fifo_lock;
u32 tx_airtime;
u32 ampdu_ref;
struct sk_buff *rx_head;
struct delayed_work cal_work;
struct delayed_work wdt_work;
struct hrtimer pre_tbtt_timer;
struct work_struct pre_tbtt_work;
const struct mt76x02_beacon_ops *beacon_ops;
u8 beacon_data_count;
u8 tbtt_count;
u32 tx_hang_reset;
Annotation
- Immediate include surface: `linux/kfifo.h`, `mt76.h`, `mt76x02_regs.h`, `mt76x02_mac.h`, `mt76x02_dfs.h`, `mt76x02_dma.h`.
- Detected declarations: `struct mt76x02_rx_freq_cal`, `struct mt76x02_calibration`, `struct mt76x02_beacon_ops`, `struct mt76x02_rate_power`, `struct mt76x02_dev`, `struct beacon_bc_data`, `function is_mt76x0`, `function is_mt76x2`, `function mt76x02_irq_enable`, `function mt76x02_irq_disable`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.