Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 2013 05:00:18 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r258032 - head/sys/dev/iwn
Message-ID:  <201311120500.rAC50I8B077113@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Tue Nov 12 05:00:18 2013
New Revision: 258032
URL: http://svnweb.freebsd.org/changeset/base/258032

Log:
  Use the negotiated HT rate set when generating the link quality table.

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c	Tue Nov 12 04:57:31 2013	(r258031)
+++ head/sys/dev/iwn/if_iwn.c	Tue Nov 12 05:00:18 2013	(r258032)
@@ -4322,7 +4322,7 @@ iwn_set_link_quality(struct iwn_softc *s
 {
 #define	RV(v)	((v) & IEEE80211_RATE_VAL)
 	struct iwn_node *wn = (void *)ni;
-	struct ieee80211_rateset *rs = &ni->ni_rates;
+	struct ieee80211_rateset *rs;
 	struct iwn_cmd_link_quality linkq;
 	uint8_t txant;
 	int i, rate, txrate;
@@ -4346,10 +4346,13 @@ iwn_set_link_quality(struct iwn_softc *s
 	 * 11n _and_ we have some 11n rates, or don't
 	 * try.
 	 */
-	if (IEEE80211_IS_CHAN_HT(ni->ni_chan) && ni->ni_htrates.rs_nrates > 0)
+	if (IEEE80211_IS_CHAN_HT(ni->ni_chan) && ni->ni_htrates.rs_nrates > 0) {
+		rs = (struct ieee80211_rateset *) &ni->ni_htrates;
 		is_11n = 1;
-	else
+	} else {
+		rs = &ni->ni_rates;
 		is_11n = 0;
+	}
 
 	/* Start at highest available bit-rate. */
 	if (is_11n)
@@ -4360,7 +4363,7 @@ iwn_set_link_quality(struct iwn_softc *s
 		uint32_t plcp;
 
 		if (is_11n)
-			rate = IEEE80211_RATE_MCS | txrate;
+			rate = IEEE80211_RATE_MCS | rs->rs_rates[txrate];
 		else
 			rate = RV(rs->rs_rates[txrate]);
 



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