mirror of
https://github.com/hzyitc/openwrt-redmi-ax3000.git
synced 2025-12-17 00:42:53 +00:00
36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
From 1b4a1cc8a00a1497f0afa782f1ae844db8eab3d4 Mon Sep 17 00:00:00 2001
|
|
From: hzy <hzyitc@outlook.com>
|
|
Date: Sat, 7 Oct 2023 22:19:31 +0800
|
|
Subject: [PATCH 1/2] ath11k: Support reading board_id from devicetree
|
|
|
|
---
|
|
drivers/net/wireless/ath/ath11k/qmi.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
|
|
index 801d5880..a9aa40dd 100644
|
|
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
|
@@ -2200,6 +2200,7 @@ static int ath11k_qmi_request_target_cap(struct ath11k_base *ab)
|
|
struct qmi_txn txn;
|
|
int ret = 0;
|
|
int r;
|
|
+ u32 board_id;
|
|
char *fw_build_id;
|
|
int fw_build_id_mask_len;
|
|
|
|
@@ -2242,7 +2243,9 @@ static int ath11k_qmi_request_target_cap(struct ath11k_base *ab)
|
|
ab->qmi.target.chip_family = resp.chip_info.chip_family;
|
|
}
|
|
|
|
- if (resp.board_info_valid)
|
|
+ if (!of_property_read_u32(ab->dev->of_node, "qcom,board_id", &board_id) && board_id != 0xFF)
|
|
+ ab->qmi.target.board_id = board_id;
|
|
+ else if (resp.board_info_valid)
|
|
ab->qmi.target.board_id = resp.board_info.board_id;
|
|
else
|
|
ab->qmi.target.board_id = 0xFF;
|
|
--
|
|
2.40.1
|
|
|