@@ -137,6 +137,8 @@ enum net_request_wifi_cmd {
137
137
NET_REQUEST_WIFI_CMD_AP_WPS_CONFIG ,
138
138
/** Configure BSS maximum idle period */
139
139
NET_REQUEST_WIFI_CMD_BSS_MAX_IDLE_PERIOD ,
140
+ /** Configure background scanning */
141
+ NET_REQUEST_WIFI_CMD_BGSCAN ,
140
142
/** @cond INTERNAL_HIDDEN */
141
143
NET_REQUEST_WIFI_CMD_MAX
142
144
/** @endcond */
@@ -332,6 +334,11 @@ NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE);
332
334
333
335
NET_MGMT_DEFINE_REQUEST_HANDLER (NET_REQUEST_WIFI_BSS_MAX_IDLE_PERIOD );
334
336
337
+ #define NET_REQUEST_WIFI_BGSCAN \
338
+ (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BGSCAN)
339
+
340
+ NET_MGMT_DEFINE_REQUEST_HANDLER (NET_REQUEST_WIFI_BGSCAN );
341
+
335
342
/** @cond INTERNAL_HIDDEN */
336
343
337
344
enum {
@@ -1393,6 +1400,30 @@ enum wifi_sap_iface_state {
1393
1400
WIFI_SAP_IFACE_ENABLED
1394
1401
};
1395
1402
1403
+ #if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT_BGSCAN ) || defined(__DOXYGEN__ )
1404
+ /** @brief Wi-Fi background scan implementation */
1405
+ enum wifi_bgscan_type {
1406
+ /** None, background scan is disabled */
1407
+ WIFI_BGSCAN_NONE = 0 ,
1408
+ /** Simple, periodic scan based on signal strength */
1409
+ WIFI_BGSCAN_SIMPLE ,
1410
+ /** Learn channels used by the network (experimental) */
1411
+ WIFI_BGSCAN_LEARN ,
1412
+ };
1413
+
1414
+ /** @brief Wi-Fi background scan parameters */
1415
+ struct wifi_bgscan_params {
1416
+ /** The type of background scanning */
1417
+ enum wifi_bgscan_type type ;
1418
+ /** Short scan interval in seconds */
1419
+ uint16_t short_interval ;
1420
+ /** Signal strength threshold in dBm */
1421
+ int8_t rssi_threshold ;
1422
+ /** Long scan interval in seconds */
1423
+ uint16_t long_interval ;
1424
+ };
1425
+ #endif
1426
+
1396
1427
/* Extended Capabilities */
1397
1428
enum wifi_ext_capab {
1398
1429
WIFI_EXT_CAPAB_20_40_COEX = 0 ,
@@ -1732,6 +1763,16 @@ struct wifi_mgmt_ops {
1732
1763
*/
1733
1764
int (* set_bss_max_idle_period )(const struct device * dev ,
1734
1765
unsigned short bss_max_idle_period );
1766
+ #if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT_BGSCAN ) || defined(__DOXYGEN__ )
1767
+ /** Configure background scanning
1768
+ *
1769
+ * @param dev Pointer to the device structure for the driver instance.
1770
+ * @param params Background scanning configuration parameters
1771
+ *
1772
+ * @return 0 if ok, < 0 if error
1773
+ */
1774
+ int (* set_bgscan )(const struct device * dev , struct wifi_bgscan_params * params );
1775
+ #endif
1735
1776
};
1736
1777
1737
1778
/** Wi-Fi management offload API */
0 commit comments