aboutsummaryrefslogtreecommitdiff
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorAndriy Voskoboinyk <avos@FreeBSD.org>2019-02-03 03:02:59 +0000
committerAndriy Voskoboinyk <avos@FreeBSD.org>2019-02-03 03:02:59 +0000
commit35a5128d5042cf9eb6a1b17d368db2b6511ae965 (patch)
tree3f9a191d8f04f33facbdf3768740efbfa7eae6fb /sbin/ifconfig
parent2ce6d2b58cbd80fd2dcf7826664c41ae13ee862f (diff)
downloadsrc-35a5128d5042cf9eb6a1b17d368db2b6511ae965.tar.gz
src-35a5128d5042cf9eb6a1b17d368db2b6511ae965.zip
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 MFC after: 1 week
Notes
Notes: svn path=/head/; revision=343698
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifieee80211.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index c6ca6c05b3c3..e8da16b92743 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -4324,6 +4324,13 @@ 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 void
list_txparams(int s)
{
@@ -4340,19 +4347,23 @@ list_txparams(int s)
mode == IEEE80211_MODE_VHT_2GHZ ||
mode == IEEE80211_MODE_VHT_5GHZ) {
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,
+ get_mcs_mbs_rate_str(tp->mgmtrate),
tp->mcastrate &~ IEEE80211_RATE_MCS,
+ 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,
+ get_mcs_mbs_rate_str(tp->mgmtrate),
tp->mcastrate &~ IEEE80211_RATE_MCS,
+ get_mcs_mbs_rate_str(tp->mcastrate),
tp->maxretry);
} else {
if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE)