Skip to content

Commit

Permalink
[nrf noup] fix handling of LastNetworkID in Wi-Fi driver
Browse files Browse the repository at this point in the history
This commit makes sure that correct Network ID is provided to the
Network Commissioning cluster from the platform's Wi-Fi driver.

Signed-off-by: Łukasz Duda <[email protected]>
  • Loading branch information
LuDuda committed Mar 7, 2024
1 parent 2d33edf commit 7598bd5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/platform/nrfconnect/wifi/NrfWiFiDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ void NrfWiFiDriver::OnNetworkStatusChanged(Status status)

if (mpNetworkStatusChangeCallback)
{
mpNetworkStatusChangeCallback->OnNetworkingStatusChange(status, NullOptional, NullOptional);
WiFiManager::WiFiInfo wifiInfo;

if (CHIP_NO_ERROR == WiFiManager::Instance().GetWiFiInfo(wifiInfo))
{
mpNetworkStatusChangeCallback->OnNetworkingStatusChange(status,
MakeOptional(ByteSpan(wifiInfo.mSsid, wifiInfo.mSsidLen)), NullOptional);
}
}

if (mpConnectCallback)
Expand Down

0 comments on commit 7598bd5

Please sign in to comment.