aboutsummaryrefslogtreecommitdiffstats
path: root/package/madwifi/patches-r3776/325-sta_node_leave.patch
blob: e1f51b61b20e113d1cccadc37b71fde769731726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Drop stale AP nodes from the client list when disconnecting.
Fixes some reassoc issues.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

Index: madwifi-trunk-r3776/net80211/ieee80211_proto.c
===================================================================
--- madwifi-trunk-r3776.orig/net80211/ieee80211_proto.c	2008-07-17 02:20:51.000000000 +0200
+++ madwifi-trunk-r3776/net80211/ieee80211_proto.c	2008-07-17 04:06:47.000000000 +0200
@@ -1352,7 +1352,7 @@
 				IEEE80211_SEND_MGMT(ni,
 					IEEE80211_FC0_SUBTYPE_DISASSOC,
 					IEEE80211_REASON_ASSOC_LEAVE);
-				ieee80211_sta_leave(ni);
+				ieee80211_node_leave(ni);
 				break;
 			case IEEE80211_M_HOSTAP:
 				ieee80211_iterate_nodes(&ic->ic_sta,
@@ -1362,6 +1362,7 @@
 				break;
 			}
 			goto reset;
+		case IEEE80211_S_AUTH:
 		case IEEE80211_S_ASSOC:
 			switch (vap->iv_opmode) {
 			case IEEE80211_M_STA:
@@ -1380,7 +1381,6 @@
 		case IEEE80211_S_SCAN:
 			ieee80211_cancel_scan(vap);
 			goto reset;
-		case IEEE80211_S_AUTH:
 		reset:
 			ieee80211_reset_bss(vap);
 			break;
@@ -1436,7 +1436,7 @@
 			break;
 		case IEEE80211_S_RUN:		/* beacon miss */
 			if (vap->iv_opmode == IEEE80211_M_STA) {
-				ieee80211_sta_leave(ni);
+				ieee80211_node_leave(ni);
 				vap->iv_flags &= ~IEEE80211_F_SIBSS;	/* XXX */
 				if (ic->ic_roaming == IEEE80211_ROAMING_AUTO)
 					ieee80211_check_scan(vap,
@@ -1487,7 +1487,7 @@
 				vap->iv_state = ostate;	/* stay RUN */
 				break;
 			case IEEE80211_FC0_SUBTYPE_DEAUTH:
-				ieee80211_sta_leave(ni);
+				ieee80211_node_leave(ni);
 				if (ic->ic_roaming == IEEE80211_ROAMING_AUTO) {
 					/* try to reauth */
 					IEEE80211_SEND_MGMT(ni,
@@ -1514,7 +1514,7 @@
 				IEEE80211_FC0_SUBTYPE_ASSOC_REQ, 0);
 			break;
 		case IEEE80211_S_RUN:
-			ieee80211_sta_leave(ni);
+			ieee80211_node_leave(ni);
 			if (ic->ic_roaming == IEEE80211_ROAMING_AUTO) {
 				/* NB: caller specifies ASSOC/REASSOC by arg */
 				IEEE80211_SEND_MGMT(ni, arg ?