6b0dcb8e8046c3b9f177fd586df3c5464336a207
[openwrt/svn-archive/archive.git] / package / madwifi / patches-testing / 325-sta_node_leave.patch
1 Drop stale AP nodes from the client list when disconnecting.
2 Fixes some reassoc issues.
3
4 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
5
6 --- a/net80211/ieee80211_proto.c
7 +++ b/net80211/ieee80211_proto.c
8 @@ -1352,7 +1352,7 @@
9 IEEE80211_SEND_MGMT(ni,
10 IEEE80211_FC0_SUBTYPE_DISASSOC,
11 IEEE80211_REASON_ASSOC_LEAVE);
12 - ieee80211_sta_leave(ni);
13 + ieee80211_node_leave(ni);
14 break;
15 case IEEE80211_M_HOSTAP:
16 ieee80211_iterate_nodes(&ic->ic_sta,
17 @@ -1362,6 +1362,7 @@
18 break;
19 }
20 goto reset;
21 + case IEEE80211_S_AUTH:
22 case IEEE80211_S_ASSOC:
23 switch (vap->iv_opmode) {
24 case IEEE80211_M_STA:
25 @@ -1380,7 +1381,6 @@
26 case IEEE80211_S_SCAN:
27 ieee80211_cancel_scan(vap);
28 goto reset;
29 - case IEEE80211_S_AUTH:
30 reset:
31 ieee80211_reset_bss(vap);
32 break;
33 @@ -1436,7 +1436,7 @@
34 break;
35 case IEEE80211_S_RUN: /* beacon miss */
36 if (vap->iv_opmode == IEEE80211_M_STA) {
37 - ieee80211_sta_leave(ni);
38 + ieee80211_node_leave(ni);
39 vap->iv_flags &= ~IEEE80211_F_SIBSS; /* XXX */
40 if (ic->ic_roaming == IEEE80211_ROAMING_AUTO)
41 ieee80211_check_scan(vap,
42 @@ -1487,7 +1487,7 @@
43 vap->iv_state = ostate; /* stay RUN */
44 break;
45 case IEEE80211_FC0_SUBTYPE_DEAUTH:
46 - ieee80211_sta_leave(ni);
47 + ieee80211_node_leave(ni);
48 if (ic->ic_roaming == IEEE80211_ROAMING_AUTO) {
49 /* try to reauth */
50 IEEE80211_SEND_MGMT(ni,
51 @@ -1514,7 +1514,7 @@
52 IEEE80211_FC0_SUBTYPE_ASSOC_REQ, 0);
53 break;
54 case IEEE80211_S_RUN:
55 - ieee80211_sta_leave(ni);
56 + ieee80211_node_leave(ni);
57 if (ic->ic_roaming == IEEE80211_ROAMING_AUTO) {
58 /* NB: caller specifies ASSOC/REASSOC by arg */
59 IEEE80211_SEND_MGMT(ni, arg ?