developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 1 | From cf26fc9ab584833f01e27cc2dd09988179ec6a03 Mon Sep 17 00:00:00 2001 |
| 2 | From: Ben Greear <greearb@candelatech.com> |
| 3 | Date: Tue, 16 May 2023 11:02:38 -0700 |
| 4 | Subject: [PATCH 17/28] iw: Fix EHT rates printing. |
| 5 | |
| 6 | The 20Mhz rates thing is a union with the others, so print one or |
| 7 | the other. This appears to fix the output of the mcs/bw printout. |
| 8 | |
| 9 | Signed-off-by: Ben Greear <greearb@candelatech.com> |
| 10 | Signed-off-by: Johannes Berg <johannes.berg@intel.com> |
| 11 | --- |
| 12 | util.c | 46 +++++++++++++++++++++------------------------- |
| 13 | 1 file changed, 21 insertions(+), 25 deletions(-) |
| 14 | |
| 15 | diff --git a/util.c b/util.c |
| 16 | index dc09193..d36dbdc 100644 |
| 17 | --- a/util.c |
| 18 | +++ b/util.c |
| 19 | @@ -1604,33 +1604,29 @@ static void __print_eht_capa(int band, |
| 20 | printf("%s\t\tEHT bw=20 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| 21 | pre, mcs[i], |
| 22 | mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| 23 | - } |
| 24 | - |
| 25 | - mcs_set += 4; |
| 26 | - if (he_phy_cap[0] & (BIT(2) << 8)) { |
| 27 | - for (i = 0; i < 3; i++) |
| 28 | - printf("%s\t\tEHT bw <= 80 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| 29 | - pre, mcs[i + 1], |
| 30 | - mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| 31 | - |
| 32 | - } |
| 33 | - |
| 34 | - mcs_set += 3; |
| 35 | - if (he_phy_cap[0] & (BIT(3) << 8)) { |
| 36 | - for (i = 0; i < 3; i++) |
| 37 | - printf("%s\t\tEHT bw=160 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| 38 | - pre, mcs[i + 1], |
| 39 | - mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| 40 | - |
| 41 | - } |
| 42 | + } else { |
| 43 | + if (he_phy_cap[0] & (BIT(2) << 8)) { |
| 44 | + for (i = 0; i < 3; i++) |
| 45 | + printf("%s\t\tEHT bw <= 80 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| 46 | + pre, mcs[i + 1], |
| 47 | + mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| 48 | + } |
| 49 | + mcs_set += 3; |
| 50 | |
| 51 | - mcs_set += 3; |
| 52 | - if (band == NL80211_BAND_6GHZ && (phy_cap[0] & BIT(1))) { |
| 53 | - for (i = 0; i < 3; i++) |
| 54 | - printf("%s\t\tEHT bw=320 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| 55 | - pre, mcs[i + 1], |
| 56 | - mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| 57 | + if (he_phy_cap[0] & (BIT(3) << 8)) { |
| 58 | + for (i = 0; i < 3; i++) |
| 59 | + printf("%s\t\tEHT bw=160 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| 60 | + pre, mcs[i + 1], |
| 61 | + mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| 62 | + } |
| 63 | |
| 64 | + mcs_set += 3; |
| 65 | + if (band == NL80211_BAND_6GHZ && (phy_cap[0] & BIT(1))) { |
| 66 | + for (i = 0; i < 3; i++) |
| 67 | + printf("%s\t\tEHT bw=320 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| 68 | + pre, mcs[i + 1], |
| 69 | + mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| 70 | + } |
| 71 | } |
| 72 | |
| 73 | if (ppet && ppet_len && (phy_cap[1] & BIT(11))) { |
| 74 | -- |
| 75 | 2.39.2 |
| 76 | |