@@ -117,6 +117,12 @@ enum net_request_wifi_cmd {
117117 /** Connect to APs stored using wifi_credentials library. */
118118 NET_REQUEST_WIFI_CMD_CONNECT_STORED ,
119119#endif
120+ /** Start roaming */
121+ NET_REQUEST_WIFI_CMD_START_ROAMING ,
122+ /** Neighbor report complete */
123+ NET_REQUEST_WIFI_CMD_NEIGHBOR_REP_COMPLETE ,
124+ /** Specific scan */
125+ NET_REQUEST_WIFI_CMD_CANDIDATE_SCAN ,
120126 /** @cond INTERNAL_HIDDEN */
121127 NET_REQUEST_WIFI_CMD_MAX
122128 /** @endcond */
@@ -282,6 +288,16 @@ NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_WPS_CONFIG);
282288NET_MGMT_DEFINE_REQUEST_HANDLER (NET_REQUEST_WIFI_CONNECT_STORED );
283289#endif
284290
291+ #define NET_REQUEST_WIFI_START_ROAMING \
292+ (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_START_ROAMING)
293+
294+ NET_MGMT_DEFINE_REQUEST_HANDLER (NET_REQUEST_WIFI_START_ROAMING );
295+
296+ #define NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE \
297+ (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_NEIGHBOR_REP_COMPLETE)
298+
299+ NET_MGMT_DEFINE_REQUEST_HANDLER (NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE );
300+
285301/** @brief Wi-Fi management events */
286302enum net_event_wifi_cmd {
287303 /** Scan results available */
@@ -304,6 +320,12 @@ enum net_event_wifi_cmd {
304320 NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT ,
305321 /** Disconnect complete */
306322 NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE ,
323+ /** Signal change event */
324+ NET_EVENT_WIFI_CMD_SIGNAL_CHANGE ,
325+ /** Neighbor Report */
326+ NET_EVENT_WIFI_CMD_NEIGHBOR_REP_RECEIVED ,
327+ /** Neighbor Report complete */
328+ NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE ,
307329 /** AP mode enable result */
308330 NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT ,
309331 /** AP mode disable result */
@@ -352,6 +374,14 @@ enum net_event_wifi_cmd {
352374#define NET_EVENT_WIFI_DISCONNECT_COMPLETE \
353375 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE)
354376
377+ /** Event signal change of connected AP */
378+ #define NET_EVENT_WIFI_SIGNAL_CHANGE \
379+ (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SIGNAL_CHANGE)
380+
381+ /** Event Neighbor Report Completed */
382+ #define NET_EVENT_WIFI_NEIGHBOR_REP_COMP \
383+ (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE)
384+
355385/** Event emitted for Wi-Fi access point enable result */
356386#define NET_EVENT_WIFI_AP_ENABLE_RESULT \
357387 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT)
@@ -1417,6 +1447,21 @@ struct wifi_mgmt_ops {
14171447 * @return 0 if ok, < 0 if error
14181448 */
14191449 int (* wps_config )(const struct device * dev , struct wifi_wps_config_params * params );
1450+ /** Trigger candidate scan
1451+ *
1452+ * @param dev Pointer to the device structure for the driver instance
1453+ * @param params Scan parameters
1454+ *
1455+ * @return 0 if ok, < 0 if error
1456+ */
1457+ int (* candidate_scan )(const struct device * dev , struct wifi_scan_params * params );
1458+ /** Start 11r roaming
1459+ *
1460+ * @param dev Pointer to the device structure for the driver instance
1461+ *
1462+ * @return 0 if ok, < 0 if error
1463+ */
1464+ int (* start_11r_roaming )(const struct device * dev );
14201465};
14211466
14221467/** Wi-Fi management offload API */
@@ -1508,6 +1553,17 @@ void wifi_mgmt_raise_raw_scan_result_event(struct net_if *iface,
15081553 */
15091554void wifi_mgmt_raise_disconnect_complete_event (struct net_if * iface , int status );
15101555
1556+ #ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_ROAMING
1557+ /** Wi-Fi management neighbor reports event
1558+ *
1559+ * @param iface Network interface
1560+ * @param inbuf Input buffer of neighbor reports
1561+ * @param buf_len Lenghth of input buffer
1562+ */
1563+ void wifi_mgmt_raise_neighbor_rep_recv_event (struct net_if * iface ,
1564+ char * inbuf , size_t buf_len );
1565+ #endif
1566+
15111567/** Wi-Fi management AP mode enable result event
15121568 *
15131569 * @param iface Network interface
0 commit comments