]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - src/drivers/driver.h
Add scheduled scan driver operations
[thirdparty/hostap.git] / src / drivers / driver.h
index 76dbc9d621fbc41d62d3324a4b8c5bc397ab6d9d..189e3a62742a2160b211eac626966dcd4a2b2f12 100644 (file)
@@ -694,6 +694,8 @@ struct wpa_driver_capa {
        unsigned int flags;
 
        int max_scan_ssids;
+       int max_sched_scan_ssids;
+       int sched_scan_supported;
 
        /**
         * max_remain_on_chan - Maximum remain-on-channel duration in msec
@@ -2455,6 +2457,35 @@ struct wpa_driver_ops {
         * the station gets added by FT-over-DS.
         */
        int (*add_sta_node)(void *priv, const u8 *addr, u16 auth_alg);
+
+       /**
+        * sched_scan - Request the driver to initiate scheduled scan
+        * @priv: Private driver interface data
+        * @params: Scan parameters
+        * @interval: Interval between scan cycles in milliseconds
+        * Returns: 0 on success, -1 on failure
+        *
+        * This operation should be used for scheduled scan offload to
+        * the hardware. Every time scan results are available, the
+        * driver should report scan results event for wpa_supplicant
+        * which will eventually request the results with
+        * wpa_driver_get_scan_results2(). This operation is optional
+        * and if not provided or if it returns -1, we fall back to
+        * normal host-scheduled scans.
+        */
+       int (*sched_scan)(void *priv, struct wpa_driver_scan_params *params,
+                         u32 interval);
+
+       /**
+        * stop_sched_scan - Request the driver to stop a scheduled scan
+        * @priv: Private driver interface data
+        * Returns: 0 on success, -1 on failure
+        *
+        * This should cause the scheduled scan to be stopped and
+        * results should stop being sent. Must be supported if
+        * sched_scan is supported.
+        */
+       int (*stop_sched_scan)(void *priv);
 };
 
 
@@ -2867,7 +2898,12 @@ enum wpa_event_type {
         * completed Group Key Handshake while the host (including
         * wpa_supplicant was sleeping).
         */
-       EVENT_DRIVER_GTK_REKEY
+       EVENT_DRIVER_GTK_REKEY,
+
+       /**
+        * EVENT_SCHED_SCAN_STOPPED - Scheduled scan was stopped
+        */
+       EVENT_SCHED_SCAN_STOPPED
 };