diff options
author | bschmidt <bschmidt@FreeBSD.org> | 2010-08-14 09:29:42 +0000 |
---|---|---|
committer | bschmidt <bschmidt@FreeBSD.org> | 2010-08-14 09:29:42 +0000 |
commit | d5905923b376a84616df463c0056f138adaf8cb2 (patch) | |
tree | a4331f78d9aac2663e6f5035f840d835a13141e7 /sys | |
parent | e677a6e72133800e3371572917a0833defd37d06 (diff) | |
download | FreeBSD-src-d5905923b376a84616df463c0056f138adaf8cb2.zip FreeBSD-src-d5905923b376a84616df463c0056f138adaf8cb2.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_sta.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 992ea0f..2c1acff 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -817,6 +817,7 @@ ieee80211_sta_join(struct ieee80211vap *vap, struct ieee80211_channel *chan, 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 ieee80211vap *vap, #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 ieee80211vap *vap, 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_node *ni, int resp) ); 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); diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 4944292..f93c3ed 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #ifdef IEEE80211_SUPPORT_SUPERG #include <net80211/ieee80211_superg.h> #endif +#include <net80211/ieee80211_ratectl.h> #define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2) @@ -1596,6 +1597,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, 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)) |