Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Feb 2016 22:26:37 -0800
From:      Adrian Chadd <adrian.chadd@gmail.com>
To:        Andriy Voskoboinyk <avos@freebsd.org>
Cc:        "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org>
Subject:   Re: net80211 inactivity processing
Message-ID:  <CAJ-VmokhfH21FMrJkxaqo-nCztj1qqcGZEAAp=6VzqELxRBzCg@mail.gmail.com>
In-Reply-To: <op.yc8wokei4dikkl@localhost>
References:  <op.yc7k7mh34dikkl@localhost> <CAJ-Vmo=aN%2BP4AUfzDbek0ExuLi_-hhxNJJTP2NNpAkgwqV8NyA@mail.gmail.com> <op.yc8wokei4dikkl@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
On 22 February 2016 at 09:39, Andriy Voskoboinyk <avos@freebsd.org> wrote:
> Mon, 22 Feb 2016 03:43:51 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0=
=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Adrian Chadd
> <adrian.chadd@gmail.com>:
>
> Because control frames are disabled by default? (the timer is refreshed
> every time when a frame goes into input path (ni->ni_inact =3D
> ni->ni_inact_reload)).
> This may be added to TX callback (already implemented in
> https://reviews.freebsd.org/D5147); however, I have no idea what to do wi=
th

Right.

I need to go digging a little more about it. It's a good catch; I just
need to see whether to kill the code or whether to go back to the
older way of handling node expiry.


-a


>
>
>> drivers that lie about frame completion/failure
>
>
>> Hi,
>>
>> I think it is a hold-over from how node reclaimation used to work.
>> Sending null data frames to probe if a station is still there is a
>> common thing to do. So yeah, maybe we should go figure out why the
>> inactivity timer isn't kicked if the NULL data frame succeeds (ie, the
>> driver explicitly gives us ACK feedback, rather than drivers that lie
>> about frame completion/failure.)
>>
>>
>>
>> -adrian
>>
>>
>> On 21 February 2016 at 16:34, Andriy Voskoboinyk <avos@freebsd.org> wrot=
e:
>>>
>>> Hi,
>>>
>>> What is the purpose of the following code? (especially in HOSTAP mode)
>>> (ieee80211_node.c):
>>>
>>> static void
>>> ieee80211_timeout_stations(struct ieee80211com *ic)
>>> {
>>>         struct ieee80211_node_table *nt =3D &ic->ic_sta;
>>>         struct ieee80211vap *vap;
>>>         struct ieee80211_node *ni;
>>>         int gen =3D 0;
>>>
>>>         IEEE80211_NODE_ITERATE_LOCK(nt);
>>>         gen =3D ++nt->nt_scangen;
>>> restart:
>>>         IEEE80211_NODE_LOCK(nt);
>>>         TAILQ_FOREACH(ni, &nt->nt_node, ni_list) {
>>> ...
>>>                         if ((vap->iv_flags_ext & IEEE80211_FEXT_INACT) =
&&
>>>                             (0 < ni->ni_inact &&
>>>                              ni->ni_inact <=3D vap->iv_inact_probe) &&
>>>                             ni->ni_rates.rs_nrates !=3D 0) {
>>>                                 IEEE80211_NOTE(vap,
>>>                                     IEEE80211_MSG_INACT |
>>> IEEE80211_MSG_NODE,
>>>                                     ni, "%s",
>>>                                     "probe station due to inactivity");
>>>                                 /*
>>>                                  * Grab a reference before unlocking th=
e
>>> table
>>>                                  * so the node cannot be reclaimed befo=
re
>>> we
>>>                                  * send the frame.
>>> ieee80211_send_nulldata
>>>                                  * understands we've done this and
>>> reclaims
>>> the
>>>                                  * ref for us as needed.
>>>                                  */
>>>                                 ieee80211_ref_node(ni);
>>>                                 IEEE80211_NODE_UNLOCK(nt);
>>>                                 ieee80211_send_nulldata(ni);
>>> <<<
>>> here
>>>                                 /* XXX stat? */
>>>                                 goto restart;
>>>                         }
>>> ...
>>>         }
>>>         IEEE80211_NODE_UNLOCK(nt);
>>>
>>>         IEEE80211_NODE_ITERATE_UNLOCK(nt);
>>> }
>>>
>>> As for me, ieee80211_send_nulldata() will not refresh ni->ni_inact,
>>> nor will trigger any data transmission from the STA (so, it does
>>> nothing?).
>>> _______________________________________________
>>> freebsd-wireless@freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
>>> To unsubscribe, send any mail to
>>> "freebsd-wireless-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokhfH21FMrJkxaqo-nCztj1qqcGZEAAp=6VzqELxRBzCg>