From owner-svn-src-all@FreeBSD.ORG Tue Nov 12 05:00:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2869513; Tue, 12 Nov 2013 05:00:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 92A503EFF; Tue, 12 Nov 2013 05:00:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAC50Ixs077114; Tue, 12 Nov 2013 05:00:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAC50I8B077113; Tue, 12 Nov 2013 05:00:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311120500.rAC50I8B077113@svn.freebsd.org> From: Adrian Chadd Date: Tue, 12 Nov 2013 05:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258032 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Nov 2013 05:00:18 -0000 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]);