Date: Thu, 11 Jun 2009 04:43:43 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r193966 - head/sys/net80211 Message-ID: <200906110443.n5B4hhvD035516@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Thu Jun 11 04:43:42 2009 New Revision: 193966 URL: http://svn.freebsd.org/changeset/base/193966 Log: When associating to an AP we don't know if HT is negotiated until we receive the AssocResp, so we can only set ni_txparms properly at that point. To make this possible make node_setuptxparms public as ieee80211_node_setuptxparms. Modified: head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_node.h head/sys/net80211/ieee80211_sta.c Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Thu Jun 11 00:42:53 2009 (r193965) +++ head/sys/net80211/ieee80211_node.c Thu Jun 11 04:43:42 2009 (r193966) @@ -225,8 +225,8 @@ ieee80211_node_unauthorize(struct ieee80 /* * Fix tx parameters for a node according to ``association state''. */ -static void -node_setuptxparms(struct ieee80211_node *ni) +void +ieee80211_node_setuptxparms(struct ieee80211_node *ni) { struct ieee80211vap *vap = ni->ni_vap; enum ieee80211_phymode mode; @@ -794,7 +794,7 @@ ieee80211_sta_join(struct ieee80211vap * IEEE80211_F_DOSORT); if (ieee80211_iserp_rateset(&ni->ni_rates)) ni->ni_flags |= IEEE80211_NODE_ERP; - node_setuptxparms(ni); + ieee80211_node_setuptxparms(ni); return ieee80211_sta_join1(ieee80211_ref_node(ni)); } @@ -1364,7 +1364,7 @@ ieee80211_fakeup_adhoc_node(struct ieee8 ni->ni_flags |= IEEE80211_NODE_FF; #endif } - node_setuptxparms(ni); + ieee80211_node_setuptxparms(ni); if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, 1); /* XXX not right for 802.1x/WPA */ @@ -1430,7 +1430,7 @@ ieee80211_add_neighbor(struct ieee80211v ieee80211_init_neighbor(ni, wh, sp); if (ieee80211_iserp_rateset(&ni->ni_rates)) ni->ni_flags |= IEEE80211_NODE_ERP; - node_setuptxparms(ni); + ieee80211_node_setuptxparms(ni); if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, 1); /* XXX not right for 802.1x/WPA */ @@ -2297,7 +2297,7 @@ ieee80211_node_join(struct ieee80211_nod ", turbo" : "" ); - node_setuptxparms(ni); + ieee80211_node_setuptxparms(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_node.h ============================================================================== --- head/sys/net80211/ieee80211_node.h Thu Jun 11 00:42:53 2009 (r193965) +++ head/sys/net80211/ieee80211_node.h Thu Jun 11 04:43:42 2009 (r193966) @@ -286,6 +286,7 @@ ieee80211_node_is_authorized(const struc void ieee80211_node_authorize(struct ieee80211_node *); void ieee80211_node_unauthorize(struct ieee80211_node *); +void ieee80211_node_setuptxparms(struct ieee80211_node *); void ieee80211_node_set_chan(struct ieee80211_node *, struct ieee80211_channel *); void ieee80211_create_ibss(struct ieee80211vap*, struct ieee80211_channel *); Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Thu Jun 11 00:42:53 2009 (r193965) +++ head/sys/net80211/ieee80211_sta.c Thu Jun 11 04:43:42 2009 (r193966) @@ -1594,6 +1594,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, ieee80211_setup_htrates(ni, htcap, IEEE80211_F_JOIN | IEEE80211_F_DOBRS); ieee80211_setup_basic_htrates(ni, htinfo); + ieee80211_node_setuptxparms(ni); } else { #ifdef IEEE80211_SUPPORT_SUPERG if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_ATH))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906110443.n5B4hhvD035516>