33
33
34
34
extern " C" {
35
35
#include < src/utils/common.h>
36
- #include < supp_events.h>
37
36
#include < wpa_supplicant/wpa_supplicant_i.h>
38
37
}
39
38
@@ -174,7 +173,6 @@ class WiFiManager
174
173
static constexpr uint32_t kConnectionRecoveryMaxIntervalMs = CONFIG_CHIP_WIFI_CONNECTION_RECOVERY_MAXIMUM_INTERVAL;
175
174
static constexpr uint32_t kConnectionRecoveryJitterMs = CONFIG_CHIP_WIFI_CONNECTION_RECOVERY_JITTER;
176
175
static constexpr uint32_t kConnectionRecoveryMaxRetries = CONFIG_CHIP_WIFI_CONNECTION_RECOVERY_MAX_RETRIES_NUMBER;
177
- static constexpr uint32_t kSupplicantReadyTimeoutMs = 500 ;
178
176
179
177
CHIP_ERROR Init ();
180
178
CHIP_ERROR Scan (const ByteSpan & ssid, ScanResultCallback resultCallback, ScanDoneCallback doneCallback,
@@ -202,13 +200,9 @@ class WiFiManager
202
200
203
201
constexpr static uint32_t kIPv6ManagementEvents = NET_EVENT_IPV6_ADDR_ADD | NET_EVENT_IPV6_ADDR_DEL;
204
202
205
- constexpr static uint32_t kSupplicantEvents = NET_EVENT_WPA_SUPP_READY | NET_EVENT_WPA_SUPP_CMD_NOT_READY |
206
- NET_EVENT_WPA_SUPP_IFACE_ADDED | NET_EVENT_WPA_SUPP_IFACE_REMOVED;
207
-
208
203
// Event handling
209
204
static void WifiMgmtEventHandler (net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface);
210
205
static void IPv6MgmtEventHandler (net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface);
211
- static void WiFiSupplicantEventHandler (net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface);
212
206
static void ScanResultHandler (Platform::UniquePtr<uint8_t > data);
213
207
static void ScanDoneHandler (Platform::UniquePtr<uint8_t > data);
214
208
static void ConnectHandler (Platform::UniquePtr<uint8_t > data);
@@ -227,21 +221,16 @@ class WiFiManager
227
221
// To avoid frequent recovery attempts when the signal to an access point is poor quality
228
222
// The connection recovery interval will be cleared after the defined delay in kConnectionRecoveryDelayToReset.
229
223
static void Recover (System::Layer * layer, void * param);
230
- static void SupplicantInitTimeout (System::Layer * layer, void * param);
231
224
void ResetRecoveryTime ();
232
225
System::Clock::Milliseconds32 CalculateNextRecoveryTime ();
233
226
234
- bool mSupplicantReady { false };
235
- bool mInterfaceUp { false };
236
- bool mSupplicantInitTimeoutElapsed { false };
237
227
net_if * mNetIf { nullptr };
238
228
ConnectionParams mWiFiParams {};
239
229
ConnectionHandling mHandling ;
240
230
wifi_iface_state mWiFiState ;
241
231
wifi_iface_state mCachedWiFiState ;
242
232
net_mgmt_event_callback mWiFiMgmtClbk {};
243
233
net_mgmt_event_callback mIPv6MgmtClbk {};
244
- net_mgmt_event_callback mSuppMgmtClbk {};
245
234
ScanResultCallback mScanResultCallback { nullptr };
246
235
ScanDoneCallback mScanDoneCallback { nullptr };
247
236
WiFiNetwork mWantedNetwork {};
0 commit comments