Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/platform/nrfconnect/wifi/WiFiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,15 @@ const Map<wifi_iface_state, WiFiManager::StationStatus, 10>
{ WIFI_STATE_GROUP_HANDSHAKE, WiFiManager::StationStatus::PROVISIONING },
{ WIFI_STATE_COMPLETED, WiFiManager::StationStatus::FULLY_PROVISIONED } });

const Map<uint32_t, WiFiManager::NetEventHandler, 5> WiFiManager::sEventHandlerMap({
const Map<uint64_t, WiFiManager::NetEventHandler, 5> WiFiManager::sEventHandlerMap({
{ NET_EVENT_WIFI_SCAN_RESULT, WiFiManager::ScanResultHandler },
{ NET_EVENT_WIFI_SCAN_DONE, WiFiManager::ScanDoneHandler },
{ NET_EVENT_WIFI_CONNECT_RESULT, WiFiManager::ConnectHandler },
{ NET_EVENT_WIFI_DISCONNECT_RESULT, WiFiManager::DisconnectHandler },
{ NET_EVENT_WIFI_DISCONNECT_COMPLETE, WiFiManager::DisconnectHandler },
});

void WiFiManager::WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface)
void WiFiManager::WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint64_t mgmtEvent, net_if * iface)
{
if (iface == Instance().mNetIf)
{
Expand All @@ -171,15 +171,15 @@ void WiFiManager::WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mg
}
}

void WiFiManager::IPv6MgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface)
void WiFiManager::IPv6MgmtEventHandler(net_mgmt_event_callback * cb, uint64_t mgmtEvent, net_if * iface)
{
if (((mgmtEvent == NET_EVENT_IPV6_ADDR_ADD) || (mgmtEvent == NET_EVENT_IPV6_ADDR_DEL)) && cb->info)
{
IPv6AddressChangeHandler(cb->info);
}
}

void WiFiManager::SuppEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface)
void WiFiManager::SuppEventHandler(net_mgmt_event_callback * cb, uint64_t mgmtEvent, net_if * iface)
{
if (mgmtEvent == NET_EVENT_SUPPLICANT_NOT_READY)
{
Expand Down
14 changes: 7 additions & 7 deletions src/platform/nrfconnect/wifi/WiFiManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,17 @@ class WiFiManager
int8_t mRssi{ std::numeric_limits<int8_t>::min() };
};

constexpr static uint32_t kWifiManagementEvents = NET_EVENT_WIFI_SCAN_RESULT | NET_EVENT_WIFI_SCAN_DONE |
constexpr static uint64_t kWifiManagementEvents = NET_EVENT_WIFI_SCAN_RESULT | NET_EVENT_WIFI_SCAN_DONE |
NET_EVENT_WIFI_CONNECT_RESULT | NET_EVENT_WIFI_DISCONNECT_RESULT | NET_EVENT_WIFI_IFACE_STATUS;

constexpr static uint32_t kIPv6ManagementEvents = NET_EVENT_IPV6_ADDR_ADD | NET_EVENT_IPV6_ADDR_DEL;
constexpr static uint64_t kIPv6ManagementEvents = NET_EVENT_IPV6_ADDR_ADD | NET_EVENT_IPV6_ADDR_DEL;

constexpr static uint32_t kSupplicantEvents = NET_EVENT_SUPPLICANT_READY | NET_EVENT_SUPPLICANT_NOT_READY;
constexpr static uint64_t kSupplicantEvents = NET_EVENT_SUPPLICANT_READY | NET_EVENT_SUPPLICANT_NOT_READY;

// Event handling
static void WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface);
static void IPv6MgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface);
static void SuppEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface);
static void WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint64_t mgmtEvent, net_if * iface);
static void IPv6MgmtEventHandler(net_mgmt_event_callback * cb, uint64_t mgmtEvent, net_if * iface);
static void SuppEventHandler(net_mgmt_event_callback * cb, uint64_t mgmtEvent, net_if * iface);
static void ScanResultHandler(Platform::UniquePtr<uint8_t> data, size_t length);
static void ScanDoneHandler(Platform::UniquePtr<uint8_t> data, size_t length);
static void ConnectHandler(Platform::UniquePtr<uint8_t> data, size_t length);
Expand Down Expand Up @@ -259,7 +259,7 @@ class WiFiManager
bool mWiFiPsEnabled{ true };

static const Map<wifi_iface_state, StationStatus, 10> sStatusMap;
static const Map<uint32_t, NetEventHandler, 5> sEventHandlerMap;
static const Map<uint64_t, NetEventHandler, 5> sEventHandlerMap;
};

} // namespace DeviceLayer
Expand Down
Loading