[PATCH wireless 1/5] wifi: b43: Correct OpenFW QoS capability warning conditional

Rahul Rameshbabu posted 5 patches 1 year, 12 months ago
There is a newer version of this series
[PATCH wireless 1/5] wifi: b43: Correct OpenFW QoS capability warning conditional
Posted by Rahul Rameshbabu 1 year, 12 months ago
Trigger the warning message should be when the OpenFW capability for QoS
does not advertise QoS support. Previously, the warning would be
incorrectly triggered when OpenFW reported QoS capability is present.

Fixes: 097b0e1bf18a ("b43: fix crash with OpenFWWF")
Signed-off-by: Rahul Rameshbabu <sergeantsagara@protonmail.com>
---
 drivers/net/wireless/broadcom/b43/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
index 92ca0b2ca286..c81117a22ebf 100644
--- a/drivers/net/wireless/broadcom/b43/main.c
+++ b/drivers/net/wireless/broadcom/b43/main.c
@@ -2713,7 +2713,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
 			dev->hwcrypto_enabled = false;
 		}
 		/* adding QoS support should use an offline discovery mechanism */
-		WARN(fwcapa & B43_FWCAPA_QOS, "QoS in OpenFW not supported\n");
+		WARN(!(fwcapa & B43_FWCAPA_QOS), "QoS in OpenFW not supported\n");
 	} else {
 		b43info(dev->wl, "Loading firmware version %u.%u "
 			"(20%.2i-%.2i-%.2i %.2i:%.2i:%.2i)\n",
-- 
2.42.0
Re: [PATCH wireless 1/5] wifi: b43: Correct OpenFW QoS capability warning conditional
Posted by Michael Büsch 1 year, 12 months ago
On Sat, 30 Dec 2023 04:51:29 +0000
Rahul Rameshbabu <sergeantsagara@protonmail.com> wrote:

> Trigger the warning message should be when the OpenFW capability for QoS
> does not advertise QoS support. Previously, the warning would be
> incorrectly triggered when OpenFW reported QoS capability is present.

> --- a/drivers/net/wireless/broadcom/b43/main.c
> +++ b/drivers/net/wireless/broadcom/b43/main.c
> @@ -2713,7 +2713,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
>  			dev->hwcrypto_enabled = false;
>  		}
>  		/* adding QoS support should use an offline discovery mechanism */
> -		WARN(fwcapa & B43_FWCAPA_QOS, "QoS in OpenFW not supported\n");
> +		WARN(!(fwcapa & B43_FWCAPA_QOS), "QoS in OpenFW not supported\n");
>  	} else {
>  		b43info(dev->wl, "Loading firmware version %u.%u "
>  			"(20%.2i-%.2i-%.2i %.2i:%.2i:%.2i)\n",

I don't think this patch is correct.
It should warn, if the firmware advertises QoS, because that is not
supported by b43 in case of OpenFW.


-- 
Michael Büsch
https://bues.ch/
Re: [PATCH wireless 1/5] wifi: b43: Correct OpenFW QoS capability warning conditional
Posted by Rahul Rameshbabu 1 year, 12 months ago
On Sat, 30 Dec, 2023 14:34:55 +0100 Michael Büsch <m@bues.ch> wrote:
> [[PGP Signed Part:Undecided]]
> On Sat, 30 Dec 2023 04:51:29 +0000
> Rahul Rameshbabu <sergeantsagara@protonmail.com> wrote:
>
>> Trigger the warning message should be when the OpenFW capability for QoS
>> does not advertise QoS support. Previously, the warning would be
>> incorrectly triggered when OpenFW reported QoS capability is present.
>
>> --- a/drivers/net/wireless/broadcom/b43/main.c
>> +++ b/drivers/net/wireless/broadcom/b43/main.c
>> @@ -2713,7 +2713,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
>>  			dev->hwcrypto_enabled = false;
>>  		}
>>  		/* adding QoS support should use an offline discovery mechanism */
>> -		WARN(fwcapa & B43_FWCAPA_QOS, "QoS in OpenFW not supported\n");
>> +		WARN(!(fwcapa & B43_FWCAPA_QOS), "QoS in OpenFW not supported\n");
>>  	} else {
>>  		b43info(dev->wl, "Loading firmware version %u.%u "
>>  			"(20%.2i-%.2i-%.2i %.2i:%.2i:%.2i)\n",
>
> I don't think this patch is correct.
> It should warn, if the firmware advertises QoS, because that is not
> supported by b43 in case of OpenFW.

Thanks. I had a hard time understanding the intention of this warning. I
figured it could be the case where the warning is about the driver
disabling QoS when firmware has support but was not sure. Will drop this
patch going forward.

--
Thanks,

Rahul Rameshbabu