summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2017-01-09 09:30:48 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2017-01-09 09:30:48 +0000
commit2e4e0c37e5613aadae91ae14e4cca82ef60739d5 (patch)
tree4e7c5de2761603c92ecbf1ea26934b005f33f9a9
parent5a8aca84d84297bd03a4a0aabe587936e387a6be (diff)
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.c10
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