summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_node.c
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2010-06-19 08:33:51 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2010-06-19 08:33:51 +0000
commit1a5a08e080c7b687698a26d72d84c0d84cb24470 (patch)
treebc645d55af7d2fd12da34f2c20ad9e3b25a95c22 /sys/net80211/ieee80211_node.c
parent6ecd08a83368dc12fc1dbff5bd021a0617cae92b (diff)
In ieee80211_node_leave(), clear the associd after calling
ieee80211_node_leave_rsn() since ieee80211_node_leave_rsn() calls ic_delete_key() and drivers like ral(4) RT2860 need a valid associd in their delete_key callbacks. This affects HostAP mode only. from Nathanael Rensen. remove a useless (nested) #ifndef IEEE80211_STA_ONLY while i'm here
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-rw-r--r--sys/net80211/ieee80211_node.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 60508a63de4..b3c483570c5 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_node.c,v 1.59 2010/06/14 17:51:43 damien Exp $ */
+/* $OpenBSD: ieee80211_node.c,v 1.60 2010/06/19 08:33:50 damien Exp $ */
/* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */
/*-
@@ -1434,10 +1434,9 @@ ieee80211_node_leave_rsn(struct ieee80211com *ic, struct ieee80211_node *ni)
ni->ni_flags &= ~IEEE80211_NODE_PMK;
ni->ni_rsn_gstate = RSNA_IDLE;
-#ifndef IEEE80211_STA_ONLY
timeout_del(&ni->ni_eapol_to);
timeout_del(&ni->ni_sa_query_to);
-#endif
+
ni->ni_rsn_retries = 0;
ni->ni_flags &= ~IEEE80211_NODE_TXRXPROT;
ni->ni_port_valid = 0;
@@ -1505,13 +1504,11 @@ ieee80211_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni)
if (ic->ic_opmode != IEEE80211_M_HOSTAP)
panic("not in ap mode, mode %u", ic->ic_opmode);
/*
- * If node wasn't previously associated all
- * we need to do is reclaim the reference.
+ * If node wasn't previously associated all we need to do is
+ * reclaim the reference.
*/
if (ni->ni_associd == 0)
return;
- IEEE80211_AID_CLR(ni->ni_associd, ic->ic_aid_bitmap);
- ni->ni_associd = 0;
if (ni->ni_pwrsave == IEEE80211_PS_DOZE)
ic->ic_pssta--;
@@ -1527,6 +1524,8 @@ ieee80211_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni)
ieee80211_node_leave_ht(ic, ni);
#endif
+ IEEE80211_AID_CLR(ni->ni_associd, ic->ic_aid_bitmap);
+ ni->ni_associd = 0;
ieee80211_node_newstate(ni, IEEE80211_STA_COLLECT);
#if NBRIDGE > 0