Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Feb 2016 17:43:51 -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-Vmo=aN%2BP4AUfzDbek0ExuLi_-hhxNJJTP2NNpAkgwqV8NyA@mail.gmail.com>
In-Reply-To: <op.yc7k7mh34dikkl@localhost>
References:  <op.yc7k7mh34dikkl@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
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> wrote:
> 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 = &ic->ic_sta;
>         struct ieee80211vap *vap;
>         struct ieee80211_node *ni;
>         int gen = 0;
>
>         IEEE80211_NODE_ITERATE_LOCK(nt);
>         gen = ++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 <= vap->iv_inact_probe) &&
>                             ni->ni_rates.rs_nrates != 0) {
>                                 IEEE80211_NOTE(vap,
>                                     IEEE80211_MSG_INACT |
> IEEE80211_MSG_NODE,
>                                     ni, "%s",
>                                     "probe station due to inactivity");
>                                 /*
>                                  * Grab a reference before unlocking the
> table
>                                  * so the node cannot be reclaimed before 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-Vmo=aN%2BP4AUfzDbek0ExuLi_-hhxNJJTP2NNpAkgwqV8NyA>