diff options
author | sam <sam@FreeBSD.org> | 2008-10-25 23:40:48 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-10-25 23:40:48 +0000 |
commit | a55a73ae951fd3b9ed30a873fa0fb732cac6b003 (patch) | |
tree | c9880689e7a4ef79df9f19b5fededf0df80e190f /sys/net80211 | |
parent | 8da942dc40cb27150f635002534eae701c59f5e1 (diff) | |
download | FreeBSD-src-a55a73ae951fd3b9ed30a873fa0fb732cac6b003.zip FreeBSD-src-a55a73ae951fd3b9ed30a873fa0fb732cac6b003.tar.gz |
improve inactivity handling debug support
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 5f8bd2e..54b9513 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -135,6 +135,11 @@ ieee80211_node_vattach(struct ieee80211vap *vap) vap->iv_inact_auth = IEEE80211_INACT_AUTH; vap->iv_inact_run = IEEE80211_INACT_RUN; vap->iv_inact_probe = IEEE80211_INACT_PROBE; + + IEEE80211_DPRINTF(vap, IEEE80211_MSG_INACT, + "%s: init %u auth %u run %u probe %u\n", __func__, + vap->iv_inact_init, vap->iv_inact_auth, + vap->iv_inact_run, vap->iv_inact_probe); } void @@ -187,18 +192,29 @@ ieee80211_node_vdetach(struct ieee80211vap *vap) void ieee80211_node_authorize(struct ieee80211_node *ni) { + struct ieee80211vap *vap = ni->ni_vap; + ni->ni_flags |= IEEE80211_NODE_AUTH; - ni->ni_inact_reload = ni->ni_vap->iv_inact_run; + ni->ni_inact_reload = vap->iv_inact_run; ni->ni_inact = ni->ni_inact_reload; + + IEEE80211_NOTE(vap, IEEE80211_MSG_INACT, ni, + "%s: inact_reload %u", __func__, ni->ni_inact_reload); } void ieee80211_node_unauthorize(struct ieee80211_node *ni) { + struct ieee80211vap *vap = ni->ni_vap; + ni->ni_flags &= ~IEEE80211_NODE_AUTH; - ni->ni_inact_reload = ni->ni_vap->iv_inact_auth; + ni->ni_inact_reload = vap->iv_inact_auth; if (ni->ni_inact > ni->ni_inact_reload) ni->ni_inact = ni->ni_inact_reload; + + IEEE80211_NOTE(vap, IEEE80211_MSG_INACT, ni, + "%s: inact_reload %u inact %u", __func__, + ni->ni_inact_reload, ni->ni_inact); } /* @@ -1023,6 +1039,9 @@ ieee80211_alloc_node(struct ieee80211_node_table *nt, ni->ni_ic = ic; IEEE80211_NODE_UNLOCK(nt); + IEEE80211_NOTE(vap, IEEE80211_MSG_INACT, ni, + "%s: inact_reload %u", __func__, ni->ni_inact_reload); + return ni; } @@ -1903,8 +1922,13 @@ restart: m_freem(ni->ni_rxfrag[0]); ni->ni_rxfrag[0] = NULL; } - if (ni->ni_inact > 0) + if (ni->ni_inact > 0) { ni->ni_inact--; + IEEE80211_NOTE(vap, IEEE80211_MSG_INACT, ni, + "%s: inact %u inact_reload %u nrates %u", + __func__, ni->ni_inact, ni->ni_inact_reload, + ni->ni_rates.rs_nrates); + } /* * Special case ourself; we may be idle for extended periods * of time and regardless reclaiming our state is wrong. @@ -2119,8 +2143,8 @@ ieee80211_dump_node(struct ieee80211_node_table *nt, struct ieee80211_node *ni) ether_sprintf(ni->ni_bssid), ni->ni_esslen, ni->ni_essid, ni->ni_chan->ic_freq, ni->ni_chan->ic_flags); - printf("\tinact %u txrate %u\n", - ni->ni_inact, ni->ni_txrate); + printf("\tinact %u inact_reload %u txrate %u\n", + ni->ni_inact, ni->ni_inact_reload, ni->ni_txrate); printf("\thtcap %x htparam %x htctlchan %u ht2ndchan %u\n", ni->ni_htcap, ni->ni_htparam, ni->ni_htctlchan, ni->ni_ht2ndchan); |