summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2024-01-25 17:00:22 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2024-01-25 17:00:22 +0000
commit1c2b1a980414a6c4ee891df941ff9db76803f317 (patch)
treef77ef333611db21256d8cc275dc571ca1d67f12c /sys
parent6a72735e3ce29df9a80e36bdaedbc7e4f1945927 (diff)
Make qwx(4) avoid sub-directories in firmware paths.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/qwx.c20
-rw-r--r--sys/dev/ic/qwxvar.h14
-rw-r--r--sys/dev/pci/if_qwx_pci.c4
3 files changed, 19 insertions, 19 deletions
diff --git a/sys/dev/ic/qwx.c b/sys/dev/ic/qwx.c
index 5dd9856851a..8cc77ad4eef 100644
--- a/sys/dev/ic/qwx.c
+++ b/sys/dev/ic/qwx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qwx.c,v 1.7 2024/01/25 10:11:04 stsp Exp $ */
+/* $OpenBSD: qwx.c,v 1.8 2024/01/25 17:00:20 stsp Exp $ */
/*
* Copyright 2023 Stefan Sperling <stsp@openbsd.org>
@@ -2115,7 +2115,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.hw_rev = ATH11K_HW_IPQ8074,
.name = "ipq8074 hw2.0",
.fw = {
- .dir = "IPQ8074/hw2.0",
+ .dir = "ipq8074-hw2.0",
.board_size = 256 * 1024,
.cal_offset = 128 * 1024,
},
@@ -2205,7 +2205,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.hw_rev = ATH11K_HW_IPQ6018_HW10,
.name = "ipq6018 hw1.0",
.fw = {
- .dir = "IPQ6018/hw1.0",
+ .dir = "ipq6018-hw1.0",
.board_size = 256 * 1024,
.cal_offset = 128 * 1024,
},
@@ -2292,7 +2292,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.name = "qca6390 hw2.0",
.hw_rev = ATH11K_HW_QCA6390_HW20,
.fw = {
- .dir = "QCA6390/hw2.0",
+ .dir = "qca6390-hw2.0",
.board_size = 256 * 1024,
.cal_offset = 128 * 1024,
},
@@ -2381,7 +2381,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.name = "qcn9074 hw1.0",
.hw_rev = ATH11K_HW_QCN9074_HW10,
.fw = {
- .dir = "QCN9074/hw1.0",
+ .dir = "qcn9074-hw1.0",
.board_size = 256 * 1024,
.cal_offset = 128 * 1024,
},
@@ -2469,7 +2469,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.name = "wcn6855 hw2.0",
.hw_rev = ATH11K_HW_WCN6855_HW20,
.fw = {
- .dir = "WCN6855/hw2.0",
+ .dir = "wcn6855-hw2.0",
.board_size = 256 * 1024,
.cal_offset = 128 * 1024,
},
@@ -2558,7 +2558,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.name = "wcn6855 hw2.1",
.hw_rev = ATH11K_HW_WCN6855_HW21,
.fw = {
- .dir = "WCN6855/hw2.1",
+ .dir = "wcn6855-hw2.1",
.board_size = 256 * 1024,
.cal_offset = 128 * 1024,
},
@@ -2646,7 +2646,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.name = "wcn6750 hw1.0",
.hw_rev = ATH11K_HW_WCN6750_HW10,
.fw = {
- .dir = "WCN6750/hw1.0",
+ .dir = "wcn6750-hw1.0",
.board_size = 256 * 1024,
.cal_offset = 128 * 1024,
},
@@ -7296,7 +7296,7 @@ qwx_core_fetch_bdf(struct qwx_softc *sc, u_char **data, size_t *len,
char boardname[200];
int ret;
- ret = snprintf(path, sizeof(path), "%s/%s/%s",
+ ret = snprintf(path, sizeof(path), "%s-%s-%s",
ATH11K_FW_DIR, sc->hw_params.fw.dir, filename);
if (ret < 0 || ret >= sizeof(path))
return ENOSPC;
@@ -7584,7 +7584,7 @@ qwx_qmi_m3_load(struct qwx_softc *sc)
char path[PATH_MAX];
int ret;
- ret = snprintf(path, sizeof(path), "%s/%s/%s",
+ ret = snprintf(path, sizeof(path), "%s-%s-%s",
ATH11K_FW_DIR, sc->hw_params.fw.dir, ATH11K_M3_FILE);
if (ret < 0 || ret >= sizeof(path))
return ENOSPC;
diff --git a/sys/dev/ic/qwxvar.h b/sys/dev/ic/qwxvar.h
index fbd61be068b..adc2518d565 100644
--- a/sys/dev/ic/qwxvar.h
+++ b/sys/dev/ic/qwxvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: qwxvar.h,v 1.4 2024/01/25 10:11:04 stsp Exp $ */
+/* $OpenBSD: qwxvar.h,v 1.5 2024/01/25 17:00:21 stsp Exp $ */
/*
* Copyright (c) 2018-2019 The Linux Foundation.
@@ -69,12 +69,12 @@ struct ath11k_hw_ring_mask {
#define ATH11K_FW_DIR "qwx"
#define ATH11K_BOARD_MAGIC "QCA-ATH11K-BOARD"
-#define ATH11K_BOARD_API2_FILE "board-2.bin"
-#define ATH11K_DEFAULT_BOARD_FILE "board.bin"
-#define ATH11K_DEFAULT_CAL_FILE "caldata.bin"
-#define ATH11K_AMSS_FILE "amss.bin"
-#define ATH11K_M3_FILE "m3.bin"
-#define ATH11K_REGDB_FILE "regdb.bin"
+#define ATH11K_BOARD_API2_FILE "board-2"
+#define ATH11K_DEFAULT_BOARD_FILE "board"
+#define ATH11K_DEFAULT_CAL_FILE "caldata"
+#define ATH11K_AMSS_FILE "amss"
+#define ATH11K_M3_FILE "m3"
+#define ATH11K_REGDB_FILE "regdb"
#define QWX_FW_BUILD_ID_MASK "QC_IMAGE_VERSION_STRING="
diff --git a/sys/dev/pci/if_qwx_pci.c b/sys/dev/pci/if_qwx_pci.c
index eb08d250572..12ec98d7f5d 100644
--- a/sys/dev/pci/if_qwx_pci.c
+++ b/sys/dev/pci/if_qwx_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_qwx_pci.c,v 1.3 2024/01/25 09:44:56 stsp Exp $ */
+/* $OpenBSD: if_qwx_pci.c,v 1.4 2024/01/25 17:00:21 stsp Exp $ */
/*
* Copyright 2023 Stefan Sperling <stsp@openbsd.org>
@@ -3024,7 +3024,7 @@ qwx_mhi_fw_load_handler(struct qwx_pci_softc *psc)
u_char *data;
size_t len;
- ret = snprintf(amss_path, sizeof(amss_path), "%s/%s/%s",
+ ret = snprintf(amss_path, sizeof(amss_path), "%s-%s-%s",
ATH11K_FW_DIR, sc->hw_params.fw.dir, ATH11K_AMSS_FILE);
if (ret < 0 || ret >= sizeof(amss_path))
return ENOSPC;