Skip to content

Commit

Permalink
[chef] linux wpa fix (#25438)
Browse files Browse the repository at this point in the history
* fix: Wi-Fi init on linux target for chef

* chg: removed uncessary namespace scoping, restyle
  • Loading branch information
rochaferraz authored and pull[bot] committed Nov 22, 2023
1 parent 7fde595 commit f11baed
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion examples/chef/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,31 @@

#include <app-common/zap-generated/ids/Attributes.h>
#include <app/ConcreteAttributePath.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <lib/support/logging/CHIPLogging.h>
#include <platform/Linux/NetworkCommissioningDriver.h>

#include <lib/shell/Engine.h>

#include <ChipShellCollection.h>

using namespace chip;
using namespace chip::Shell;
using namespace chip::app;

void ApplicationInit() {}
#if CHIP_DEVICE_CONFIG_ENABLE_WPA
namespace {
DeviceLayer::NetworkCommissioning::LinuxWiFiDriver sLinuxWiFiDriver;
Clusters::NetworkCommissioning::Instance sWiFiNetworkCommissioningInstance(0, &sLinuxWiFiDriver);
} // namespace
#endif

void ApplicationInit()
{
#if CHIP_DEVICE_CONFIG_ENABLE_WPA
sWiFiNetworkCommissioningInstance.Init();
#endif
}

int main(int argc, char * argv[])
{
Expand Down

0 comments on commit f11baed

Please sign in to comment.