mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
wifi: wfx: fix error code on unsupported firmware
The 'secure link' feature is not supported by upstream (the reference code relies on mbedTLS to implement it, which is not an option for the Linux kernel). If the firmware enforce the 'secure link' feature, wfx_probe() exits early. However, err still holds the value returned by the previous call to wait_for_completion_timeout(), which is the number of jiffies left before the timeout, hence strictly positive (the zero case is handled just above). wfx_probe() therefore returns a positive value. The bus probe functions forward it as-is and the driver core negates it (see really_probe()). The device does not get bound, which is the expected outcome, but the reported error code is a meaningless negative jiffies count instead of an errno. Return -EOPNOTSUPP, as already done a few lines above when the firmware API version is not supported. Copilot reviewed the code and wrote some parts of the log. Reported-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Closes: https://lore.kernel.org/all/cc4de4e40e3ca50e7288be2b9067802576567c25.camel@siemens.com/ Assisted-by: Copilot:claude-opus-5 Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Link: https://patch.msgid.link/20260906204831.949692-3-jerome.pouiller@silabs.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
17402a8697
commit
a137e59948
1 changed files with 1 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue