drivers/net/wireless/zydas/zd1211rw/zd_mac.h
Source file repositories/reference/linux-study-clean/drivers/net/wireless/zydas/zd1211rw/zd_mac.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/zydas/zd1211rw/zd_mac.h- Extension
.h- Size
- 8661 bytes
- Lines
- 316
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hnet/mac80211.hzd_chip.h
Detected Declarations
struct zd_ctrlsetstruct rx_length_infostruct rx_statusstruct tx_retry_ratestruct tx_statusstruct housekeepingstruct beaconstruct zd_macstruct ofdm_plcp_headerstruct cck_plcp_headerenum mac_flagsenum zd_device_flagsfunction zd_ofdm_plcp_header_ratefunction zd_cck_plcp_header_signal
Annotated Snippet
struct zd_ctrlset {
u8 modulation;
__le16 tx_length;
u8 control;
/* stores only the difference to tx_length on ZD1211B */
__le16 packet_length;
__le16 current_length;
u8 service;
__le16 next_frame_length;
} __packed;
#define ZD_CS_RESERVED_SIZE 25
/* The field modulation of struct zd_ctrlset controls the bit rate, the use
* of short or long preambles in 802.11b (CCK mode) or the use of 802.11a or
* 802.11g in OFDM mode.
*
* The term zd-rate is used for the combination of the modulation type flag
* and the "pure" rate value.
*/
#define ZD_PURE_RATE_MASK 0x0f
#define ZD_MODULATION_TYPE_MASK 0x10
#define ZD_RATE_MASK (ZD_PURE_RATE_MASK|ZD_MODULATION_TYPE_MASK)
#define ZD_PURE_RATE(modulation) ((modulation) & ZD_PURE_RATE_MASK)
#define ZD_MODULATION_TYPE(modulation) ((modulation) & ZD_MODULATION_TYPE_MASK)
#define ZD_RATE(modulation) ((modulation) & ZD_RATE_MASK)
/* The two possible modulation types. Notify that 802.11b doesn't use the CCK
* codeing for the 1 and 2 MBit/s rate. We stay with the term here to remain
* consistent with uses the term at other places.
*/
#define ZD_CCK 0x00
#define ZD_OFDM 0x10
/* The ZD1211 firmware uses proprietary encodings of the 802.11b (CCK) rates.
* For OFDM the PLCP rate encodings are used. We combine these "pure" rates
* with the modulation type flag and call the resulting values zd-rates.
*/
#define ZD_CCK_RATE_1M (ZD_CCK|0x00)
#define ZD_CCK_RATE_2M (ZD_CCK|0x01)
#define ZD_CCK_RATE_5_5M (ZD_CCK|0x02)
#define ZD_CCK_RATE_11M (ZD_CCK|0x03)
#define ZD_OFDM_RATE_6M (ZD_OFDM|ZD_OFDM_PLCP_RATE_6M)
#define ZD_OFDM_RATE_9M (ZD_OFDM|ZD_OFDM_PLCP_RATE_9M)
#define ZD_OFDM_RATE_12M (ZD_OFDM|ZD_OFDM_PLCP_RATE_12M)
#define ZD_OFDM_RATE_18M (ZD_OFDM|ZD_OFDM_PLCP_RATE_18M)
#define ZD_OFDM_RATE_24M (ZD_OFDM|ZD_OFDM_PLCP_RATE_24M)
#define ZD_OFDM_RATE_36M (ZD_OFDM|ZD_OFDM_PLCP_RATE_36M)
#define ZD_OFDM_RATE_48M (ZD_OFDM|ZD_OFDM_PLCP_RATE_48M)
#define ZD_OFDM_RATE_54M (ZD_OFDM|ZD_OFDM_PLCP_RATE_54M)
/* The bit 5 of the zd_ctrlset modulation field controls the preamble in CCK
* mode or the 802.11a/802.11g selection in OFDM mode.
*/
#define ZD_CCK_PREA_LONG 0x00
#define ZD_CCK_PREA_SHORT 0x20
#define ZD_OFDM_MODE_11G 0x00
#define ZD_OFDM_MODE_11A 0x20
/* zd_ctrlset control field */
#define ZD_CS_NEED_RANDOM_BACKOFF 0x01
#define ZD_CS_NO_ACK 0x02
#define ZD_CS_FRAME_TYPE_MASK 0x0c
#define ZD_CS_DATA_FRAME 0x00
#define ZD_CS_PS_POLL_FRAME 0x04
#define ZD_CS_MANAGEMENT_FRAME 0x08
#define ZD_CS_NO_SEQUENCE_CTL_FRAME 0x0c
#define ZD_CS_WAKE_DESTINATION 0x10
#define ZD_CS_RTS 0x20
#define ZD_CS_ENCRYPT 0x40
#define ZD_CS_SELF_CTS 0x80
/* Incoming frames are prepended by a PLCP header */
#define ZD_PLCP_HEADER_SIZE 5
struct rx_length_info {
__le16 length[3];
__le16 tag;
} __packed;
#define RX_LENGTH_INFO_TAG 0x697e
struct rx_status {
u8 signal_quality_cck;
/* rssi */
u8 signal_strength;
u8 signal_quality_ofdm;
u8 decryption_type;
Annotation
- Immediate include surface: `linux/kernel.h`, `net/mac80211.h`, `zd_chip.h`.
- Detected declarations: `struct zd_ctrlset`, `struct rx_length_info`, `struct rx_status`, `struct tx_retry_rate`, `struct tx_status`, `struct housekeeping`, `struct beacon`, `struct zd_mac`, `struct ofdm_plcp_header`, `struct cck_plcp_header`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.