svn commit: r343974 - in stable: 10/sbin/ifconfig 11/sbin/ifconfig 12/sbin/ifconfig
Andriy Voskoboinyk
avos at FreeBSD.org
Sun Feb 10 20:42:07 UTC 2019
Author: avos
Date: Sun Feb 10 20:42:06 2019
New Revision: 343974
URL: https://svnweb.freebsd.org/changeset/base/343974
Log:
MFC r343698, r343700:
ifconfig(8): display management / multicast wlan(4) rates properly
For 11n / 11ac we are still using non-11n rates for management and
multicast traffic by default; check 'MCS rate' bit to determine how
to print them correctly.
PR: 161035
Modified:
stable/11/sbin/ifconfig/ifieee80211.c
Directory Properties:
stable/11/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/10/sbin/ifconfig/ifieee80211.c
stable/12/sbin/ifconfig/ifieee80211.c
Directory Properties:
stable/10/ (props changed)
stable/12/ (props changed)
Modified: stable/11/sbin/ifconfig/ifieee80211.c
==============================================================================
--- stable/11/sbin/ifconfig/ifieee80211.c Sun Feb 10 20:26:12 2019 (r343973)
+++ stable/11/sbin/ifconfig/ifieee80211.c Sun Feb 10 20:42:06 2019 (r343974)
@@ -3946,6 +3946,21 @@ list_roam(int s)
}
}
+/* XXX TODO: rate-to-string method... */
+static const char*
+get_mcs_mbs_rate_str(uint8_t rate)
+{
+ return (rate & IEEE80211_RATE_MCS) ? "MCS " : "Mb/s";
+}
+
+static uint8_t
+get_rate_value(uint8_t rate)
+{
+ if (rate & IEEE80211_RATE_MCS)
+ return (rate &~ IEEE80211_RATE_MCS);
+ return (rate / 2);
+}
+
static void
list_txparams(int s)
{
@@ -3959,19 +3974,23 @@ list_txparams(int s)
continue;
if (mode == IEEE80211_MODE_11NA || mode == IEEE80211_MODE_11NG) {
if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE)
- LINE_CHECK("%-7.7s ucast NONE mgmt %2u MCS "
- "mcast %2u MCS maxretry %u",
+ LINE_CHECK("%-7.7s ucast NONE mgmt %2u %s "
+ "mcast %2u %s maxretry %u",
modename[mode],
- tp->mgmtrate &~ IEEE80211_RATE_MCS,
- tp->mcastrate &~ IEEE80211_RATE_MCS,
+ get_rate_value(tp->mgmtrate),
+ get_mcs_mbs_rate_str(tp->mgmtrate),
+ get_rate_value(tp->mcastrate),
+ get_mcs_mbs_rate_str(tp->mcastrate),
tp->maxretry);
else
- LINE_CHECK("%-7.7s ucast %2u MCS mgmt %2u MCS "
- "mcast %2u MCS maxretry %u",
+ LINE_CHECK("%-7.7s ucast %2u MCS mgmt %2u %s "
+ "mcast %2u %s maxretry %u",
modename[mode],
tp->ucastrate &~ IEEE80211_RATE_MCS,
- tp->mgmtrate &~ IEEE80211_RATE_MCS,
- tp->mcastrate &~ IEEE80211_RATE_MCS,
+ get_rate_value(tp->mgmtrate),
+ get_mcs_mbs_rate_str(tp->mgmtrate),
+ get_rate_value(tp->mcastrate),
+ get_mcs_mbs_rate_str(tp->mcastrate),
tp->maxretry);
} else {
if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE)
More information about the svn-src-stable-11
mailing list