Date: Sun, 3 Feb 2019 04:41:00 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343700 - head/sbin/ifconfig Message-ID: <201902030441.x134f0W9092819@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Sun Feb 3 04:41:00 2019 New Revision: 343700 URL: https://svnweb.freebsd.org/changeset/base/343700 Log: ifconfig(8): actually, non-11n rates should be divided by 2... MFC after: 1 week MFC with: 343698 Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Sun Feb 3 04:31:50 2019 (r343699) +++ head/sbin/ifconfig/ifieee80211.c Sun Feb 3 04:41:00 2019 (r343700) @@ -4331,6 +4331,14 @@ 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) { @@ -4350,9 +4358,9 @@ list_txparams(int s) LINE_CHECK("%-7.7s ucast NONE mgmt %2u %s " "mcast %2u %s maxretry %u", modename[mode], - tp->mgmtrate &~ IEEE80211_RATE_MCS, + get_rate_value(tp->mgmtrate), get_mcs_mbs_rate_str(tp->mgmtrate), - tp->mcastrate &~ IEEE80211_RATE_MCS, + get_rate_value(tp->mcastrate), get_mcs_mbs_rate_str(tp->mcastrate), tp->maxretry); else @@ -4360,9 +4368,9 @@ list_txparams(int s) "mcast %2u %s maxretry %u", modename[mode], tp->ucastrate &~ IEEE80211_RATE_MCS, - tp->mgmtrate &~ IEEE80211_RATE_MCS, + get_rate_value(tp->mgmtrate), get_mcs_mbs_rate_str(tp->mgmtrate), - tp->mcastrate &~ IEEE80211_RATE_MCS, + get_rate_value(tp->mcastrate), get_mcs_mbs_rate_str(tp->mcastrate), tp->maxretry); } else {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902030441.x134f0W9092819>