diff mbox series

[2/2] wcn36xx: Add ability for wcn36xx_smd_dump_cmd_req to pass two's complement

Message ID 20210908133019.2408092-3-bryan.odonoghue@linaro.org
State Superseded
Headers show
Series wcn36xx: Two one line fixes for Antenna Diveristy Switching | expand

Commit Message

Bryan O'Donoghue Sept. 8, 2021, 1:30 p.m. UTC
Qcom documents suggest passing of negative values to the dump command.
Currently we convert from string to u32 not s32, so we cannot pass a two's
complement value to the firmware in this way.

There is in fact only one parameter which takes a two's complement value
<tigger threshold> in the antenna diversity switch command.

Downstream:
iwpriv wlan0 dump 71 3 <schedule period> <trigger threshold> <hysteresis>

Upstream:
echo "71 3 50 -60 3" > /sys/kernel/debug/ieee80211/phy0/wcn36xx/dump

Meaning enable Antenna Diveristy Switching every 50 beacons if the signal
quality is -60db or worse and a hysteresis of 3 db or better to switch from
one antenna to another.

Fixes: 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

---
 drivers/net/wireless/ath/wcn36xx/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.33.0


_______________________________________________
wcn36xx mailing list
wcn36xx@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/wcn36xx

Comments

Johannes Berg Sept. 8, 2021, 1:33 p.m. UTC | #1
On Wed, 2021-09-08 at 14:30 +0100, Bryan O'Donoghue wrote:
> 

> iwpriv wlan0 dump 71 3 <schedule period> <trigger threshold> <hysteresis>


Ouch. The last millenium called and wants its technology back ;-)

johannes
Bryan O'Donoghue Sept. 8, 2021, 1:52 p.m. UTC | #2
On 08/09/2021 14:33, Johannes Berg wrote:
> On Wed, 2021-09-08 at 14:30 +0100, Bryan O'Donoghue wrote:

>>

>> iwpriv wlan0 dump 71 3 <schedule period> <trigger threshold> <hysteresis>

> 

> Ouch. The last millenium called and wants its technology back ;-)

> 

> johannes

> 


ah we're all about recycling the technology since #climatechange

:)
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/wcn36xx/debug.c b/drivers/net/wireless/ath/wcn36xx/debug.c
index 389b5e7129a6..6af306ae41ad 100644
--- a/drivers/net/wireless/ath/wcn36xx/debug.c
+++ b/drivers/net/wireless/ath/wcn36xx/debug.c
@@ -120,7 +120,7 @@  static ssize_t write_file_dump(struct file *file,
 		if (begin == NULL)
 			break;
 
-		if (kstrtou32(begin, 0, &arg[i]) != 0)
+		if (kstrtos32(begin, 0, &arg[i]) != 0)
 			break;
 	}