Skip to content

Commit e658f51

Browse files
krish2718rlubos
authored andcommitted
[nrf fromtree] net: wifi: Fix the Wi-Fi state check
Once Wi-Fi is associated few parameters like listen interval and power-save mode cannot be changed. The state for association is "ASSOCIATED" and not completed. Even after state transitions to COMPLETE, it can still go back to other states, e.g., PTK/GTK renewal. Fix the state check. Signed-off-by: Chaitanya Tata <[email protected]> (cherry picked from commit 159617c)
1 parent 09eb172 commit e658f51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/l2/wifi/wifi_mgmt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ static int wifi_set_power_save(uint32_t mgmt_request, struct net_if *iface,
504504
return -EIO;
505505
}
506506

507-
if (info.state == WIFI_STATE_COMPLETED) {
507+
if (info.state >= WIFI_STATE_ASSOCIATED) {
508508
ps_params->fail_reason =
509509
WIFI_PS_PARAM_FAIL_DEVICE_CONNECTED;
510510
return -ENOTSUP;

0 commit comments

Comments
 (0)