Commit c142feb
committed
Store GI in cfg80211_bitrate_mask, add spatial stream index, enhance MCS documentation, and update 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 first 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.
- 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 5deb909 commit c142feb
2 files changed
+275
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
0 commit comments