Detailed WiFi Operation Workflows Documentation
1. Detailed Data Transmission Path
sequenceDiagram
participant APP as Application Layer
participant DRV as Driver
participant MAC as MAC Layer
participant SEC as Security Module
participant PHY as PHY Layer
participant RF as RF Frontend
Note over APP,RF: Transmission Path
APP->>DRV: Application Data
DRV->>DRV: Create Socket Buffer
DRV->>MAC: Submit Data Frame
MAC->>MAC: Frame Classification
MAC->>MAC: QoS Mapping
MAC->>MAC: Frame Assembly
MAC->>MAC: Add MAC Header
MAC->>SEC: Request Encryption
SEC->>SEC: Generate IV/Nonce
SEC->>SEC: Apply Encryption
SEC->>SEC: Calculate MIC
SEC->>MAC: Protected Frame
MAC->>PHY: PHY Frame Request
PHY->>PHY: Add PHY Header
PHY->>PHY: Scrambling
PHY->>PHY: FEC Encoding
PHY->>PHY: Interleaving
PHY->>PHY: Constellation Mapping
PHY->>PHY: Pilot Insertion
PHY->>PHY: IFFT Processing
PHY->>PHY: CP Insertion
PHY->>PHY: Windowing
PHY->>RF: IQ Samples
RF->>RF: Digital Up-Conversion
RF->>RF: DAC Processing
RF->>RF: RF Up-Conversion
RF->>RF: Power Amplification
Note over APP,RF: Transmission Complete
2. Channel Access Sequence with EDCA
sequenceDiagram
participant MAC as MAC Layer
participant EDCA as EDCA Controller
participant CCA as CCA Monitor
participant TMR as Timer
participant TX as Transmitter
Note over MAC,TX: Channel Access Procedure
MAC->>EDCA: Frame Ready (AC_XX)
EDCA->>EDCA: Load EDCA Parameters
Note over EDCA: AIFSN, CWmin, CWmax
EDCA->>CCA: Request Channel Status
CCA->>EDCA: Channel Status Report
alt Channel Busy
EDCA->>EDCA: Freeze Backoff
EDCA->>CCA: Continue Monitoring
else Channel Idle
EDCA->>EDCA: Calculate Backoff
EDCA->>TMR: Start AIFS Timer
TMR->>EDCA: AIFS Complete
loop Backoff Procedure
EDCA->>TMR: Start Slot Timer
TMR->>EDCA: Slot Complete
EDCA->>CCA: Check Channel
alt Channel Remains Idle
EDCA->>EDCA: Decrement Counter
else Channel Becomes Busy
EDCA->>EDCA: Freeze Counter
EDCA->>CCA: Wait for Idle
end
end
end
EDCA->>TX: Grant Transmission
TX->>MAC: Transmission Complete
Note over MAC,TX: Channel Access Complete
3. Multi-User MIMO Operation
sequenceDiagram
participant AP as Access Point
participant SM as Spatial Mapping
participant STA1 as Station 1
participant STA2 as Station 2
participant STA3 as Station 3
Note over AP,STA3: MU-MIMO Setup and Operation
AP->>AP: Initialize MU-MIMO
par Sounding Phase
AP->>STA1: NDP Announcement
AP->>STA2: NDP Announcement
AP->>STA3: NDP Announcement
AP->>AP: Transmit NDP
end
par CSI Feedback
STA1->>AP: Compressed Beamforming
STA2->>AP: Compressed Beamforming
STA3->>AP: Compressed Beamforming
end
AP->>SM: Process CSI Matrices
SM->>SM: Calculate Steering Matrices
SM->>AP: Precoding Information
AP->>AP: Group Formation
AP->>AP: Resource Allocation
par Data Transmission
AP->>STA1: Spatial Stream 1
AP->>STA2: Spatial Stream 2
AP->>STA3: Spatial Stream 3
end
par Acknowledgment
STA1->>AP: Multi-STA BlockAck
STA2->>AP: Multi-STA BlockAck
STA3->>AP: Multi-STA BlockAck
end
Note over AP,STA3: MU-MIMO Transaction Complete
4. Power Save Operation
sequenceDiagram
participant STA as Station
participant PSM as Power Save Manager
participant BUF as AP Buffer
participant AP as Access Point
participant TIM as TIM/DTIM Generator
Note over STA,TIM: Power Save Cycle
STA->>PSM: Request PS Mode
PSM->>PSM: Save Current State
PSM->>AP: PS-Poll Frame
AP->>BUF: Enable Frame Buffering
AP->>TIM: Update TIM Bitmap
loop Beacon Interval
AP->>TIM: Generate Beacon
TIM->>TIM: Set TIM/DTIM Elements
AP->>STA: Beacon with TIM
alt Traffic Buffered
STA->>PSM: Wake Up Radio
PSM->>AP: PS-Poll Frame
AP->>BUF: Retrieve Buffered Frame
AP->>STA: Buffered Data
STA->>AP: ACK
alt More Data Flag Set
STA->>AP: Additional PS-Poll
else No More Data
STA->>PSM: Return to Sleep
end
else No Traffic
STA->>PSM: Maintain Sleep
end
end
Note over STA,TIM: Power Save Cycle Complete
5. Rate Adaptation Process
sequenceDiagram
participant MAC as MAC Layer
participant RA as Rate Adaptation
participant STAT as Statistics Engine
participant PHY as PHY Layer
participant CH as Channel Monitor
Note over MAC,CH: Rate Adaptation Cycle
MAC->>STAT: Request Performance Stats
STAT->>RA: Provide PER Data
CH->>RA: Channel Quality Metrics
RA->>RA: Calculate Success Rate
RA->>RA: Analyze Trends
loop Rate Decision
RA->>RA: Check Thresholds
alt Excellent Conditions
RA->>RA: Consider Rate Increase
RA->>PHY: Probe Higher Rate
PHY->>STAT: Monitor Success
alt Probe Successful
RA->>PHY: Confirm Rate Increase
else Probe Failed
RA->>PHY: Revert Rate
end
else Poor Conditions
RA->>RA: Calculate Fallback Rate
RA->>PHY: Apply Lower Rate
PHY->>STAT: Monitor Recovery
end
end
PHY->>MAC: Update Rate Selection
MAC->>MAC: Apply New Rate
Note over MAC,CH: Rate Adaptation Complete