aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-20 04:38:50 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-20 04:38:50 -0500
commit2e9ff56efbc005ab2b92b68df65940c7459446c6 (patch)
tree8844a54f2b205bb5dceb6391d05df9a9f8bc62d2 /net
parentd378aca6ec708bfb24df5c47801b1f2399efc481 (diff)
parentcc8279f68c34c3f32b3a85f3103b0ad755c57846 (diff)
downloadlinux-2e9ff56efbc005ab2b92b68df65940c7459446c6.tar.gz
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net')
-rw-r--r--net/ieee80211/ieee80211_rx.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index 785d5a170a7fa..a7f2a642a5123 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -1345,7 +1345,19 @@ static void update_network(struct ieee80211_network *dst,
ieee80211_network_reset(dst);
dst->ibss_dfs = src->ibss_dfs;
- memcpy(&dst->stats, &src->stats, sizeof(struct ieee80211_rx_stats));
+ /* We only update the statistics if they were created by receiving
+ * the network information on the actual channel the network is on.
+ *
+ * This keeps beacons received on neighbor channels from bringing
+ * down the signal level of an AP. */
+ if (dst->channel == src->stats.received_channel)
+ memcpy(&dst->stats, &src->stats,
+ sizeof(struct ieee80211_rx_stats));
+ else
+ IEEE80211_DEBUG_SCAN("Network " MAC_FMT " info received "
+ "off channel (%d vs. %d)\n", MAC_ARG(src->bssid),
+ dst->channel, src->stats.received_channel);
+
dst->capability = src->capability;
memcpy(dst->rates, src->rates, src->rates_len);
dst->rates_len = src->rates_len;