X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fiwinfo.git;a=blobdiff_plain;f=iwinfo_cli.c;h=49c9035664c9ceb6657f299d9952520da4ccde1f;hp=7cb90c22c5de8bc302ebb18f89de067e1270ab50;hb=223e09bf3f180797aeea0f6dc1721e5a55215e66;hpb=e8a1e7d224918ba23fe0cd125e70907cb31aea31 diff --git a/iwinfo_cli.c b/iwinfo_cli.c index 7cb90c2..49c9035 100644 --- a/iwinfo_cli.c +++ b/iwinfo_cli.c @@ -280,7 +280,7 @@ static char * format_hwmodes(int modes) static char * format_assocrate(struct iwinfo_rate_entry *r) { - static char buf[40]; + static char buf[80]; char *p = buf; int l = sizeof(buf); @@ -293,13 +293,21 @@ static char * format_assocrate(struct iwinfo_rate_entry *r) p += snprintf(p, l, "%s", format_rate(r->rate)); l = sizeof(buf) - (p - buf); - if (r->mcs >= 0) + if (r->is_ht) { - p += snprintf(p, l, ", MCS %d, %dMHz", r->mcs, 20 + r->is_40mhz*20); + p += snprintf(p, l, ", MCS %d, %dMHz", r->mcs, r->mhz); + l = sizeof(buf) - (p - buf); + } + else if (r->is_vht) + { + p += snprintf(p, l, ", VHT-MCS %d, %dMHz", r->mcs, r->mhz); l = sizeof(buf) - (p - buf); - if (r->is_short_gi) - p += snprintf(p, l, ", short GI"); + if (r->nss) + { + p += snprintf(p, l, ", VHT-NSS %d", r->nss); + l = sizeof(buf) - (p - buf); + } } } @@ -692,10 +700,13 @@ static void print_assoclist(const struct iwinfo_ops *iw, const char *ifname) e->rx_packets ); - printf(" TX: %-38s %8d Pkts.\n\n", + printf(" TX: %-38s %8d Pkts.\n", format_assocrate(&e->tx_rate), e->tx_packets ); + + printf(" expected throughput: %s\n\n", + format_rate(e->thr)); } }