Mon, 22 Feb 2016 03:43:51 +0200 було написано Adrian Chadd <adrian.ch...@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 = 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 with

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 <a...@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-unsubscr...@freebsd.org"
_______________________________________________
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"

Reply via email to