aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2021-10-16 18:17:18 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2021-10-18 23:01:19 +0200
commit494327817e174fa51a944020afd7e3c1910c02e1 (patch)
tree72ac8e10d724a62eddd5e3aff05019ec249bacf7
parent7d025da6aeb813a809b056d3f8429fbf4b594446 (diff)
downloadbackports-494327817e174fa51a944020afd7e3c1910c02e1.tar.gz
patches: Remove const from struct rchan_callbacksv5.11.22-1
The struct rchan_callbacks parameter to the relay_open function was changed to const in kernel 5.11 and the drivers were adapted. On older kernel versions the struct rchan_callbacks should not be costs. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--patches/0105-remove-const-from-rchan_callbacks.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/patches/0105-remove-const-from-rchan_callbacks.patch b/patches/0105-remove-const-from-rchan_callbacks.patch
new file mode 100644
index 00000000..16c14707
--- /dev/null
+++ b/patches/0105-remove-const-from-rchan_callbacks.patch
@@ -0,0 +1,42 @@
+--- a/drivers/net/wireless/ath/ath10k/spectral.c
++++ b/drivers/net/wireless/ath/ath10k/spectral.c
+@@ -497,7 +497,11 @@ static int remove_buf_file_handler(struc
+ return 0;
+ }
+
++#if LINUX_VERSION_IS_GEQ(5,11,0)
+ static const struct rchan_callbacks rfs_spec_scan_cb = {
++#else
++static struct rchan_callbacks rfs_spec_scan_cb = {
++#endif
+ .create_buf_file = create_buf_file_handler,
+ .remove_buf_file = remove_buf_file_handler,
+ };
+--- a/drivers/net/wireless/ath/ath11k/spectral.c
++++ b/drivers/net/wireless/ath/ath11k/spectral.c
+@@ -148,7 +148,11 @@ static int remove_buf_file_handler(struc
+ return 0;
+ }
+
++#if LINUX_VERSION_IS_GEQ(5,11,0)
+ static const struct rchan_callbacks rfs_scan_cb = {
++#else
++static struct rchan_callbacks rfs_scan_cb = {
++#endif
+ .create_buf_file = create_buf_file_handler,
+ .remove_buf_file = remove_buf_file_handler,
+ };
+--- a/drivers/net/wireless/ath/ath9k/common-spectral.c
++++ b/drivers/net/wireless/ath/ath9k/common-spectral.c
+@@ -1053,7 +1053,11 @@ static int remove_buf_file_handler(struc
+ return 0;
+ }
+
++#if LINUX_VERSION_IS_GEQ(5,11,0)
+ static const struct rchan_callbacks rfs_spec_scan_cb = {
++#else
++static struct rchan_callbacks rfs_spec_scan_cb = {
++#endif
+ .create_buf_file = create_buf_file_handler,
+ .remove_buf_file = remove_buf_file_handler,
+ };