diff options
author | sam <sam@FreeBSD.org> | 2008-02-03 18:29:58 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-02-03 18:29:58 +0000 |
commit | ef6f39e69e61e5fd28a1cc5eea71b9032b12d976 (patch) | |
tree | 510241bf32e8ce71dc49bb262668249bb268079f /sbin/ifconfig | |
parent | d6a0f9dd5e26fbbeef1bb06bcc9c09993484efe8 (diff) | |
download | FreeBSD-src-ef6f39e69e61e5fd28a1cc5eea71b9032b12d976.zip FreeBSD-src-ef6f39e69e61e5fd28a1cc5eea71b9032b12d976.tar.gz |
correct tx rate displayed by list sta: the reported legacy tx rate
is still an index into the rate set and not (yet) the rate code
Noticed by: JoaoBR
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r-- | sbin/ifconfig/ifieee80211.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index bf829d5..97eed75 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -2056,14 +2056,17 @@ getrxseq(const struct ieee80211req_sta_info *si) } static int -gettxrate(int txrate, int chanflags) +gettxrate(const struct ieee80211req_sta_info *si) { + int txrate = si->isi_txrate; + if (txrate & 0x80) { txrate = htrates[txrate & 0xf]; /* NB: could bump this more based on short gi */ - return chanflags & IEEE80211_CHAN_HT40 ? txrate : txrate / 2; + return si->isi_flags & IEEE80211_CHAN_HT40 ? + txrate : txrate / 2; } else - return (txrate & IEEE80211_RATE_VAL) / 2; + return (si->isi_rates[txrate] & IEEE80211_RATE_VAL) / 2; } static void @@ -2116,7 +2119,7 @@ list_stations(int s) , ether_ntoa((const struct ether_addr*) si->isi_macaddr) , IEEE80211_AID(si->isi_associd) , ieee80211_mhz2ieee(si->isi_freq, si->isi_flags) - , gettxrate(si->isi_txrate, si->isi_flags) + , gettxrate(si) , si->isi_rssi/2. , si->isi_inact , gettxseq(si) |