From 01fa5ace01d2ddfe97820410f201e2c7f68ce712 Mon Sep 17 00:00:00 2001
From: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: Wed, 11 Dec 2019 17:32:16 +0100
Subject: [PATCH] wifi: restore radar rssi threshold after wifi firmware crash

---
 ...-threshold-value-before-vap-activate.patch | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 lq-wave-300_5_x/iopsys_patches/13-set-radar-threshold-value-before-vap-activate.patch

diff --git a/lq-wave-300_5_x/iopsys_patches/13-set-radar-threshold-value-before-vap-activate.patch b/lq-wave-300_5_x/iopsys_patches/13-set-radar-threshold-value-before-vap-activate.patch
new file mode 100644
index 0000000..c0d84df
--- /dev/null
+++ b/lq-wave-300_5_x/iopsys_patches/13-set-radar-threshold-value-before-vap-activate.patch
@@ -0,0 +1,28 @@
+From bec8be83f90a8bb541a1fa457d2d40e553202111 Mon Sep 17 00:00:00 2001
+From: Anjan Chanda <anjan.chanda@iopsys.eu>
+Date: Wed, 11 Dec 2019 17:05:15 +0100
+Subject: [PATCH] set radar threshold value before vap activate
+
+---
+ wireless/driver/linux/core.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/wireless/driver/linux/core.c b/wireless/driver/linux/core.c
+index 55a3baf..cb61c77 100644
+--- a/wireless/driver/linux/core.c
++++ b/wireless/driver/linux/core.c
+@@ -2315,6 +2315,11 @@ int mtlk_mbss_send_vap_activate(struct nic *nic, u8 band)
+     }
+   }
+ 
++  result = mtlk_core_cfg_recovery_radar_rssi_threshold(nic);
++  if (result != MTLK_ERR_OK) {
++    ELOG_V("Failed to set RadarRssiTh!");
++  }
++
+   /* FIXME this thing is supposed to get removed soon */
+   if (MTLK_ERR_OK != (result = _mtlk_mbss_preactivate_if_needed(nic, FALSE)))
+   {
+-- 
+2.7.4
+
-- 
GitLab