* and not to transmit the frames at any of those rates.
*/
u8 p2p_probe;
+
+ /**
+ * only_new_results - Request driver to report only new results
+ *
+ * This is used to request the driver to report only BSSes that have
+ * been detected after this scan request has been started, i.e., to
+ * flush old cached BSS entries.
+ */
+ int only_new_results;
};
/**
params->filter_ssids = NULL;
drv->num_filter_ssids = params->num_filter_ssids;
+ if (params->only_new_results) {
+ wpa_printf(MSG_DEBUG, "nl80211: Add NL80211_SCAN_FLAG_FLUSH");
+ NLA_PUT_U32(msg, NL80211_ATTR_SCAN_FLAGS,
+ NL80211_SCAN_FLAG_FLUSH);
+ }
+
return msg;
fail:
{
struct wpa_bss *bss, *n;
+ wpa_s->clear_driver_scan_cache = 1;
+
if (wpa_s->bss.next == NULL)
return; /* BSS table not yet initialized */
wpa_s->manual_scan_passive = 0;
wpa_s->manual_scan_use_id = 0;
+ wpa_s->manual_scan_only_new = 0;
if (params) {
if (os_strncasecmp(params, "TYPE=ONLY", 9) == 0)
pos = os_strstr(params, "use_id=");
if (pos)
wpa_s->manual_scan_use_id = atoi(pos + 7);
+
+ pos = os_strstr(params, "only_new=1");
+ if (pos)
+ wpa_s->manual_scan_only_new = 1;
} else {
os_free(wpa_s->manual_scan_freqs);
wpa_s->manual_scan_freqs = NULL;
wpa_supplicant_notify_scanning(wpa_s, 1);
+ if (wpa_s->clear_driver_scan_cache)
+ params->only_new_results = 1;
ret = wpa_drv_scan(wpa_s, params);
if (ret) {
wpa_supplicant_notify_scanning(wpa_s, 0);
wpa_s->scan_runs++;
wpa_s->normal_scans++;
wpa_s->own_scan_requested = 1;
+ params->only_new_results = 0;
}
return ret;
wpa_supplicant_optimize_freqs(wpa_s, ¶ms);
extra_ie = wpa_supplicant_extra_ies(wpa_s);
+ if (wpa_s->last_scan_req == MANUAL_SCAN_REQ &&
+ wpa_s->manual_scan_only_new)
+ params.only_new_results = 1;
+
if (wpa_s->last_scan_req == MANUAL_SCAN_REQ && params.freqs == NULL &&
wpa_s->manual_scan_freqs) {
wpa_dbg(wpa_s, MSG_DEBUG, "Limit manual scan to specified channels");
int *manual_scan_freqs;
unsigned int manual_scan_passive:1;
unsigned int manual_scan_use_id:1;
+ unsigned int manual_scan_only_new:1;
unsigned int own_scan_requested:1;
unsigned int own_scan_running:1;
unsigned int external_scan_running:1;
+ unsigned int clear_driver_scan_cache:1;
unsigned int manual_scan_id;
int scan_interval; /* time in sec between scans to find suitable AP */
int normal_scans; /* normal scans run before sched_scan */