Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2008 22:16:05 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 137363 for review
Message-ID:  <200803102216.m2AMG5WC054468@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=137363

Change 137363 by sam@sam_ebb on 2008/03/10 22:15:31

	use the new sta info data for the current tx rate so we can
	more accurately report ht rates

Affected files ...

.. //depot/projects/vap/sbin/ifconfig/ifieee80211.c#13 edit

Differences ...

==== //depot/projects/vap/sbin/ifconfig/ifieee80211.c#13 (text+ko) ====

@@ -161,26 +161,6 @@
 	"sturbo", "11na", "11ng"
 };
 
-/* XXX need max array size */
-static const int htrates[16] = {
-	13,		/* IFM_IEEE80211_MCS0 */
-	26,		/* IFM_IEEE80211_MCS1 */
-	39,		/* IFM_IEEE80211_MCS2 */
-	52,		/* IFM_IEEE80211_MCS3 */
-	78,		/* IFM_IEEE80211_MCS4 */
-	104,		/* IFM_IEEE80211_MCS5 */
-	117,		/* IFM_IEEE80211_MCS6 */
-	130,		/* IFM_IEEE80211_MCS7 */
-	26,		/* IFM_IEEE80211_MCS8 */
-	52,		/* IFM_IEEE80211_MCS9 */
-	78,		/* IFM_IEEE80211_MCS10 */
-	104,		/* IFM_IEEE80211_MCS11 */
-	156,		/* IFM_IEEE80211_MCS12 */
-	208,		/* IFM_IEEE80211_MCS13 */
-	234,		/* IFM_IEEE80211_MCS14 */
-	260,		/* IFM_IEEE80211_MCS15 */
-};
-
 static void set80211(int s, int type, int val, int len, void *data);
 static int get80211(int s, int type, void *data, int len);
 static int get80211len(int s, int type, void *data, int len, int *plen);
@@ -3391,20 +3371,6 @@
 #undef IEEE80211_NODE_QOS
 }
 
-static int
-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 si->isi_flags & IEEE80211_CHAN_HT40 ?
-		    txrate : txrate / 2;
-	} else
-		return (txrate & IEEE80211_RATE_VAL) / 2;
-}
-
 static void
 list_stations(int s)
 {
@@ -3455,7 +3421,7 @@
 			, ether_ntoa((const struct ether_addr*) si->isi_macaddr)
 			, IEEE80211_AID(si->isi_associd)
 			, ieee80211_mhz2ieee(si->isi_freq, si->isi_flags)
-			, gettxrate(si)
+			, si->isi_txmbps/2
 			, si->isi_rssi/2.
 			, si->isi_inact
 			, gettxseq(si)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803102216.m2AMG5WC054468>