Files
wlan-ap/patches/0023-ipq40xx-add-ath10k-ct-fw.cfg-stubs.patch
2021-03-25 12:19:47 +01:00

138 lines
3.7 KiB
Diff

From 558605338e87ebac7358026eb86b7ba5f4c228a1 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Thu, 25 Mar 2021 08:03:48 +0100
Subject: [PATCH 23/23] ipq40xx: add ath10k-ct fw.cfg stubs
Signed-off-by: John Crispin <john@phrozen.org>
---
.../etc/hotplug.d/firmware/40-ct-fw-cfg | 46 +++++++++++++++++++
.../lib/firmware/ath10k/fwcfg-ipq4019.txt | 15 ++++++
.../lib/firmware/ath10k/fwcfg-qca9888.txt | 16 +++++++
.../lib/firmware/ath10k/fwcfg-qca9984.txt | 16 +++++++
4 files changed, 93 insertions(+)
create mode 100644 target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg
create mode 100644 target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-ipq4019.txt
create mode 100644 target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-qca9888.txt
create mode 100644 target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-qca9984.txt
diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg
new file mode 100644
index 0000000000..fe8dab3367
--- /dev/null
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+[ -e /lib/firmware/$FIRMWARE ] && exit 0
+
+
+fwcfg_symlink() {
+ local chip=$1
+ local path=$2
+
+ ln -s /lib/firmware/ath10k/fwcfg-${chip}.txt /lib/firmware/${FIRMWARE}
+}
+
+case "$FIRMWARE" in
+ath10k/fwcfg-ahb-a000000.wifi.txt|\
+ath10k/fwcfg-ahb-a800000.wifi.txt)
+ fwcfg_symlink ipq4019
+
+ ;;
+ath10k/fwcfg-pci-0000:01:00.0.txt)
+ case "$(board_name)" in
+ linksys,ea8300)
+ fwcfg_symlink qca9888
+ ;;
+ tp-link,ap2220|\
+ tp-link,ec420-g1)
+ fwcfg_symlink qca9984
+ ;;
+ esac
+ ;;
+ath10k/fwcfg-pci-0001:01:00.0.txt)
+ case "$(board_name)" in
+ edgecore,ecw5410)
+ fwcfg_symlink qca9984
+ ;;
+ esac
+ ;;
+ath10k/fwcfg-pci-0002:01:00.0.txt)
+ case "$(board_name)" in
+ edgecore,ecw5410)
+ fwcfg_symlink qca9984
+ ;;
+ esac
+ ;;
+esac
+
+exit 0
diff --git a/target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-ipq4019.txt b/target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-ipq4019.txt
new file mode 100644
index 0000000000..7943173e51
--- /dev/null
+++ b/target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-ipq4019.txt
@@ -0,0 +1,15 @@
+vdevs = 8
+peers = 147
+active_peers = 147
+stations = 147
+rate_ctrl_objs = 7
+#regdom = 840
+#fwname = firmware-5-htt-mgt-b.bin
+#fwver = 5
+nohwcrypt = 0
+ct_sta_mode = 0
+tx_desc = 2000
+#max_nss = 3
+tids = 450
+skid_limit = 360
+max_amsdus = 3
diff --git a/target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-qca9888.txt b/target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-qca9888.txt
new file mode 100644
index 0000000000..560c8103d7
--- /dev/null
+++ b/target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-qca9888.txt
@@ -0,0 +1,16 @@
+# 9888 chip
+vdevs = 8
+peers = 202
+active_peers = 202
+stations = 202
+rate_ctrl_objs = 7
+#regdom = 840
+#fwname = firmware-5-htt-mgt-b.bin
+#fwver = 5
+nohwcrypt = 0
+ct_sta_mode = 0
+tx_desc = 2200
+#max_nss = 3
+tids = 450
+skid_limit = 360
+max_amsdus = 3
diff --git a/target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-qca9984.txt b/target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-qca9984.txt
new file mode 100644
index 0000000000..924a689000
--- /dev/null
+++ b/target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-qca9984.txt
@@ -0,0 +1,16 @@
+# 9984
+vdevs = 8
+peers = 180
+active_peers = 180
+stations = 180
+rate_ctrl_objs = 7
+#regdom = 840
+#fwname = firmware-5-htt-mgt-b.bin
+#fwver = 5
+nohwcrypt = 0
+ct_sta_mode = 0
+tx_desc = 2400
+#max_nss = 3
+tids = 450
+skid_limit = 360
+max_amsdus = 3
--
2.25.1