mac80211: update patch to read ath10k variant from DT
This patch was revised upstream before being merged, and OpenWrt's copy was never updated to reflect the revision. Signed-off-by: Thomas Hebb <tommyhebb@gmail.com> [refreshed patches] Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
parent
16b25ad829
commit
751746c736
@ -1,5 +1,6 @@
|
|||||||
|
From d06f26c5c8a41f246a9c40862a77a55725cedbd3 Mon Sep 17 00:00:00 2001
|
||||||
From: Sven Eckelmann <sven.eckelmann@openmesh.com>
|
From: Sven Eckelmann <sven.eckelmann@openmesh.com>
|
||||||
Date: Fri, 10 Mar 2017 09:06:15 +0100
|
Date: Fri, 8 Dec 2017 11:37:42 +0100
|
||||||
Subject: ath10k: search DT for qcom,ath10k-calibration-variant
|
Subject: ath10k: search DT for qcom,ath10k-calibration-variant
|
||||||
|
|
||||||
Board Data File (BDF) is loaded upon driver boot-up procedure. The right
|
Board Data File (BDF) is loaded upon driver boot-up procedure. The right
|
||||||
@ -7,7 +8,7 @@ board data file is identified on QCA4019 using bus, bmi-chip-id and
|
|||||||
bmi-board-id.
|
bmi-board-id.
|
||||||
|
|
||||||
The problem, however, can occur when the (default) board data file cannot
|
The problem, however, can occur when the (default) board data file cannot
|
||||||
fulfill the vendor requirements and it is necessary to use a different
|
fulfill with the vendor requirements and it is necessary to use a different
|
||||||
board data file.
|
board data file.
|
||||||
|
|
||||||
This problem was solved for SMBIOS by adding a special SMBIOS type 0xF8.
|
This problem was solved for SMBIOS by adding a special SMBIOS type 0xF8.
|
||||||
@ -33,13 +34,14 @@ This would create the boarddata identifiers for the board-2.bin search
|
|||||||
* bus=ahb,bmi-chip-id=0,bmi-board-id=17,variant=RT-AC58U
|
* bus=ahb,bmi-chip-id=0,bmi-board-id=17,variant=RT-AC58U
|
||||||
|
|
||||||
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
|
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
|
||||||
|
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
|
||||||
Origin: other, https://patchwork.kernel.org/patch/9615185/
|
|
||||||
---
|
---
|
||||||
|
drivers/net/wireless/ath/ath10k/core.c | 40 ++++++++++++++++++++++++++++------
|
||||||
|
1 file changed, 33 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||||
@@ -860,6 +860,25 @@ static int ath10k_core_check_smbios(stru
|
@@ -860,6 +860,28 @@ static int ath10k_core_check_smbios(stru
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +59,10 @@ Origin: other, https://patchwork.kernel.org/patch/9615185/
|
|||||||
+ if (!variant)
|
+ if (!variant)
|
||||||
+ return -ENODATA;
|
+ return -ENODATA;
|
||||||
+
|
+
|
||||||
+ strscpy(ar->id.bdf_ext, variant, sizeof(ar->id.bdf_ext));
|
+ if (strscpy(ar->id.bdf_ext, variant, sizeof(ar->id.bdf_ext)) < 0)
|
||||||
|
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
||||||
|
+ "bdf variant string is longer than the buffer can accommodate (variant: %s)\n",
|
||||||
|
+ variant);
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
@ -65,7 +70,7 @@ Origin: other, https://patchwork.kernel.org/patch/9615185/
|
|||||||
static int ath10k_download_and_run_otp(struct ath10k *ar)
|
static int ath10k_download_and_run_otp(struct ath10k *ar)
|
||||||
{
|
{
|
||||||
u32 result, address = ar->hw_params.patch_load_addr;
|
u32 result, address = ar->hw_params.patch_load_addr;
|
||||||
@@ -1231,19 +1250,19 @@ static int ath10k_core_create_board_name
|
@@ -1231,19 +1253,19 @@ static int ath10k_core_create_board_name
|
||||||
/* strlen(',variant=') + strlen(ar->id.bdf_ext) */
|
/* strlen(',variant=') + strlen(ar->id.bdf_ext) */
|
||||||
char variant[9 + ATH10K_SMBIOS_BDF_EXT_STR_LENGTH] = { 0 };
|
char variant[9 + ATH10K_SMBIOS_BDF_EXT_STR_LENGTH] = { 0 };
|
||||||
|
|
||||||
@ -91,7 +96,7 @@ Origin: other, https://patchwork.kernel.org/patch/9615185/
|
|||||||
scnprintf(name, name_len,
|
scnprintf(name, name_len,
|
||||||
"bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x%s",
|
"bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x%s",
|
||||||
ath10k_bus_str(ar->hif.bus),
|
ath10k_bus_str(ar->hif.bus),
|
||||||
@@ -2343,7 +2362,11 @@ static int ath10k_core_probe_fw(struct a
|
@@ -2343,7 +2365,11 @@ static int ath10k_core_probe_fw(struct a
|
||||||
|
|
||||||
ret = ath10k_core_check_smbios(ar);
|
ret = ath10k_core_check_smbios(ar);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -47,7 +47,7 @@ Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||||
@@ -1129,14 +1129,61 @@ out:
|
@@ -1132,14 +1132,61 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
|
|||||||
|
|
||||||
ar->normal_mode_fw.board = ath10k_fetch_fw_file(ar,
|
ar->normal_mode_fw.board = ath10k_fetch_fw_file(ar,
|
||||||
ar->hw_params.fw.dir,
|
ar->hw_params.fw.dir,
|
||||||
@@ -1174,69 +1221,23 @@ static int ath10k_core_fetch_board_data_
|
@@ -1177,69 +1224,23 @@ static int ath10k_core_fetch_board_data_
|
||||||
data += magic_len;
|
data += magic_len;
|
||||||
len -= magic_len;
|
len -= magic_len;
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
@@ -1245,12 +1246,12 @@ err:
|
@@ -1248,12 +1249,12 @@ err:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ath10k_core_create_board_name(struct ath10k *ar, char *name,
|
static int ath10k_core_create_board_name(struct ath10k *ar, char *name,
|
||||||
@ -206,7 +206,7 @@ Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
|
|||||||
scnprintf(variant, sizeof(variant), ",variant=%s",
|
scnprintf(variant, sizeof(variant), ",variant=%s",
|
||||||
ar->id.bdf_ext);
|
ar->id.bdf_ext);
|
||||||
|
|
||||||
@@ -1276,17 +1277,26 @@ out:
|
@@ -1279,17 +1280,26 @@ out:
|
||||||
|
|
||||||
static int ath10k_core_fetch_board_file(struct ath10k *ar)
|
static int ath10k_core_fetch_board_file(struct ath10k *ar)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||||
@@ -2458,6 +2458,16 @@ int ath10k_core_register(struct ath10k *
|
@@ -2494,6 +2494,16 @@ int ath10k_core_register(struct ath10k *
|
||||||
ar->chip_id = chip_id;
|
ar->chip_id = chip_id;
|
||||||
queue_work(ar->workqueue, &ar->register_work);
|
queue_work(ar->workqueue, &ar->register_work);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user