All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: kvalo@codeaurora.org, linux-wireless@vger.kernel.org,
	wcn36xx@lists.infradead.org
Cc: loic.poulain@linaro.org, benl@squareup.com, bryan.odonoghue@linaro.org
Subject: [PATCH v2 2/2] wcn36xx: Add ability for wcn36xx_smd_dump_cmd_req to pass two's complement
Date: Thu,  9 Sep 2021 15:44:28 +0100	[thread overview]
Message-ID: <20210909144428.2564650-3-bryan.odonoghue@linaro.org> (raw)
In-Reply-To: <20210909144428.2564650-1-bryan.odonoghue@linaro.org>

Qcom documents suggest passing of negative values to the dump command,
however 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 value>

Upstream:
echo "71 3 <schedule period> <trigger threshold> <hysteresis value>" > /sys/kernel/debug/ieee80211/phy0/wcn36xx/dump

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(-)

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;
 	}
 
-- 
2.33.0


  parent reply	other threads:[~2021-09-09 14:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09 14:44 [PATCH v2 0/2] wcn36xx: Two one line fixes for Antenna Diveristy Switching Bryan O'Donoghue
2021-09-09 14:44 ` [PATCH v2 1/2] wcn36xx: Fix Antenna Diversity Switching Bryan O'Donoghue
2021-09-09 15:39   ` Loic Poulain
2021-09-21 13:33   ` Kalle Valo
2021-09-09 14:44 ` Bryan O'Donoghue [this message]
2021-09-09 15:39   ` [PATCH v2 2/2] wcn36xx: Add ability for wcn36xx_smd_dump_cmd_req to pass two's complement Loic Poulain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210909144428.2564650-3-bryan.odonoghue@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=benl@squareup.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=wcn36xx@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.