From: Anthony Refuerzo <anthony96922@gmail.com>
To: anthony96922@gmail.com
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] iw: Add more VHT capabilities reporting
Date: Thu, 16 Feb 2023 12:59:25 -0800 [thread overview]
Message-ID: <20230216205925.10091-2-anthony96922@gmail.com> (raw)
In-Reply-To: <20230216205925.10091-1-anthony96922@gmail.com>
Add extra reporting for VHT capabilities. These were not previously shown.
---
scan.c | 12 ++++++++++++
util.c | 26 ++++++++++++++++++++++++++
2 files changed, 38 insertions(+)
diff --git a/scan.c b/scan.c
index dfc136a..9bfa014 100644
--- a/scan.c
+++ b/scan.c
@@ -1508,6 +1508,8 @@ static void print_vht_capa(const uint8_t type, uint8_t len, const uint8_t *data,
static void print_vht_oper(const uint8_t type, uint8_t len, const uint8_t *data,
const struct print_ies_data *ie_buffer)
{
+ __u16 tmp;
+ int i;
const char *chandwidths[] = {
[0] = "20 or 40 MHz",
[1] = "80 MHz",
@@ -1521,6 +1523,16 @@ static void print_vht_oper(const uint8_t type, uint8_t len, const uint8_t *data,
printf("\t\t * center freq segment 1: %d\n", data[1]);
printf("\t\t * center freq segment 2: %d\n", data[2]);
printf("\t\t * VHT basic MCS set: 0x%.2x%.2x\n", data[4], data[3]);
+ tmp = data[3] | (data[4] << 8);
+ for (i = 1; i <= 8; i++) {
+ printf("\t\t\t%d streams: ", i);
+ switch ((tmp >> ((i-1)*2) ) & 3) {
+ case 0: printf("MCS 0-7\n"); break;
+ case 1: printf("MCS 0-8\n"); break;
+ case 2: printf("MCS 0-9\n"); break;
+ case 3: printf("not supported\n"); break;
+ }
+ }
}
static void print_supp_op_classes(const uint8_t type, uint8_t len,
diff --git a/util.c b/util.c
index 8a2ba10..c026f8b 100644
--- a/util.c
+++ b/util.c
@@ -1125,16 +1125,42 @@ void print_vht_info(__u32 capa, const __u8 *mcs)
PRINT_VHT_CAPA(6, "short GI (160/80+80 MHz)");
PRINT_VHT_CAPA(7, "TX STBC");
/* RX STBC */
+ switch ((capa & 0x700) >> 8) {
+ case 1: printf("\t\t\tRX STBC 1-stream\n"); break;
+ case 2: printf("\t\t\tRX STBC 2-streams\n"); break;
+ case 3: printf("\t\t\tRX STBC 3-streams\n"); break;
+ case 4: printf("\t\t\tRX STBC 4-streams\n"); break;
+ case 5: printf("\t\t\tRX STBC 5-streams\n"); break;
+ case 6: printf("\t\t\tRX STBC 6-streams\n"); break;
+ case 7: printf("\t\t\tRX STBC 7-streams\n"); break;
+ default: printf("\t\t\tNo RX STBC\n");
+ }
PRINT_VHT_CAPA(11, "SU Beamformer");
PRINT_VHT_CAPA(12, "SU Beamformee");
/* compressed steering */
+ printf("\t\t\tCompressed Steering Number of Beamformer Antennas: %d\n",
+ ((capa & 0xe000) >> 13) + 1);
/* # of sounding dimensions */
+ printf("\t\t\tNumber of Sounding Dimensions: %d\n",
+ ((capa & 0x70000) >> 16) + 1);
PRINT_VHT_CAPA(19, "MU Beamformer");
PRINT_VHT_CAPA(20, "MU Beamformee");
PRINT_VHT_CAPA(21, "VHT TXOP PS");
PRINT_VHT_CAPA(22, "+HTC-VHT");
/* max A-MPDU */
+ printf("\t\t\tMax A-MPDU Length: %d (exponent: %d)\n",
+ (1 << (((capa & 0x3800000) >> 23) + 13)) - 1,
+ ((capa & 0x3800000) >> 23));
/* VHT link adaptation */
+ if (capa & 0xc000000) {
+ printf("\t\t\tVHT Link Adaptation: ");
+ switch ((capa & 0xc000000) >> 26) {
+ case 1: printf("(reserved)\n"); break;
+ case 2: printf("Unsolicited\n"); break;
+ case 3: printf("Both Solicited and Unsolicited\n"); break;
+ default: printf("No Feedback\n"); break;
+ }
+ }
PRINT_VHT_CAPA(28, "RX antenna pattern consistency");
PRINT_VHT_CAPA(29, "TX antenna pattern consistency");
--
2.30.2
next prev parent reply other threads:[~2023-02-16 20:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-16 20:59 Anthony Refuerzo
2023-02-16 20:59 ` Anthony Refuerzo [this message]
2023-02-17 8:36 ` [PATCH] iw: Add more VHT capabilities reporting Kalle Valo
-- strict thread matches above, loose matches on Subject: below --
2023-02-17 8:40 Anthony Refuerzo
2023-04-14 10:49 ` Johannes Berg
2023-02-16 21:08 Anthony Refuerzo
2023-02-16 21:07 Anthony Refuerzo
2023-02-16 21:06 Anthony Refuerzo
2023-02-16 20:46 Anthony Refuerzo
2023-02-16 20:45 Anthony Refuerzo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230216205925.10091-2-anthony96922@gmail.com \
--to=anthony96922@gmail.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.