summaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2023-11-03 04:10:03 +0100
committerChristian Marangi <ansuelsmth@gmail.com>2023-11-03 04:10:03 +0100
commita0fa3a17a2f095dea27afa3a11e7674d990adbd7 (patch)
tree3e47aec69cd5acedb44952657f8e906c6c573b1d /package/kernel
parent1cb85e1251a7174643993dfc6da778e31be58903 (diff)
downloadopenwrt-a0fa3a17a2f095dea27afa3a11e7674d990adbd7.tar.gz
openwrt-a0fa3a17a2f095dea27afa3a11e7674d990adbd7.tar.bz2
openwrt-a0fa3a17a2f095dea27afa3a11e7674d990adbd7.zip
ath10k-ct: add patch fixing compilation error in debug
ath10k-ct based on kernel 6.4 doesn't have a fix present in previous kernel. Add patch that port the compilation error fix from previous kernel in the new 6.4 kernel. Fixes: 7d3651f1b9be ("ath10k-ct: switch to 6.4") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/ath10k-ct/patches/100-ath10k-ct-port-compilation-warning-for-debug-level-t.patch111
1 files changed, 111 insertions, 0 deletions
diff --git a/package/kernel/ath10k-ct/patches/100-ath10k-ct-port-compilation-warning-for-debug-level-t.patch b/package/kernel/ath10k-ct/patches/100-ath10k-ct-port-compilation-warning-for-debug-level-t.patch
new file mode 100644
index 0000000000..f4522c87b4
--- /dev/null
+++ b/package/kernel/ath10k-ct/patches/100-ath10k-ct-port-compilation-warning-for-debug-level-t.patch
@@ -0,0 +1,111 @@
+From a227621b46df8a7a5c276131b245f40eac7513fb Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth@gmail.com>
+Date: Fri, 3 Nov 2023 04:03:08 +0100
+Subject: [PATCH] ath10k-ct: port compilation warning for debug level to kernel
+ 6.4
+
+Port compilation warning for debug level previously fixed in other
+kernel to kernel version 6.4.
+
+Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
+---
+ ath10k-6.4/debug.c | 85 ++++++++++++++++++++++++++--------------------
+ 1 file changed, 48 insertions(+), 37 deletions(-)
+
+--- a/ath10k-6.4/debug.c
++++ b/ath10k-6.4/debug.c
+@@ -1345,47 +1345,58 @@ static const struct file_operations fops
+ .llseek = default_llseek,
+ };
+
++static const char debug_level_buf[] =
++ "To change debug level, set value adding up desired flags:\n"
++ "PCI: 0x1\n"
++ "WMI: 0x2\n"
++ "HTC: 0x4\n"
++ "HTT: 0x8\n"
++ "MAC: 0x10\n"
++ "BOOT: 0x20\n"
++ "PCI-DUMP: 0x40\n"
++ "HTT-DUMP: 0x80\n"
++ "MGMT: 0x100\n"
++ "DATA: 0x200\n"
++ "BMI: 0x400\n"
++ "REGULATORY: 0x800\n"
++ "TESTMODE: 0x1000\n"
++ "WMI-PRINT: 0x2000\n"
++ "PCI-PS: 0x4000\n"
++ "AHB: 0x8000\n"
++ "SDIO: 0x10000\n"
++ "SDIO_DUMP: 0x20000\n"
++ "USB: 0x40000\n"
++ "USB_BULK: 0x80000\n"
++ "SNOC: 0x100000\n"
++ "QMI: 0x200000\n"
++ "BEACONS: 0x8000000\n"
++ "NO-FW-DBGLOG:0x10000000\n"
++ "MAC2: 0x20000000\n"
++ "INFO-AS-DBG: 0x40000000\n"
++ "FW: 0x80000000\n"
++ "ALL: 0xEFFFFFFF\n";
++
++#define READ_DEBUG_LEVEL_SIZE sizeof(debug_level_buf) + 60
++
+ static ssize_t ath10k_read_debug_level(struct file *file,
+ char __user *user_buf,
+ size_t count, loff_t *ppos)
+ {
+- int sz;
+- const char buf[] =
+- "To change debug level, set value adding up desired flags:\n"
+- "PCI: 0x1\n"
+- "WMI: 0x2\n"
+- "HTC: 0x4\n"
+- "HTT: 0x8\n"
+- "MAC: 0x10\n"
+- "BOOT: 0x20\n"
+- "PCI-DUMP: 0x40\n"
+- "HTT-DUMP: 0x80\n"
+- "MGMT: 0x100\n"
+- "DATA: 0x200\n"
+- "BMI: 0x400\n"
+- "REGULATORY: 0x800\n"
+- "TESTMODE: 0x1000\n"
+- "WMI-PRINT: 0x2000\n"
+- "PCI-PS: 0x4000\n"
+- "AHB: 0x8000\n"
+- "SDIO: 0x10000\n"
+- "SDIO_DUMP: 0x20000\n"
+- "USB: 0x40000\n"
+- "USB_BULK: 0x80000\n"
+- "SNOC: 0x100000\n"
+- "QMI: 0x200000\n"
+- "BEACONS: 0x8000000\n"
+- "NO-FW-DBGLOG:0x10000000\n"
+- "MAC2: 0x20000000\n"
+- "INFO-AS-DBG: 0x40000000\n"
+- "FW: 0x80000000\n"
+- "ALL: 0xEFFFFFFF\n";
+- char wbuf[sizeof(buf) + 60];
+- sz = snprintf(wbuf, sizeof(wbuf), "Current debug level: 0x%x\n\n%s",
+- ath10k_debug_mask, buf);
+- wbuf[sizeof(wbuf) - 1] = 0;
++ int sz, ret;
++ char *wbuf;
++
++ wbuf = kcalloc(READ_DEBUG_LEVEL_SIZE, sizeof(char), GFP_KERNEL);
++ if (!wbuf)
++ return -ENOMEM;
++
++ sz = snprintf(wbuf, READ_DEBUG_LEVEL_SIZE,
++ "Current debug level: 0x%x\n\n%s",
++ ath10k_debug_mask, debug_level_buf);
++
++ ret = simple_read_from_buffer(user_buf, count, ppos, wbuf, sz);
++ kfree(wbuf);
+
+- return simple_read_from_buffer(user_buf, count, ppos, wbuf, sz);
++ return ret;
+ }
+
+ /* Set logging level.