| From cf26fc9ab584833f01e27cc2dd09988179ec6a03 Mon Sep 17 00:00:00 2001 |
| From: Ben Greear <greearb@candelatech.com> |
| Date: Tue, 16 May 2023 11:02:38 -0700 |
| Subject: [PATCH 17/28] iw: Fix EHT rates printing. |
| |
| The 20Mhz rates thing is a union with the others, so print one or |
| the other. This appears to fix the output of the mcs/bw printout. |
| |
| Signed-off-by: Ben Greear <greearb@candelatech.com> |
| Signed-off-by: Johannes Berg <johannes.berg@intel.com> |
| --- |
| util.c | 46 +++++++++++++++++++++------------------------- |
| 1 file changed, 21 insertions(+), 25 deletions(-) |
| |
| diff --git a/util.c b/util.c |
| index dc09193..d36dbdc 100644 |
| --- a/util.c |
| +++ b/util.c |
| @@ -1604,33 +1604,29 @@ static void __print_eht_capa(int band, |
| printf("%s\t\tEHT bw=20 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| pre, mcs[i], |
| mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| - } |
| - |
| - mcs_set += 4; |
| - if (he_phy_cap[0] & (BIT(2) << 8)) { |
| - for (i = 0; i < 3; i++) |
| - printf("%s\t\tEHT bw <= 80 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| - pre, mcs[i + 1], |
| - mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| - |
| - } |
| - |
| - mcs_set += 3; |
| - if (he_phy_cap[0] & (BIT(3) << 8)) { |
| - for (i = 0; i < 3; i++) |
| - printf("%s\t\tEHT bw=160 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| - pre, mcs[i + 1], |
| - mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| - |
| - } |
| + } else { |
| + if (he_phy_cap[0] & (BIT(2) << 8)) { |
| + for (i = 0; i < 3; i++) |
| + printf("%s\t\tEHT bw <= 80 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| + pre, mcs[i + 1], |
| + mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| + } |
| + mcs_set += 3; |
| |
| - mcs_set += 3; |
| - if (band == NL80211_BAND_6GHZ && (phy_cap[0] & BIT(1))) { |
| - for (i = 0; i < 3; i++) |
| - printf("%s\t\tEHT bw=320 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| - pre, mcs[i + 1], |
| - mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| + if (he_phy_cap[0] & (BIT(3) << 8)) { |
| + for (i = 0; i < 3; i++) |
| + printf("%s\t\tEHT bw=160 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| + pre, mcs[i + 1], |
| + mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| + } |
| |
| + mcs_set += 3; |
| + if (band == NL80211_BAND_6GHZ && (phy_cap[0] & BIT(1))) { |
| + for (i = 0; i < 3; i++) |
| + printf("%s\t\tEHT bw=320 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n", |
| + pre, mcs[i + 1], |
| + mcs_set[i] & 0xf, mcs_set[i] >> 4); |
| + } |
| } |
| |
| if (ppet && ppet_len && (phy_cap[1] & BIT(11))) { |
| -- |
| 2.39.2 |
| |