drivers/net/wireless/mediatek/mt7601u/mt7601u.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/mediatek/mt7601u/mt7601u.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/mediatek/mt7601u/mt7601u.h- Extension
.h- Size
- 9264 bytes
- Lines
- 394
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hlinux/kernel.hlinux/device.hlinux/mutex.hlinux/usb.hlinux/completion.hnet/mac80211.hlinux/debugfs.hlinux/average.hregs.h
Detected Declarations
struct mt7601u_dma_bufstruct mt7601u_mcustruct mt7601u_freq_calstruct mac_statsstruct mt7601u_rx_queuestruct mt7601u_dma_buf_rxstruct mt7601u_tx_queuestruct mt7601u_dma_buf_txstruct mt7601u_eeprom_paramsstruct mt7601u_devstruct mt7601u_tssi_paramsstruct mt76_wcidstruct mt76_vifstruct mt76_stastruct mt76_reg_pairstruct mt7601u_rxwienum mt_temp_modeenum mt_bwfunction mt76_rrfunction mt76_wrfunction mt76_rmwfunction mt76_setfunction mt76_clearfunction mt7601u_mac_set_ctrlch
Annotated Snippet
struct mt7601u_dma_buf {
struct urb *urb;
void *buf;
dma_addr_t dma;
size_t len;
};
struct mt7601u_mcu {
struct mutex mutex;
u8 msg_seq;
struct mt7601u_dma_buf resp;
struct completion resp_cmpl;
};
struct mt7601u_freq_cal {
struct delayed_work work;
u8 freq;
bool enabled;
bool adjusting;
};
struct mac_stats {
u64 rx_stat[6];
u64 tx_stat[6];
u64 aggr_stat[2];
u64 aggr_n[32];
u64 zero_len_del[2];
};
#define N_RX_ENTRIES 16
struct mt7601u_rx_queue {
struct mt7601u_dev *dev;
struct mt7601u_dma_buf_rx {
struct urb *urb;
struct page *p;
} e[N_RX_ENTRIES];
unsigned int start;
unsigned int end;
unsigned int entries;
unsigned int pending;
};
#define N_TX_ENTRIES 64
struct mt7601u_tx_queue {
struct mt7601u_dev *dev;
struct mt7601u_dma_buf_tx {
struct urb *urb;
struct sk_buff *skb;
} e[N_TX_ENTRIES];
unsigned int start;
unsigned int end;
unsigned int entries;
unsigned int used;
unsigned int fifo_seq;
};
/* WCID allocation:
* 0: mcast wcid
* 1: bssid wcid
* 1...: STAs
* ...7e: group wcids
* 7f: reserved
*/
#define N_WCIDS 128
#define GROUP_WCID(idx) (N_WCIDS - 2 - idx)
struct mt7601u_eeprom_params;
#define MT_EE_TEMPERATURE_SLOPE 39
#define MT_FREQ_OFFSET_INVALID -128
enum mt_temp_mode {
MT_TEMP_MODE_NORMAL,
MT_TEMP_MODE_HIGH,
MT_TEMP_MODE_LOW,
};
enum mt_bw {
MT_BW_20,
MT_BW_40,
};
enum {
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/kernel.h`, `linux/device.h`, `linux/mutex.h`, `linux/usb.h`, `linux/completion.h`, `net/mac80211.h`, `linux/debugfs.h`.
- Detected declarations: `struct mt7601u_dma_buf`, `struct mt7601u_mcu`, `struct mt7601u_freq_cal`, `struct mac_stats`, `struct mt7601u_rx_queue`, `struct mt7601u_dma_buf_rx`, `struct mt7601u_tx_queue`, `struct mt7601u_dma_buf_tx`, `struct mt7601u_eeprom_params`, `struct mt7601u_dev`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.