Lines Matching full:scan

24 #include "scan.h"
168 "end of scan list - go back to beginning"); in wpa_supplicant_assoc_try()
207 "Failed to assign random MAC address for a scan"); in wpas_trigger_scan_cb()
218 "Request driver to clear scan cache due to local BSS flush"); in wpas_trigger_scan_cb()
223 * Store the obtained vendor scan cookie (if any) in wpa_s context. in wpas_trigger_scan_cb()
224 * The current design is to allow only one scan request on each in wpas_trigger_scan_cb()
225 * interface, hence having this scan cookie stored in wpa_s context is in wpas_trigger_scan_cb()
228 * Revisit this logic if concurrent scan operations per interface in wpas_trigger_scan_cb()
256 /* Restore scan_req since we will try to scan again */ in wpas_trigger_scan_cb()
282 * wpa_supplicant_trigger_scan - Request driver to start a scan
284 * @params: Scan parameters
290 * @next: Whether or not to perform this scan as the next radio work
301 wpa_dbg(wpa_s, MSG_INFO, "Reject scan trigger since one is already pending"); in wpa_supplicant_trigger_scan()
327 wpa_printf(MSG_DEBUG, "First scan after crossing 6 GHz domain"); in wpa_supplicant_trigger_scan()
332 radio_add_work(wpa_s, 0, "scan", next, wpas_trigger_scan_cb, in wpa_supplicant_trigger_scan()
350 wpa_dbg(wpa_s, MSG_DEBUG, "Starting delayed sched scan"); in wpa_supplicant_delayed_sched_scan_timeout()
362 wpa_dbg(wpa_s, MSG_DEBUG, "Sched scan timeout - stopping it"); in wpa_supplicant_sched_scan_timeout()
440 /* Optimize provisioning state scan based on GO information */ in wpa_supplicant_optimize_freqs()
443 wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Scan only GO " in wpa_supplicant_optimize_freqs()
451 wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Scan only common " in wpa_supplicant_optimize_freqs()
465 * Perform a single-channel scan if the GO has already been in wpa_supplicant_optimize_freqs()
466 * discovered on another non-P2P interface. Note that a scan in wpa_supplicant_optimize_freqs()
468 * should already have sufficient IEs and scan results will be in wpa_supplicant_optimize_freqs()
487 "P2P: Scan only the known GO frequency %d MHz during invitation", in wpa_supplicant_optimize_freqs()
495 * Optimize scan based on GO information during persistent in wpa_supplicant_optimize_freqs()
505 "P2P: Scan only GO preferred band %d GHz during invitation", in wpa_supplicant_optimize_freqs()
523 "P2P: Scan only GO preferred frequency %d MHz during invitation", in wpa_supplicant_optimize_freqs()
536 * sure we do not get stuck in special invitation scan in wpa_supplicant_optimize_freqs()
549 * Optimize post-provisioning scan based on channel used in wpa_supplicant_optimize_freqs()
552 wpa_dbg(wpa_s, MSG_DEBUG, "WPS: Scan only frequency %u MHz " in wpa_supplicant_optimize_freqs()
563 /* Optimize provisioning scan based on already known channel */ in wpa_supplicant_optimize_freqs()
564 wpa_dbg(wpa_s, MSG_DEBUG, "WPS: Scan only frequency %u MHz", in wpa_supplicant_optimize_freqs()
607 * parameter of the MLME-SCAN.request primitive represented in units of in wpas_fils_req_param_add_max_channel()
739 wpa_printf(MSG_DEBUG, "MLD: Scan including only ML element"); in wpa_supplicant_extra_ies()
930 wpa_printf(MSG_DEBUG, "Over max scan SSIDs for manual request"); in wpa_add_scan_ssid()
934 wpa_printf(MSG_DEBUG, "Scan SSID (manual request): %s", in wpa_add_scan_ssid()
1006 * for adding the wildcard scan entry. in wpa_set_scan_ssids()
1040 wpa_printf(MSG_DEBUG, "Over max scan SSIDs from scan req: %u", in wpa_set_ssids_from_scan_req()
1073 wpa_dbg(wpa_s, MSG_DEBUG, "Skip scan - interface disabled"); in wpa_supplicant_scan()
1078 wpa_dbg(wpa_s, MSG_DEBUG, "Disconnected - do not scan"); in wpa_supplicant_scan()
1086 * the incoming scan request. in wpa_supplicant_scan()
1088 wpa_dbg(wpa_s, MSG_DEBUG, "Already scanning - Reschedule the incoming scan req"); in wpa_supplicant_scan()
1095 wpa_dbg(wpa_s, MSG_DEBUG, "No enabled networks - do not scan"); in wpa_supplicant_scan()
1127 wpa_dbg(wpa_s, MSG_DEBUG, "Delay station mode scan while P2P operation is in progress"); in wpa_supplicant_scan()
1133 * Don't cancel the scan based on ongoing PNO; defer it. Some scans are in wpa_supplicant_scan()
1135 * auto-reconnect, etc). Discarding the scan might hurt these processes. in wpa_supplicant_scan()
1137 * starting PNO, so the periodic 100 ms attempts to run the scan do not in wpa_supplicant_scan()
1142 wpa_dbg(wpa_s, MSG_DEBUG, "Defer scan - PNO is in progress"); in wpa_supplicant_scan()
1162 "without scan step"); in wpa_supplicant_scan()
1180 goto scan; in wpa_supplicant_scan()
1185 wpa_printf(MSG_DEBUG, "Use specific SSIDs from SCAN command"); in wpa_supplicant_scan()
1192 …wpa_printf(MSG_DEBUG, "P2P: Use specific SSID for scan during P2P group formation (p2p_in_provisio… in wpa_supplicant_scan()
1200 " (peer interface address) for scan", in wpa_supplicant_scan()
1207 wpa_printf(MSG_DEBUG, "P2P: Use specific SSID for scan during invitation"); in wpa_supplicant_scan()
1215 MACSTR " for scan", in wpa_supplicant_scan()
1219 wpa_printf(MSG_DEBUG, "P2P: No specific SSID known for scan during invitation"); in wpa_supplicant_scan()
1248 * User-initiated scan request in ap_scan == 2; scan with in wpa_supplicant_scan()
1254 * Perform single-channel single-SSID scan for in wpa_supplicant_scan()
1259 wpa_hexdump_ascii(MSG_DEBUG, "Scan SSID", in wpa_supplicant_scan()
1276 * Reset the reattach flag so that we fall back to full scan if in wpa_supplicant_scan()
1277 * this scan fails. in wpa_supplicant_scan()
1288 wpa_hexdump_ascii(MSG_DEBUG, "Scan SSID", in wpa_supplicant_scan()
1344 * waiting a long time for a wildcard scan. in wpa_supplicant_scan()
1350 wpa_dbg(wpa_s, MSG_DEBUG, "Starting AP scan for " in wpa_supplicant_scan()
1356 "Starting AP scan for specific SSID: %s", in wpa_supplicant_scan()
1364 "the scan request"); in wpa_supplicant_scan()
1368 wpa_dbg(wpa_s, MSG_DEBUG, "Use passive scan based on manual request"); in wpa_supplicant_scan()
1371 "Use passive scan based on configuration"); in wpa_supplicant_scan()
1375 wpa_dbg(wpa_s, MSG_DEBUG, "Starting AP scan for wildcard " in wpa_supplicant_scan()
1386 "Request driver to clear scan cache due to manual only_new=1 scan"); in wpa_supplicant_scan()
1392 wpa_dbg(wpa_s, MSG_DEBUG, "Limit manual scan to specified channels"); in wpa_supplicant_scan()
1399 "Limit select_network scan to specified channels"); in wpa_supplicant_scan()
1405 wpa_dbg(wpa_s, MSG_DEBUG, "Optimize scan based on previously " in wpa_supplicant_scan()
1413 /* See if user specified frequencies. If so, scan only those. */ in wpa_supplicant_scan()
1417 "Optimize scan based on conf->initial_freq_list"); in wpa_supplicant_scan()
1421 "Optimize scan based on conf->freq_list"); in wpa_supplicant_scan()
1434 wpa_dbg(wpa_s, MSG_DEBUG, "Scan only the " in wpa_supplicant_scan()
1482 "Scan a previously specified BSSID " MACSTR in wpa_supplicant_scan()
1488 "Scan a previously specified BSSID " MACSTR, in wpa_supplicant_scan()
1506 scan: in wpa_supplicant_scan()
1511 * is operating there may not be need to scan other channels apart from in wpa_supplicant_scan()
1535 …wpa_dbg(wpa_s, MSG_DEBUG, "Scan only the current operating channels since all channels are already… in wpa_supplicant_scan()
1563 wpa_msg(wpa_s, MSG_WARNING, "Failed to initiate AP scan"); in wpa_supplicant_scan()
1567 /* Restore scan_req since we will try to scan again */ in wpa_supplicant_scan()
1610 * wpa_supplicant_req_scan - Schedule a scan for neighboring access points
1612 * @sec: Number of seconds after which to scan
1613 * @usec: Number of microseconds after which to scan
1615 * This function is used to schedule a scan for neighboring access points after
1624 "Ignore scan request (%d.%06d sec) on p2p_mgmt interface", in wpa_supplicant_req_scan()
1632 wpa_dbg(wpa_s, MSG_DEBUG, "Rescheduling scan request: %d.%06d sec", in wpa_supplicant_req_scan()
1635 …wpa_dbg(wpa_s, MSG_DEBUG, "Ignore new scan request for %d.%06d sec since an earlier request is sch… in wpa_supplicant_req_scan()
1638 wpa_dbg(wpa_s, MSG_DEBUG, "Setting scan request: %d.%06d sec", in wpa_supplicant_req_scan()
1646 * wpa_supplicant_delayed_sched_scan - Request a delayed scheduled scan
1648 * @sec: Number of seconds after which to scan
1649 * @usec: Number of microseconds after which to scan
1690 * wpa_supplicant_req_sched_scan - Start a periodic scheduled scan
1695 * access points repeating the scan continuously.
1740 * Normal scan is more reliable and faster for WPS in wpa_supplicant_req_sched_scan()
1745 wpa_dbg(wpa_s, MSG_DEBUG, "Use normal scan instead of " in wpa_supplicant_req_sched_scan()
1758 * When normal scan can speed up operations, use that for the in wpa_supplicant_req_sched_scan()
1760 * user space sleep more. We do this only if the normal scan in wpa_supplicant_req_sched_scan()
1764 wpa_dbg(wpa_s, MSG_DEBUG, "Use normal scan instead of " in wpa_supplicant_req_sched_scan()
1783 goto scan; in wpa_supplicant_req_sched_scan()
1837 "add to active scan ssid: %s", in wpa_supplicant_req_sched_scan()
1874 /* See if user specified frequencies. If so, scan only those. */ in wpa_supplicant_req_sched_scan()
1877 "Optimize scan based on conf->freq_list"); in wpa_supplicant_req_sched_scan()
1888 scan: in wpa_supplicant_req_sched_scan()
1892 * We cannot support multiple scan plans if the scan request includes in wpa_supplicant_req_sched_scan()
1893 * too many SSID's, so in this case use only the last scan plan and make in wpa_supplicant_req_sched_scan()
1915 "Scan interval too long(%u), use the maximum allowed(%u)", in wpa_supplicant_req_sched_scan()
1931 "Starting sched scan after %u seconds: interval %u timeout %d", in wpa_supplicant_req_sched_scan()
1937 "Starting sched scan after %u seconds (no timeout)", in wpa_supplicant_req_sched_scan()
1955 wpa_msg(wpa_s, MSG_WARNING, "Failed to initiate sched scan"); in wpa_supplicant_req_sched_scan()
1961 /* If we have more SSIDs to scan, add a timeout so we scan them too */ in wpa_supplicant_req_sched_scan()
1988 * wpa_supplicant_cancel_scan - Cancel a scheduled scan request
1991 * This function is used to cancel a scan request scheduled with
1996 wpa_dbg(wpa_s, MSG_DEBUG, "Cancelling scan request"); in wpa_supplicant_cancel_scan()
2002 * wpa_supplicant_cancel_delayed_sched_scan - Stop a delayed scheduled scan
2005 * This function is used to stop a delayed scheduled scan.
2012 wpa_dbg(wpa_s, MSG_DEBUG, "Cancelling delayed sched scan"); in wpa_supplicant_cancel_delayed_sched_scan()
2022 * This function is used to stop a periodic scheduled scan.
2032 wpa_dbg(wpa_s, MSG_DEBUG, "Cancelling sched scan"); in wpa_supplicant_cancel_sched_scan()
2039 * wpa_supplicant_notify_scanning - Indicate possible scan state change
2044 * there may have been a change in scanning (scan started, completed, stopped).
2081 * wpa_scan_get_ie - Fetch a specified information element from a scan result
2082 * @res: Scan result entry
2086 * This function returns the first matching information element in the scan
2114 * wpa_scan_get_vendor_ie - Fetch vendor information element from a scan result
2115 * @res: Scan result entry
2119 * This function returns the first matching information element in the scan
2141 * wpa_scan_get_vendor_ie_beacon - Fetch vendor information from a scan result
2142 * @res: Scan result entry
2146 * This function returns the first matching information element in the scan
2176 * wpa_scan_get_vendor_ie_multi - Fetch vendor IE data from a scan result
2177 * @res: Scan result entry
2182 * specific information elements in the scan result. The caller is responsible
2373 /* Compare function for sorting scan results. Return >0 if @b is considered
2407 * The scan result estimates SNR over 20 MHz, while Data frames in wpa_scan_result_compar()
2484 /* Compare function for sorting scan results when searching a WPS AP for
2539 wpa_printf(MSG_EXCESSIVE, "Sorted scan results"); in dump_scan_res()
2592 * This function is used to filter out specific BSSIDs from scan reslts mainly
2631 wpa_printf(MSG_DEBUG, "Filtered out %d scan results", in filter_scan_res()
3171 * wpa_supplicant_get_scan_results - Get scan results
3174 * @new_scan: Whether a new scan was performed
3176 * Returns: Scan results, %NULL on failure
3178 * This function request the current scan results from the driver and updates
3193 wpa_dbg(wpa_s, MSG_DEBUG, "Failed to get scan results"); in wpa_supplicant_get_scan_results()
3214 wpa_dbg(wpa_s, MSG_DEBUG, "WPS: Order scan results with WPS " in wpa_supplicant_get_scan_results()
3227 /* FLUSH command aborted an ongoing scan and these are the in wpa_supplicant_get_scan_results()
3228 * results from the aborted scan. Do not process the results to in wpa_supplicant_get_scan_results()
3231 "Do not update BSS table based on pending post-FLUSH scan results"); in wpa_supplicant_get_scan_results()
3247 * wpa_supplicant_update_scan_results - Update scan results from the driver
3253 * currently available scan results from the driver without requesting a new
3254 * scan. This is used in cases where the driver indicates an association
3273 * scan_only_handler - Reports scan results
3278 wpa_dbg(wpa_s, MSG_DEBUG, "Scan-only results received"); in scan_only_handler()
3459 "ongoing sched scan"); in wpas_start_pno()
3468 "Schedule PNO after previous sched scan has stopped"); in wpas_start_pno()
3546 /* Set one scan plan that will run infinitely */ in wpas_start_pno()
3560 wpa_dbg(wpa_s, MSG_DEBUG, "Limit sched scan to specified channels"); in wpas_start_pno()
3632 "scan: MAC randomization type %u != supported=%u", in wpas_mac_addr_rand_scan_set()
3655 "scan: Invalid MAC randomization type=0x%x", in wpas_mac_addr_rand_scan_set()
3682 "scan: Invalid MAC randomization type=0x%x", in wpas_mac_addr_rand_scan_get_mask()
3699 (os_strcmp(work->type, "scan") != 0 && in wpas_abort_ongoing_scan()
3700 os_strcmp(work->type, "p2p-scan") != 0)) in wpas_abort_ongoing_scan()
3702 wpa_dbg(wpa_s, MSG_DEBUG, "Abort an ongoing scan"); in wpas_abort_ongoing_scan()
3706 wpa_dbg(wpa_s, MSG_DEBUG, "No ongoing scan/p2p-scan found to abort"); in wpas_abort_ongoing_scan()
3721 wpa_printf(MSG_DEBUG, "Clear sched scan plans"); in wpas_sched_scan_plans_set()
3744 "Invalid sched scan plan input: %s", token); in wpas_sched_scan_plans_set()
3750 "scan plan %u: Scan interval too long(%u), use the maximum allowed(%u)", in wpas_sched_scan_plans_set()
3764 "scan plan %u: Number of iterations cannot be zero", in wpas_sched_scan_plans_set()
3772 "scan plan %u: Too many iterations(%u), use the maximum allowed(%u)", in wpas_sched_scan_plans_set()
3780 "scan plan %u: interval=%u iterations=%u", in wpas_sched_scan_plans_set()
3785 wpa_printf(MSG_ERROR, "Invalid scan plans entry"); in wpas_sched_scan_plans_set()
3791 "All scan plans but the last must specify a number of iterations"); in wpas_sched_scan_plans_set()
3795 wpa_printf(MSG_DEBUG, "scan plan %u (last plan): interval=%u", in wpas_sched_scan_plans_set()
3800 "Too many scheduled scan plans (only %u supported)", in wpas_sched_scan_plans_set()
3803 "Use only the first %u scan plans, and the last one (in infinite loop)", in wpas_sched_scan_plans_set()
3818 wpa_printf(MSG_ERROR, "invalid scan plans list"); in wpas_sched_scan_plans_set()
3827 * This function is used to cancel a running scheduled scan and to reset an
3828 * internal scan state to continue with a regular scan on the following
3844 /* simulate timeout to restart the sched scan */ in wpas_scan_restart_sched_scan()