Commit f3b53fd
committed
Store GI in cfg80211_bitrate_mask, enhance MCS documentation, and integrate test script
This commit refactors the vwifi driver to store Guard Interval (GI)
information solely in cfg80211_bitrate_mask, eliminating the redundant short_gi variable,
and introduces a spatial stream index for future optimization.
It also adds a comprehensive comment block for manual_mcs and updates the test script to
validate all MCS indices (0–31) with sgi-2.4 and lgi-2.4.
changes:
- vwifi_vif:
- Remove short_gi, storing GI in vif->bitrate_mask.control[NL80211_BAND_2GHZ].gi.
- Add spatial_streams field (int, default 1) for future multi-stream support.
- Add manual_mcs field with detailed comment block explaining its role in storing
the highest enabled MCS for consistent bitrate reporting.
- vwifi_set_bitrate_mask:
- Store GI in vif->bitrate_mask.control[NL80211_BAND_2GHZ].gi, removing short_gi usage.
- Ensures vif->manual_mcs is set to the highest
- Loop iterates through all possible MCS indices (0–31) and logs each enabled index
- vwifi_get_station:
- GI logic using vif->bitrate_mask.gi for short (0.4µs), long (0.8µs), or default GI.
- Correct pr_info format string for modulation and coding_rate alignment.
- Configure sinfo->rxrate/txrate with vif->bitrate_mask.gi and vif->manual_mcs.
Test script (test_vwifi_bitrates.sh):
-Updated to test MCS 0–31 with sgi-2.4 and lgi-2.4:
- Test header (Testing MCS <mcs> with <gi> on vw1).
- GI status (Set GI to long/short).
- iw dev vw1 link output (MAC, SSID, freq, RX/TX, signal, bitrates).
- Success/failure message with actual vs. expected bitrate.
- Add expected bitrate arrays for lgi-2.4 and sgi-2.4.
- Enhance stability with 2s retry sleep, 1s sleep after iw set bitrates, and 2s setup delay.
- Ensure cleanup resets bitrate.
Testing:
- Verified GI (0.4µs/0.8µs) and MCS (0–31) with iw dev vw1 set bitrates and iw dev vw1 link.1 parent 93eb878 commit f3b53fd
2 files changed
+254
-65
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
8 | 16 | | |
9 | 17 | | |
10 | 18 | | |
| |||
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
43 | | - | |
| 51 | + | |
44 | 52 | | |
45 | 53 | | |
46 | 54 | | |
| |||
160 | 168 | | |
161 | 169 | | |
162 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
163 | 251 | | |
164 | 252 | | |
165 | 253 | | |
| |||
202 | 290 | | |
203 | 291 | | |
204 | 292 | | |
205 | | - | |
| 293 | + | |
206 | 294 | | |
207 | 295 | | |
208 | 296 | | |
| |||
0 commit comments