mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-16 09:10:02 +00:00
This patch support calcel a running dfs cac opertaion. Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
74 lines
2.3 KiB
Diff
74 lines
2.3 KiB
Diff
From 762b65d5b4771b7582834e65a1718aaa933349e2 Mon Sep 17 00:00:00 2001
|
|
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
|
Date: Wed, 22 Mar 2023 09:42:24 +0800
|
|
Subject: [PATCH] mac80211: support bypass cac
|
|
|
|
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
|
---
|
|
.../subsys/786-support-bypass-cac.patch | 53 +++++++++++++++++++
|
|
1 file changed, 53 insertions(+)
|
|
create mode 100644 package/kernel/mac80211/patches/subsys/786-support-bypass-cac.patch
|
|
|
|
diff --git a/package/kernel/mac80211/patches/subsys/786-support-bypass-cac.patch b/package/kernel/mac80211/patches/subsys/786-support-bypass-cac.patch
|
|
new file mode 100644
|
|
index 0000000000..8e3850e1f7
|
|
--- /dev/null
|
|
+++ b/package/kernel/mac80211/patches/subsys/786-support-bypass-cac.patch
|
|
@@ -0,0 +1,53 @@
|
|
+Index: backports-5.15.58-1/net/mac80211/debugfs.c
|
|
+===================================================================
|
|
+--- backports-5.15.58-1.orig/net/mac80211/debugfs.c
|
|
++++ backports-5.15.58-1/net/mac80211/debugfs.c
|
|
+@@ -653,6 +653,42 @@ static const struct file_operations scan
|
|
+ .llseek = default_llseek,
|
|
+ };
|
|
+
|
|
++static ssize_t bypass_cac_write(struct file *file, const char __user *ptr,
|
|
++ size_t len, loff_t *off)
|
|
++{
|
|
++ struct ieee80211_local *local = file->private_data;
|
|
++ struct ieee80211_sub_if_data *sdata;
|
|
++
|
|
++ rtnl_lock();
|
|
++ wiphy_lock(local->hw.wiphy);
|
|
++ mutex_lock(&local->mtx);
|
|
++
|
|
++ list_for_each_entry(sdata, &local->interfaces, list) {
|
|
++ struct wireless_dev *wdev = &sdata->wdev;
|
|
++
|
|
++ cancel_delayed_work_sync(&sdata->dfs_cac_timer_work);
|
|
++
|
|
++ if (wdev->cac_started) {
|
|
++ pr_info("bypass cac for %s\n", sdata->name);
|
|
++ wdev->cac_time_ms = 0;
|
|
++ ieee80211_queue_delayed_work(&sdata->local->hw,
|
|
++ &sdata->dfs_cac_timer_work, 0);
|
|
++ }
|
|
++ }
|
|
++
|
|
++ mutex_unlock(&local->mtx);
|
|
++ wiphy_unlock(local->hw.wiphy);
|
|
++ rtnl_unlock();
|
|
++
|
|
++ return len;
|
|
++}
|
|
++
|
|
++static const struct file_operations bypass_cac_ops = {
|
|
++ .write = bypass_cac_write,
|
|
++ .open = simple_open,
|
|
++ .llseek = noop_llseek,
|
|
++};
|
|
++
|
|
+ void debugfs_hw_add(struct ieee80211_local *local)
|
|
+ {
|
|
+ struct dentry *phyd = local->hw.wiphy->debugfsdir;
|
|
+@@ -725,4 +761,5 @@ void debugfs_hw_add(struct ieee80211_loc
|
|
+ DEBUGFS_DEVSTATS_ADD(dot11RTSSuccessCount);
|
|
+
|
|
+ DEBUGFS_ADD(scanning);
|
|
++ DEBUGFS_ADD_MODE(bypass_cac, 0200);
|
|
+ }
|
|
--
|
|
2.34.1
|
|
|