ifconfig(8): interpret VHT rates correctly for 'list roam / txparam' options

They are represented via MCS rate index, not as a 'speed in MBps' * 2.

MFC after:	5 days
This commit is contained in:
avos 2019-02-03 00:18:29 +00:00
parent 2b47cf4fb9
commit be6f552646

View File

@ -4301,7 +4301,10 @@ list_roam(int s)
rp = &roamparams.params[mode]; rp = &roamparams.params[mode];
if (rp->rssi == 0 && rp->rate == 0) if (rp->rssi == 0 && rp->rate == 0)
continue; continue;
if (mode == IEEE80211_MODE_11NA || mode == IEEE80211_MODE_11NG) { if (mode == IEEE80211_MODE_11NA ||
mode == IEEE80211_MODE_11NG ||
mode == IEEE80211_MODE_VHT_2GHZ ||
mode == IEEE80211_MODE_VHT_5GHZ) {
if (rp->rssi & 1) if (rp->rssi & 1)
LINE_CHECK("roam:%-7.7s rssi %2u.5dBm MCS %2u ", LINE_CHECK("roam:%-7.7s rssi %2u.5dBm MCS %2u ",
modename[mode], rp->rssi/2, modename[mode], rp->rssi/2,
@ -4332,7 +4335,10 @@ list_txparams(int s)
tp = &txparams.params[mode]; tp = &txparams.params[mode];
if (tp->mgmtrate == 0 && tp->mcastrate == 0) if (tp->mgmtrate == 0 && tp->mcastrate == 0)
continue; continue;
if (mode == IEEE80211_MODE_11NA || mode == IEEE80211_MODE_11NG) { if (mode == IEEE80211_MODE_11NA ||
mode == IEEE80211_MODE_11NG ||
mode == IEEE80211_MODE_VHT_2GHZ ||
mode == IEEE80211_MODE_VHT_5GHZ) {
if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE) if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE)
LINE_CHECK("%-7.7s ucast NONE mgmt %2u MCS " LINE_CHECK("%-7.7s ucast NONE mgmt %2u MCS "
"mcast %2u MCS maxretry %u", "mcast %2u MCS maxretry %u",