On Sun, Apr 24, 2016 at 08:47:46AM +0200, Stefan Sperling wrote:
> On Sun, Apr 24, 2016 at 01:25:31PM +0800, Nathanael Rensen wrote:
> > The diff below also introduces dedicated timers for AMRR and for scan
> > instead of using the RT2860 GP interrupt, which also improves consistency
> > with the way other drivers manage AMRR.
>
> Can you please split your diff into separate submissions, one per topic?
> That would make review and testing a lot easier.
This version includes minor tweak: When the AP goes down, we don't
need to send disassoc frames to nodes in COLLECT state.
Index: ieee80211_node.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_node.c,v
retrieving revision 1.101
diff -u -p -r1.101 ieee80211_node.c
--- ieee80211_node.c 12 Apr 2016 14:33:27 -0000 1.101
+++ ieee80211_node.c 24 Apr 2016 07:11:38 -0000
@@ -1699,8 +1699,6 @@ ieee80211_node_leave(struct ieee80211com
if (ic->ic_node_leave != NULL)
(*ic->ic_node_leave)(ic, ni);
- IEEE80211_AID_CLR(ni->ni_associd, ic->ic_aid_bitmap);
- ni->ni_associd = 0;
ieee80211_node_newstate(ni, IEEE80211_STA_COLLECT);
#if NBRIDGE > 0
Index: ieee80211_proto.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_proto.c,v
retrieving revision 1.65
diff -u -p -r1.65 ieee80211_proto.c
--- ieee80211_proto.c 12 Apr 2016 14:33:27 -0000 1.65
+++ ieee80211_proto.c 24 Apr 2016 07:13:09 -0000
@@ -840,7 +840,9 @@ ieee80211_newstate(struct ieee80211com *
case IEEE80211_M_HOSTAP:
s = splnet();
RB_FOREACH(ni, ieee80211_tree, &ic->ic_tree) {
- if (ni->ni_associd == 0)
+ if (ni->ni_associd == 0 ||
+ ni->ni_state ==
+ IEEE80211_STA_COLLECT)
continue;
IEEE80211_SEND_MGMT(ic, ni,
IEEE80211_FC0_SUBTYPE_DISASSOC,