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

Control interface improvements #150

Merged
merged 5 commits into from
Feb 7, 2024

Conversation

krish2718
Copy link
Collaborator

@krish2718 krish2718 commented Jan 25, 2024

To handle OOM conditions in a SnS test (Stress and Stability) after few hours.

fixup!fixup! [nrf noup] zephyr: Add support for WPA CLI zephyr

In case of failure from control interface, check and propagate the error to the caller.

Signed-off-by: Chaitanya Tata <[email protected]>
@krish2718 krish2718 marked this pull request as draft January 25, 2024 20:38
@krish2718 krish2718 marked this pull request as ready for review January 31, 2024 18:55
This reverts commit a42ccc3.

Closing socket on EoF is a proper behaviour, else we keep getting zero
byte receives which are useless. The socket is now unusable.

Signed-off-by: Chaitanya Tata <[email protected]>
fixup! [nrf noup] zephyr: Add support for global control interface

The below fixes from non-global control interface are ported:

1. Dummy receive in case of memory allocation failures
2. Identify EoF and close the socket.

Signed-off-by: Chaitanya Tata <[email protected]>
@krish2718 krish2718 requested a review from jukkar February 2, 2024 11:15
wpa_supplicant/ctrl_iface.c Outdated Show resolved Hide resolved
Relying on heap during OOM is bad, esp. for critical module like WPA
supplicant, this can break the Wi-Fi.

As the WPA supplicant stack is large enough and we have reduced the
control interface sizes, move the buffers for control interface to
stack or use static variable.

The static variable is used to keep the changes to the common code of
the WPA supplicant to a minimum compared to using stack.

Fixes SHEL-2283.

Signed-off-by: Chaitanya Tata <[email protected]>
This can be same as non-global control interface, for interface command
the output is limited to 1024.

Signed-off-by: Chaitanya Tata <[email protected]>
@krish2718 krish2718 requested a review from jukkar February 6, 2024 08:04
@krish2718 krish2718 merged commit ecebc52 into nrfconnect:main Feb 7, 2024
1 check passed
@krish2718 krish2718 deleted the ctrl_iface_improvs branch February 7, 2024 08:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants