From 2e4e0c37e5613aadae91ae14e4cca82ef60739d5 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Mon, 9 Jan 2017 09:30:48 +0000 Subject: 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. --- sys/net80211/ieee80211_node.c | 10 +++++----- 1 file 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 -- cgit v1.2.3