public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btqca: make sure to handle byte order for soc_id
@ 2023-05-10  9:27 Luca Weiss
  2023-05-10 13:11 ` Simon Horman
  2023-05-19 20:20 ` patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luca Weiss @ 2023-05-10  9:27 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	Venkata Lakshmi Narayana Gubba
  Cc: ~postmarketos/upstreaming, phone-devel, Johan Hedberg,
	linux-bluetooth, linux-kernel, Simon Horman, Luca Weiss

The field soc_id in struct qca_btsoc_version is __le32 so we need to
convert it to host byteorder before using.

Reported-by: Simon Horman <simon.horman@corigine.com>
Fixes: 059924fdf6c1 ("Bluetooth: btqca: Use NVM files based on SoC ID for WCN3991")
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 drivers/bluetooth/btqca.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index fd0941fe8608..e7e58a956d15 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -637,7 +637,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
 		snprintf(config.fwname, sizeof(config.fwname),
 			 "qca/%s", firmware_name);
 	else if (qca_is_wcn399x(soc_type)) {
-		if (ver.soc_id == QCA_WCN3991_SOC_ID) {
+		if (le32_to_cpu(ver.soc_id) == QCA_WCN3991_SOC_ID) {
 			snprintf(config.fwname, sizeof(config.fwname),
 				 "qca/crnv%02xu.bin", rom_ver);
 		} else {

---
base-commit: ac9a78681b921877518763ba0e89202254349d1b
change-id: 20230510-btqca-byte-order-e6ea10018f1c

Best regards,
-- 
Luca Weiss <luca.weiss@fairphone.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: btqca: make sure to handle byte order for soc_id
  2023-05-10  9:27 [PATCH] Bluetooth: btqca: make sure to handle byte order for soc_id Luca Weiss
@ 2023-05-10 13:11 ` Simon Horman
  2023-05-19 20:20 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-05-10 13:11 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	Venkata Lakshmi Narayana Gubba, ~postmarketos/upstreaming,
	phone-devel, Johan Hedberg, linux-bluetooth, linux-kernel

On Wed, May 10, 2023 at 11:27:21AM +0200, Luca Weiss wrote:
> The field soc_id in struct qca_btsoc_version is __le32 so we need to
> convert it to host byteorder before using.
> 
> Reported-by: Simon Horman <simon.horman@corigine.com>
> Fixes: 059924fdf6c1 ("Bluetooth: btqca: Use NVM files based on SoC ID for WCN3991")
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: btqca: make sure to handle byte order for soc_id
  2023-05-10  9:27 [PATCH] Bluetooth: btqca: make sure to handle byte order for soc_id Luca Weiss
  2023-05-10 13:11 ` Simon Horman
@ 2023-05-19 20:20 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2023-05-19 20:20 UTC (permalink / raw)
  To: Luca Weiss
  Cc: marcel, johan.hedberg, luiz.dentz, gubbaven,
	~postmarketos/upstreaming, phone-devel, johan.hedberg,
	linux-bluetooth, linux-kernel, simon.horman

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 10 May 2023 11:27:21 +0200 you wrote:
> The field soc_id in struct qca_btsoc_version is __le32 so we need to
> convert it to host byteorder before using.
> 
> Reported-by: Simon Horman <simon.horman@corigine.com>
> Fixes: 059924fdf6c1 ("Bluetooth: btqca: Use NVM files based on SoC ID for WCN3991")
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> 
> [...]

Here is the summary with links:
  - Bluetooth: btqca: make sure to handle byte order for soc_id
    https://git.kernel.org/bluetooth/bluetooth-next/c/0f1e103dc579

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-19 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-10  9:27 [PATCH] Bluetooth: btqca: make sure to handle byte order for soc_id Luca Weiss
2023-05-10 13:11 ` Simon Horman
2023-05-19 20:20 ` patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox