diff options
author | sam <sam@FreeBSD.org> | 2009-06-11 04:43:42 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-06-11 04:43:42 +0000 |
commit | b54b6d28ba346049e8588efb971a081f0111bcab (patch) | |
tree | 0818e1e151ad8935a44d21ea2010d56e515f2113 /sys/net80211 | |
parent | 1ff58b569863e1539ec3fd6e87588b27d7f0d181 (diff) | |
download | FreeBSD-src-b54b6d28ba346049e8588efb971a081f0111bcab.zip FreeBSD-src-b54b6d28ba346049e8588efb971a081f0111bcab.tar.gz |
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.
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 12 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.h | 1 | ||||
-rw-r--r-- | sys/net80211/ieee80211_sta.c | 1 |
3 files changed, 8 insertions, 6 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 8c92208..68e3fa4 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -225,8 +225,8 @@ ieee80211_node_unauthorize(struct ieee80211_node *ni) /* * 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 *vap, struct ieee80211_channel *chan, 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 ieee80211vap *vap, 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 ieee80211vap *vap, 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_node *ni, int resp) ", 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); diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index 65d16a2..0b09453 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -286,6 +286,7 @@ ieee80211_node_is_authorized(const struct ieee80211_node *ni) 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 *); diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 7675cc6..3b0c13b 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -1594,6 +1594,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, 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)) |