Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Feb 2016 02:34:23 +0200
From:      "Andriy Voskoboinyk" <avos@freebsd.org>
To:        "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org>
Subject:   net80211 inactivity processing
Message-ID:  <op.yc7k7mh34dikkl@localhost>

next in thread | raw e-mail | index | archive | help
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?).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.yc7k7mh34dikkl>