blob: 43504c32247ef62265e15155efd18c7ea0b62c43 [file] [log] [blame]
developer1f55fcf2024-10-17 14:52:33 +08001From 47bd3ed95c21e49cc0c9e34daacdbd3c07ddda49 Mon Sep 17 00:00:00 2001
developerd0c89452024-10-11 16:53:27 +08002From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
3Date: Fri, 22 Dec 2023 17:27:10 +0800
developer1f55fcf2024-10-17 14:52:33 +08004Subject: [PATCH 046/193] mtk: mt76: mt7996: add background radar hw cap check
developerd0c89452024-10-11 16:53:27 +08005
6Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
7---
8 mt7996/debugfs.c | 5 +++++
9 mt7996/mt7996.h | 3 ++-
10 2 files changed, 7 insertions(+), 1 deletion(-)
11
12diff --git a/mt7996/debugfs.c b/mt7996/debugfs.c
developer1f55fcf2024-10-17 14:52:33 +080013index 70a97d2..07970e1 100644
developerd0c89452024-10-11 16:53:27 +080014--- a/mt7996/debugfs.c
15+++ b/mt7996/debugfs.c
16@@ -262,6 +262,11 @@ mt7996_rdd_monitor(struct seq_file *s, void *data)
17
18 mutex_lock(&dev->mt76.mutex);
19
20+ if (!mt7996_has_background_radar(dev)) {
21+ seq_puts(s, "no background radar capability\n");
22+ goto out;
23+ }
24+
25 if (!cfg80211_chandef_valid(chandef)) {
26 ret = -EINVAL;
27 goto out;
28diff --git a/mt7996/mt7996.h b/mt7996/mt7996.h
developer1f55fcf2024-10-17 14:52:33 +080029index 81639a4..142c390 100644
developerd0c89452024-10-11 16:53:27 +080030--- a/mt7996/mt7996.h
31+++ b/mt7996/mt7996.h
32@@ -619,7 +619,8 @@ mt7996_has_background_radar(struct mt7996_dev *dev)
33 return false;
34 break;
35 case 0x7992:
36- if (dev->var.type == MT7992_VAR_TYPE_23)
37+ if (dev->var.type == MT7992_VAR_TYPE_23 ||
38+ dev->var.type == MT7992_VAR_TYPE_24)
39 return false;
40 break;
41 default:
42--
432.45.2
44