-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
Describe the bug
This issue reports a lack of robustness in the airoc_mgmt_connect function when a user attempts to connect using a Pre-Shared Key (PSK) but provides an explicit security type of WIFI_SECURITY_TYPE_NONE.
-
Problematic Behavior: When
WIFI_SECURITY_TYPE_NONEis provided with a PSK, the driver correctly attempts to scan for the Access Point (AP) to automatically determine the correct, specific security protocol (e.g., WPA2/WPA3). -
Logic Flaw: If this background scan fails or does not find the AP, the driver previously failed the entire connection attempt.
-
Impact: The driver failed to fall back to the security parameters originally provided by the user (the PSK and
WIFI_SECURITY_TYPE_NONE, which often implies the security is PSK-based and relies on the provided key). This results in an unnecessary connection failure due to a transient scan issue, even though the necessary credentials were provided.
Area: Drivers, Wi-Fi, AIROC, Network Management
Regression
- This is a regression.
Steps to reproduce
The bug is a logic error related to error handling after a security-type resolution attempt.
Write:
Configure an application to use the AIROC Wi-Fi driver.
Attempt a connection using
airoc_mgmt_connectwhere:
- A valid PSK is provided.
- The security type is explicitly set to
WIFI_SECURITY_TYPE_NONE.
Manually induce a scan failure (e.g., by temporarily disabling the AP or introducing interference) during the driver's internal security type resolution phase.
The original code logic would return an error, failing the connection attempt, instead of proceeding to connect using the provided PSK. The fix ensures that if the resolved security remains
WHD_SECURITY_UNKNOWN, the driver uses the user-provided parameters.
Relevant log output
Impact
Not sure
Environment
-
OS: Windows WSL
-
Toolchain: Zephyr SDK
-
Driver: AIROC Wi-Fi Management Driver
Additional Context
Fix Proposal is presented in the following PR: #98731