developer | 1f55fcf | 2024-10-17 14:52:33 +0800 | [diff] [blame^] | 1 | From 47bd3ed95c21e49cc0c9e34daacdbd3c07ddda49 Mon Sep 17 00:00:00 2001 |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame] | 2 | From: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 3 | Date: Fri, 22 Dec 2023 17:27:10 +0800 |
developer | 1f55fcf | 2024-10-17 14:52:33 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 046/193] mtk: mt76: mt7996: add background radar hw cap check |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame] | 5 | |
| 6 | Signed-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 | |
| 12 | diff --git a/mt7996/debugfs.c b/mt7996/debugfs.c |
developer | 1f55fcf | 2024-10-17 14:52:33 +0800 | [diff] [blame^] | 13 | index 70a97d2..07970e1 100644 |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame] | 14 | --- 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; |
| 28 | diff --git a/mt7996/mt7996.h b/mt7996/mt7996.h |
developer | 1f55fcf | 2024-10-17 14:52:33 +0800 | [diff] [blame^] | 29 | index 81639a4..142c390 100644 |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame] | 30 | --- 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 | -- |
| 43 | 2.45.2 |
| 44 | |