21
21
#include < cmsis_os2.h>
22
22
#include < lib/support/BitFlags.h>
23
23
#include < lib/support/Span.h>
24
+ #include < platform/silabs/wifi/WifiStateProvider.h>
25
+ #include < platform/silabs/wifi/icd/PowerSaveInterface.h>
24
26
#include < platform/silabs/wifi/wfx_msgs.h>
25
27
#include < sl_cmsis_os2_common.h>
26
28
#include < sl_status.h>
@@ -107,7 +109,7 @@ namespace Silabs {
107
109
* @brief Public Interface for the Wi-Fi platform APIs
108
110
*
109
111
*/
110
- class WifiInterface
112
+ class WifiInterface : public WifiStateProvider , public PowerSaveInterface
111
113
{
112
114
public:
113
115
enum class WifiEvent : uint8_t
@@ -247,30 +249,6 @@ class WifiInterface
247
249
*/
248
250
virtual void ConfigureStationMode () = 0;
249
251
250
- /* *
251
- * @brief Returns the state of the Wi-Fi connection
252
- *
253
- * @return true, if the Wi-Fi device is connected to an AP
254
- * false, otherwise
255
- */
256
- virtual bool IsStationConnected () = 0;
257
-
258
- /* *
259
- * @brief Returns the state of the Wi-Fi Station configuration of the Wi-Fi device
260
- *
261
- * @return true, if the Wi-Fi Station mode is enabled
262
- * false, otherwise
263
- */
264
- virtual bool IsStationModeEnabled () = 0;
265
-
266
- /* *
267
- * @brief Returns the state of the Wi-Fi station initialization
268
- *
269
- * @return true, if the initialization was successful
270
- * false, otherwise
271
- */
272
- virtual bool IsStationReady () = 0;
273
-
274
252
/* *
275
253
* @brief Triggers the device to disconnect from the connected Wi-Fi network
276
254
*
@@ -339,15 +317,6 @@ class WifiInterface
339
317
*/
340
318
virtual CHIP_ERROR GetWifiCredentials (WifiCredentials & credentials) = 0;
341
319
342
- /* *
343
- * @brief Returns the state of the Wi-Fi network provisionning
344
- * Does the device has Wi-Fi credentials or not
345
- *
346
- * @return true, the device has Wi-Fi credentials
347
- * false, otherwise
348
- */
349
- virtual bool IsWifiProvisioned () = 0;
350
-
351
320
/* *
352
321
* @brief Triggers a connection attempt the Access Point who's crendetials match the ones store with the SetWifiCredentials API.
353
322
* The function triggers an async connection attempt. The upper layers are notified trought a platform event if the
@@ -362,48 +331,6 @@ class WifiInterface
362
331
*/
363
332
virtual CHIP_ERROR ConnectToAccessPoint (void ) = 0;
364
333
365
- /* Function to update */
366
-
367
- // TODO: Harmonize the Power Save function inputs for all platforms
368
- #if CHIP_CONFIG_ENABLE_ICD_SERVER
369
- #if (SLI_SI91X_MCU_INTERFACE | EXP_BOARD)
370
- virtual CHIP_ERROR ConfigurePowerSave (rsi_power_save_profile_mode_t sl_si91x_ble_state,
371
- sl_si91x_performance_profile_t sl_si91x_wifi_state, uint32_t listenInterval) = 0;
372
- #else
373
- virtual CHIP_ERROR ConfigurePowerSave () = 0;
374
- #endif /* (SLI_SI91X_MCU_INTERFACE | EXP_BOARD) */
375
-
376
- /* *
377
- * @brief Configures the broadcast filter.
378
- *
379
- * @param[in] enableBroadcastFilter Boolean to enable or disable the broadcast filter.
380
- *
381
- * @return CHIP_ERROR CHIP_NO_ERROR, the counters were succesfully reset to 0.
382
- * CHIP_ERROR_INTERNAL, if there was an error when configuring the broadcast filter
383
- */
384
- virtual CHIP_ERROR ConfigureBroadcastFilter (bool enableBroadcastFilter) = 0;
385
- #endif // CHIP_CONFIG_ENABLE_ICD_SERVER
386
-
387
- #if CHIP_DEVICE_CONFIG_ENABLE_IPV4
388
- /* *
389
- * @brief Returns IP assignment status
390
- *
391
-
392
- * @return true, Wi-Fi station has an IPv4 address
393
- * false, otherwise
394
- */
395
- virtual bool HasAnIPv4Address () = 0;
396
- #endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */
397
-
398
- /* *
399
- * @brief Returns IP assignment status
400
- *
401
-
402
- * @return true, Wi-Fi station has an IPv6 address
403
- * false, otherwise
404
- */
405
- virtual bool HasAnIPv6Address () = 0;
406
-
407
334
/* *
408
335
* @brief Cancels the on-going network scan operation.
409
336
* If one isn't in-progress, function doesn't do anything
0 commit comments