Re: [PATCH wireless-next 2/2] wifi: wfx: fix error code on unsupported firmware
From: Jérôme Pouiller
Date: Mon Sep 07 2026 - 03:15:08 EST
On Monday 7 September 2026 08:20:54 Central European Summer Time Sverdlin, Alexander wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
> Hi Jérôme,
>
> On Sun, 2026-09-06 at 22:47 +0200, Jérôme Pouiller wrote:
> > 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
> ^^^^^^^^
> minor: I suppose it should have read "positive"
I mean, really_probe() inverts the value:
/*
* Return probe errors as positive values so that the callers
* can distinguish them from other errors.
*/
ret = -ret;
goto probe_failed;
So, the jiffies count become negative
--
Jérôme Pouiller