Skip to content

AIROC Wi-Fi: Connection failure when scan fails to resolve security type for PSK connections #98955

@kaabia

Description

@kaabia

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_NONE is 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:

  1. Configure an application to use the AIROC Wi-Fi driver.

  2. Attempt a connection using airoc_mgmt_connect where:

  • A valid PSK is provided.
  • The security type is explicitly set to WIFI_SECURITY_TYPE_NONE.
  1. Manually induce a scan failure (e.g., by temporarily disabling the AP or introducing interference) during the driver's internal security type resolution phase.

  2. 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

Metadata

Metadata

Labels

area: Wi-FiWi-FibugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions