[PATCH] wpa_supplicant: cancel sched scan on all interfaces

Arend van Spriel arend
Tue Nov 5 01:37:09 PST 2013

On 11/05/2013 09:33 AM, Jouni Malinen wrote:
> On Sun, Nov 03, 2013 at 03:22:01PM +0200, Ilan Peer wrote:
>> From: David Spinadel <david.spinadel at intel.com>
>> Cancel sched scan on all interfaces (that share the same radio)
>> to enable scanning on one interfaces when there is a scheduled
>> scan on another interface.
> Could you please clarify why this is needed and why is
> wpa_supplicant_cancel_sched_scan() the correct place to do this? Is this
> to address constraints in a specific driver or is this type of
> constraint on the sched_scan operation defined somewhere? Does
> sched_scan even work properly if issued concurrently on multiple
> interfaces sharing the same radio?

"Our" scheduled scan can only be started when there is no normal scan 
active (regardless the interface). Once it is started a normal scan can 
be issued concurrently. The scheduled scan API does not have much 
constraints although it does describe the scenario where scheduled scan 
is stopped due to a normal scan request. So leave it to the driver to 
decide (Pasted nl80211.h content for reference) instead of wpa_s.

  * @NL80211_CMD_START_SCHED_SCAN: start a scheduled scan at certain
  *	intervals, as specified by %NL80211_ATTR_SCHED_SCAN_INTERVAL.
  *	Like with normal scans, if SSIDs (%NL80211_ATTR_SCAN_SSIDS)
  *	are passed, they are used in the probe requests.  For
  *	broadcast, a broadcast SSID must be passed (ie. an empty
  *	string).  If no SSID is passed, no probe requests are sent and
  *	a passive scan is performed.  %NL80211_ATTR_SCAN_FREQUENCIES,
  *	if passed, define which channels should be scanned; if not
  *	passed, all channels allowed for the current regulatory domain
  *	are used.  Extra IEs can also be passed from the userspace by
  *	using the %NL80211_ATTR_IE attribute.
  * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan.  Returns -ENOENT
  *	if scheduled scan is not running.
  * @NL80211_CMD_SCHED_SCAN_RESULTS: indicates that there are scheduled scan
  *	results available.
  * @NL80211_CMD_SCHED_SCAN_STOPPED: indicates that the scheduled scan has
  *	stopped.  The driver may issue this event at any time during a
  *	scheduled scan.  One reason for stopping the scan is if the hardware
  *	does not support starting an association or a normal scan while running
  *	a scheduled scan.  This event is also sent when the
  *	%NL80211_CMD_STOP_SCHED_SCAN command is received or when the interface
  *	is brought down while a scheduled scan was running.

More information about the Hostap mailing list