aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee80211/ieee80211_rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ieee80211/ieee80211_rx.c')
-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 785d5a170a7f..a7f2a642a512 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,
1345 ieee80211_network_reset(dst); 1345 ieee80211_network_reset(dst);
1346 dst->ibss_dfs = src->ibss_dfs; 1346 dst->ibss_dfs = src->ibss_dfs;
1347 1347
1348 memcpy(&dst->stats, &src->stats, sizeof(struct ieee80211_rx_stats)); 1348 /* We only update the statistics if they were created by receiving
1349 * the network information on the actual channel the network is on.
1350 *
1351 * This keeps beacons received on neighbor channels from bringing
1352 * down the signal level of an AP. */
1353 if (dst->channel == src->stats.received_channel)
1354 memcpy(&dst->stats, &src->stats,
1355 sizeof(struct ieee80211_rx_stats));
1356 else
1357 IEEE80211_DEBUG_SCAN("Network " MAC_FMT " info received "
1358 "off channel (%d vs. %d)\n", MAC_ARG(src->bssid),
1359 dst->channel, src->stats.received_channel);
1360
1349 dst->capability = src->capability; 1361 dst->capability = src->capability;
1350 memcpy(dst->rates, src->rates, src->rates_len); 1362 memcpy(dst->rates, src->rates, src->rates_len);
1351 dst->rates_len = src->rates_len; 1363 dst->rates_len = src->rates_len;