Skip to content

Commit d975aaf

Browse files
authored
[NXP] Fix TC-CGEN-2.4 and TC-CGEN-2.2 issue due to unnecessary wifi connection during revert config (project-chip#42064)
Signed-off-by: Martin Girardot <[email protected]>
1 parent d345d51 commit d975aaf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ CHIP_ERROR NXPWiFiDriver::RevertConfiguration()
145145
/* Reset mStagingNetwork as it may have been updated during add/update network operation */
146146
mStagingNetwork = mSavedNetwork;
147147

148+
// succeed right away if we are already connected
149+
VerifyOrReturnError(!is_sta_connected(), CHIP_NO_ERROR);
150+
148151
// succeed right away if no saved network
149152
VerifyOrReturnError(mStagingNetwork.ssidLen > 0, CHIP_NO_ERROR);
150153
// Connect to saved network

0 commit comments

Comments
 (0)