Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
[nrf noup] zephyr: Fix reason code for locally generated disconnection
Browse files Browse the repository at this point in the history
fixup! [nrf noup] zephyr: Implement connect and disconnect events to Zephyr

In case a use issues a disconnect for some reason, it will still send
IEEE 802.11 reason code 3, which will show up as a Failure (non-zero
status) in Zephyr, this should only be applicable if AP sends
de-authentication with reason code as "3".

Fix locally generated case to return success (the enum should also be
renamed from "unspecified" to "local", but that will be handled in
another PR).

Fixes SHEL-2561.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
  • Loading branch information
krish2718 committed Mar 5, 2024
1 parent 1bdd1e9 commit dda5457
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wpa_supplicant/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -3599,7 +3599,7 @@ static void wpa_supplicant_event_disassoc(struct wpa_supplicant *wpa_s,
MAC2STR(bssid), reason_code,
locally_generated ? " locally_generated=1" : "");
#ifdef CONFIG_ZEPHYR
send_wifi_mgmt_disc_event(wpa_s, reason_code);
send_wifi_mgmt_disc_event(wpa_s, locally_generated ? 0 : reason_code);
#endif /* CONFIG_ZEPHYR */
}
}
Expand Down

0 comments on commit dda5457

Please sign in to comment.