From owner-svn-src-all@FreeBSD.ORG Sat Aug 14 09:29:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 813B31065693; Sat, 14 Aug 2010 09:29:43 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 562E28FC14; Sat, 14 Aug 2010 09:29:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7E9ThlG022174; Sat, 14 Aug 2010 09:29:43 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7E9ThxE022171; Sat, 14 Aug 2010 09:29:43 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201008140929.o7E9ThxE022171@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 14 Aug 2010 09:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211295 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 14 Aug 2010 09:29:43 -0000 Author: bschmidt Date: Sat Aug 14 09:29:42 2010 New Revision: 211295 URL: http://svn.freebsd.org/changeset/base/211295 Log: Initialize ni_txrate after txparams have been setup. Some drivers calculate various things prior to association based on ni_txrate and rely on it being nonzero. PR: kern/149185 MFC after: 2 weeks Modified: head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_sta.c Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Sat Aug 14 00:50:26 2010 (r211294) +++ head/sys/net80211/ieee80211_node.c Sat Aug 14 09:29:42 2010 (r211295) @@ -817,6 +817,7 @@ ieee80211_sta_join(struct ieee80211vap * if (ieee80211_iserp_rateset(&ni->ni_rates)) ni->ni_flags |= IEEE80211_NODE_ERP; ieee80211_node_setuptxparms(ni); + ieee80211_ratectl_node_init(ni); return ieee80211_sta_join1(ieee80211_ref_node(ni)); } @@ -1401,6 +1402,7 @@ ieee80211_fakeup_adhoc_node(struct ieee8 #endif } ieee80211_node_setuptxparms(ni); + ieee80211_ratectl_node_init(ni); if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, 1); /* XXX not right for 802.1x/WPA */ @@ -1470,6 +1472,7 @@ ieee80211_add_neighbor(struct ieee80211v if (ieee80211_iserp_rateset(&ni->ni_rates)) ni->ni_flags |= IEEE80211_NODE_ERP; ieee80211_node_setuptxparms(ni); + ieee80211_ratectl_node_init(ni); if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, 1); /* XXX not right for 802.1x/WPA */ @@ -2338,6 +2341,7 @@ ieee80211_node_join(struct ieee80211_nod ); ieee80211_node_setuptxparms(ni); + ieee80211_ratectl_node_init(ni); /* give driver a chance to setup state like ni_txrate */ if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, newassoc); Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Sat Aug 14 00:50:26 2010 (r211294) +++ head/sys/net80211/ieee80211_sta.c Sat Aug 14 09:29:42 2010 (r211295) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #ifdef IEEE80211_SUPPORT_SUPERG #include #endif +#include #define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2) @@ -1596,6 +1597,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, IEEE80211_F_JOIN | IEEE80211_F_DOBRS); ieee80211_setup_basic_htrates(ni, htinfo); ieee80211_node_setuptxparms(ni); + ieee80211_ratectl_node_init(ni); } else { #ifdef IEEE80211_SUPPORT_SUPERG if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_ATH))