lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250716075100.1447352-4-alexander.wilhelm@westermo.com>
Date: Wed, 16 Jul 2025 09:50:52 +0200
From: Alexander Wilhelm <alexander.wilhelm@...termo.com>
To: Jeff Johnson <jjohnson@...nel.org>, Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konradybcio@...nel.org>
Cc: linux-wireless@...r.kernel.org, ath12k@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: [PATCH 03/11] wifi: ath12k: fix endianness handling in QMI firmware indication

Ensure proper endianness support for big-endian platforms by correcting
data types in the QMI firmware indication request and response messages
and its associated structures as well. Add missing byte swaps wherever
these structures are accessed or modified.

Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Signed-off-by: Alexander Wilhelm <alexander.wilhelm@...termo.com>
---
 drivers/net/wireless/ath/ath12k/qmi.c | 2 +-
 drivers/net/wireless/ath/ath12k/qmi.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c
index 2973edd2735b..cf05c76cc112 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.c
+++ b/drivers/net/wireless/ath/ath12k/qmi.c
@@ -2315,7 +2315,7 @@ static int ath12k_qmi_fw_ind_register_send(struct ath12k_base *ab)
 	}
 
 	req->client_id_valid = 1;
-	req->client_id = QMI_WLANFW_CLIENT_ID;
+	req->client_id = cpu_to_le32(QMI_WLANFW_CLIENT_ID);
 	req->fw_ready_enable_valid = 1;
 	req->fw_ready_enable = 1;
 	req->request_mem_enable_valid = 1;
diff --git a/drivers/net/wireless/ath/ath12k/qmi.h b/drivers/net/wireless/ath/ath12k/qmi.h
index abe2fba25d13..026dc33a39d8 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.h
+++ b/drivers/net/wireless/ath/ath12k/qmi.h
@@ -296,7 +296,7 @@ struct qmi_wlanfw_ind_register_req_msg_v01 {
 	u8 pin_connect_result_enable_valid;
 	u8 pin_connect_result_enable;
 	u8 client_id_valid;
-	u32 client_id;
+	__le32 client_id;
 	u8 request_mem_enable_valid;
 	u8 request_mem_enable;
 	u8 fw_mem_ready_enable_valid;
@@ -304,7 +304,7 @@ struct qmi_wlanfw_ind_register_req_msg_v01 {
 	u8 fw_init_done_enable_valid;
 	u8 fw_init_done_enable;
 	u8 rejuvenate_enable_valid;
-	u32 rejuvenate_enable;
+	__le32 rejuvenate_enable;
 	u8 xo_cal_enable_valid;
 	u8 xo_cal_enable;
 	u8 cal_done_enable_valid;
@@ -314,7 +314,7 @@ struct qmi_wlanfw_ind_register_req_msg_v01 {
 struct qmi_wlanfw_ind_register_resp_msg_v01 {
 	struct qmi_response_type_v01 resp;
 	u8 fw_status_valid;
-	u64 fw_status;
+	__le64 fw_status;
 };
 
 #define QMI_WLANFW_REQUEST_MEM_IND_MSG_V01_MAX_LEN	1824
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ