Skip to contentSkip to conversation

brcmfmac: of: introduce new property to allow disable PNO

PATCH In review Hermes Zhang 3 participants 3 messages Apr 24, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 brcmfmac: of: introduce new property to allow disable PNO

From: Hermes Zhang <[email protected]>

Some versions of the Broadcom firmware for this chip seem to hang if the PNO feature is enabled when connecting to a dummy or non-existent AP.
Add a new property to allow the disabling of PNO for devices with this specific firmware.

---

Notes:
Comments update

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +4 -0
index 8623bde5eb70..121a195e4054 100644
@@ -11,6 +11,7 @@
 #include "core.h"
 #include "common.h"
 #include "of.h"
+#include "feature.h"
 
 static int brcmf_of_get_country_codes(struct device *dev,
 				      struct brcmf_mp_device *settings)
@@ -102,6 +103,9 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
 	if (bus_type != BRCMF_BUSTYPE_SDIO)
 		return;
 
+	if (of_find_property(np, "brcm,pno-disable", NULL))
+		settings->feature_disable |= BIT(BRCMF_FEAT_PNO);
+
 	if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0)
 		sdio->drive_strength = val;
 
Signature · 1 line
2.30.2
#1 lore raw
Quoted 8 lines · Hermes Zhang

From: Hermes Zhang <[email protected]>

Some versions of the Broadcom firmware for this chip seem to hang if the PNO feature is enabled when connecting to a dummy or non-existent AP.
Add a new property to allow the disabling of PNO for devices with this specific firmware.

Quoted 7 lines

---

Notes:
Comments update

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 4 ++++

This is still missing the bindings documentation and ack from the DT maintainers. You also need to CC the devicetree list:

https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#2 lore raw
In reply to Hermes Zhang
Quoted 7 lines · Hermes Zhang

From: Hermes Zhang <[email protected]>

Some versions of the Broadcom firmware for this chip seem to hang if the PNO feature is enabled when connecting to a dummy or non-existent AP.
Add a new property to allow the disabling of PNO for devices with this specific firmware.

If you know the specific version of the firmware which is broken, why do you need a DT property? Why not just check the firmware version and disable it automatically?

It does not seem like you are describing hardware here, which is what DT is for.

Andrew