nl80211: Prefer newer scan result over older during duplicate removal
authorJouni Malinen <j@w1.fi>
Tue, 31 Dec 2013 07:38:55 +0000 (09:38 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 31 Dec 2013 13:45:18 +0000 (15:45 +0200)
commit4ea6a47133c00abfbf363343d0d07ae0e7dd5130
tree16a8b96b027f4d00d311f9dc5becbc0efae2de64
parent9489637b42f74236526b0731848bb61be7e47659
nl80211: Prefer newer scan result over older during duplicate removal

Previously, it was possible for bss_info_handler() to end up dropping a
newer scan result entry if there were two entries with the same BSSID
and SSID (i.e., only frequency was different) and we were not associated
with either. This could happen, e.g., in some P2P use cases where device
discovery may happen on different channels. Fix this by checking the age
of the scan entries as well to prefer the most recent response.

Signed-hostap: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c