diff options
author | 2017-01-09 09:30:47 +0000 | |
---|---|---|
committer | 2017-01-09 09:30:47 +0000 | |
commit | 5252ab4d529a4f5e0074413146618c237f5829af (patch) | |
tree | 5e0250d9fd2fd4bbcf60ec1dc26492ad0caa8d13 | |
parent | Fix ieee80211_add_htop(), which is not yet called in active code paths. (diff) | |
download | wireguard-openbsd-5252ab4d529a4f5e0074413146618c237f5829af.tar.xz wireguard-openbsd-5252ab4d529a4f5e0074413146618c237f5829af.zip |
When acting as hostap, negotiate HT before calling the driver's ic_newassoc()
function, not afterwards. Drivers now know whether a joining node supports HT
which helps with setting up state such as which Tx rate to use.
-rw-r--r-- | sys/net80211/ieee80211_node.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 564116364bc..13d6ea0b076 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.106 2016/12/17 18:35:54 stsp Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.107 2017/01/09 09:30:47 stsp Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -1544,6 +1544,10 @@ ieee80211_node_join(struct ieee80211com *ic, struct ieee80211_node *ni, ether_sprintf(ni->ni_macaddr), newassoc ? "newly" : "already", ni->ni_associd & ~0xc000)); + ieee80211_ht_negotiate(ic, ni); + if (ic->ic_flags & IEEE80211_F_HTON) + ieee80211_node_join_ht(ic, ni); + /* give driver a chance to setup state like ni_txrate */ if (ic->ic_newassoc) (*ic->ic_newassoc)(ic, ni, newassoc); @@ -1556,10 +1560,6 @@ ieee80211_node_join(struct ieee80211com *ic, struct ieee80211_node *ni, } else ieee80211_node_join_rsn(ic, ni); - ieee80211_ht_negotiate(ic, ni); - if (ni->ni_flags & IEEE80211_NODE_HT) - ieee80211_node_join_ht(ic, ni); - #if NBRIDGE > 0 /* * If the parent interface is a bridgeport, learn |