]> git.baikalelectronics.ru Git - kernel.git/commit
wcn36xx: Add ability for wcn36xx_smd_dump_cmd_req to pass two's complement
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Thu, 9 Sep 2021 14:44:28 +0000 (15:44 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 21 Sep 2021 13:33:25 +0000 (16:33 +0300)
commitc5c33e48f7e1b31a9592da7c93c0601418b4ede8
tree00ec826c4566e8aa33d1ff711ed67935de5e52b0
parent58e575a29a27444d7f3e70c7bc9f8aaf854ebe5e
wcn36xx: Add ability for wcn36xx_smd_dump_cmd_req to pass two's complement

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: 29b7b74be440 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210909144428.2564650-3-bryan.odonoghue@linaro.org
drivers/net/wireless/ath/wcn36xx/debug.c