[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230510-btqca-byte-order-v1-1-82e6a371c5aa@fairphone.com>
Date: Wed, 10 May 2023 11:27:21 +0200
From: Luca Weiss <luca.weiss@...rphone.com>
To: Marcel Holtmann <marcel@...tmann.org>,
Johan Hedberg <johan.hedberg@...il.com>,
Luiz Augusto von Dentz <luiz.dentz@...il.com>,
Venkata Lakshmi Narayana Gubba <gubbaven@...eaurora.org>
Cc: ~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org,
Johan Hedberg <johan.hedberg@...el.com>,
linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org,
Simon Horman <simon.horman@...igine.com>,
Luca Weiss <luca.weiss@...rphone.com>
Subject: [PATCH] Bluetooth: btqca: make sure to handle byte order for
soc_id
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@...igine.com>
Fixes: 059924fdf6c1 ("Bluetooth: btqca: Use NVM files based on SoC ID for WCN3991")
Signed-off-by: Luca Weiss <luca.weiss@...rphone.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@...rphone.com>
Powered by blists - more mailing lists