From: mtaylor Date: Wed, 21 Nov 2007 09:39:42 +0000 (+0000) Subject: since ieee80211_input() can be called by ieee80211_input_all(), we need to check... X-Git-Url: http://git.ozo.com/?a=commitdiff_plain;h=09e974b2dbee1843b1693d0c795430228aa03d61;p=madwifi%2F.git since ieee80211_input() can be called by ieee80211_input_all(), we need to check that we are not updating statistics of all known nodes for every inbound packet for an unknown node. Merging this fix back from DFS branch, found by Benoit. -gThis line, and those below, will be ignored-- M ieee80211_input.c git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2882 0192ed92-7a03-0410-a25b-9323aeb14dbd --- diff --git a/net80211/ieee80211_input.c b/net80211/ieee80211_input.c index 273e508..8f13389 100644 --- a/net80211/ieee80211_input.c +++ b/net80211/ieee80211_input.c @@ -386,9 +386,15 @@ ieee80211_input(struct ieee80211_node *ni, /* XXX catch bad values */ goto out; } - ni->ni_rssi = rssi; - ni->ni_rtsf = rtsf; - ni->ni_last_rx = jiffies; + /* since ieee80211_input() can be called by + * ieee80211_input_all(), we need to check that we are not + * updating for unknown nodes. FIXME : such check might be + * needed at other places */ + if (IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) { + ni->ni_rssi = rssi; + ni->ni_rtsf = rtsf; + ni->ni_last_rx = jiffies; + } if (HAS_SEQ(type)) { u_int8_t tid; if (IEEE80211_QOS_HAS_SEQ(wh)) { @@ -551,7 +557,7 @@ ieee80211_input(struct ieee80211_node *ni, if (ni_wds == NULL) ieee80211_add_wds_addr(nt, ni, wh4->i_addr4, 0); else - ieee80211_unref_node(&ni_wds); /* Decr. ref count */ + ieee80211_unref_node(&ni_wds); } /*