Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp176024pxf; Thu, 25 Mar 2021 01:08:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDbf5zNp9cTRO8py7mlP/chvTqFaxarPYXMWUnYsbrrdgC3ZcZdI4twHQ4YYmVCb+NUf9j X-Received: by 2002:a17:906:cf90:: with SMTP id um16mr8150078ejb.389.1616659697099; Thu, 25 Mar 2021 01:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616659697; cv=none; d=google.com; s=arc-20160816; b=APSqjJQ7m5+GC/FVdjQ+AyH5n7Fo2Y3BWM31MhLk6U9KTD9Hnk6D1J4EQD2eR6p5xi PVGzqHAacCrtQAlXdkTIVNcry/ejj62s5mSG5u0G1sq6en9DAFPEgL7dAvAwMyt/Lqki QTEUK9mWiObydhc4K1bnNPUSuOAUk0Q9GkUyKZ33oqPUJJ0QBJL5s0My1lf/zTIrSzrF TPFFVBe3W3h/Iasfe5FSdkhbu+NuYLps04vkwrwE/oGEfCXlzfEZt54V8TOXJ9+mALKZ aeZsEC2gmK/8z11Qyq5QiJbrP/wy7lMLaJEdVMHArNq/JZgvn/WLxcV9vcTDKy1jAnd3 Q+hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=cki4AUsmOco30HKv9UIEldKc+HaLQDr5r14wH283RD8=; b=GX2XrEyVCzAQKAZTiH0R9b+w912YCdgItT1a5KR7k/wFc9S4J6pd2mZ3sAndybS6u5 4B2+sLH8dOn49sbA4qXuhKTVFg5YXzsp5/Z0XVSno4Gy0xIjcmw/qArrqkADJOJmpFwX hBMLJN31b3wOrtFcyuRI7lmo4QSGewpZZ3UVDzlPGnc9rRfS4CPMMW+GbiXgek0pr9WW bMuk7T22qB8xVdklALLJIYhB8/Q/F6aBoADa3kWXcK+siGek59kFxm8ZrpXDS0GEsQnp AGY7yL2R8Boci/KiggC94bQx1l0xo7RHuAlj1e73F2J2FlN9VqlTyIQ9uMI7/aFMmRM5 SGkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l1si3700207ejh.597.2021.03.25.01.07.54; Thu, 25 Mar 2021 01:08:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbhCYIGa (ORCPT + 99 others); Thu, 25 Mar 2021 04:06:30 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:41878 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229979AbhCYIGP (ORCPT ); Thu, 25 Mar 2021 04:06:15 -0400 X-UUID: 800a1a60cd484f3f853a8099d39a9653-20210325 X-UUID: 800a1a60cd484f3f853a8099d39a9653-20210325 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 922555349; Thu, 25 Mar 2021 16:06:10 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 25 Mar 2021 16:06:07 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 25 Mar 2021 16:06:07 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee Subject: [PATCH 1/5] mt76: mt7615: only enable DFS test knobs for mt7615 Date: Thu, 25 Mar 2021 16:06:01 +0800 Message-ID: <20744fae1cbe0dcc098b3112b0a5ccb0b6254587.1616657048.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: E78712D97A52E628E3E6A02C6AA7D2A28D243A51270B44D3489959BDF49FF3602000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org DFS knobs should not be visible to non-DFS devices. Signed-off-by: Ryder Lee --- .../wireless/mediatek/mt76/mt7615/debugfs.c | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c index 7ae48b4fa564..1b414220521a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c @@ -517,18 +517,23 @@ int mt7615_init_debugfs(struct mt7615_dev *dev) &fops_pm_idle_timeout); debugfs_create_devm_seqfile(dev->mt76.dev, "radio", dir, mt7615_radio_read); - debugfs_create_u32("dfs_hw_pattern", 0400, dir, &dev->hw_pattern); - /* test pattern knobs */ - debugfs_create_u8("pattern_len", 0600, dir, - &dev->radar_pattern.n_pulses); - debugfs_create_u32("pulse_period", 0600, dir, - &dev->radar_pattern.period); - debugfs_create_u16("pulse_width", 0600, dir, - &dev->radar_pattern.width); - debugfs_create_u16("pulse_power", 0600, dir, - &dev->radar_pattern.power); - debugfs_create_file("radar_trigger", 0200, dir, dev, - &fops_radar_pattern); + + if (is_mt7615(&dev->mt76)) { + debugfs_create_u32("dfs_hw_pattern", 0400, dir, + &dev->hw_pattern); + /* test pattern knobs */ + debugfs_create_u8("pattern_len", 0600, dir, + &dev->radar_pattern.n_pulses); + debugfs_create_u32("pulse_period", 0600, dir, + &dev->radar_pattern.period); + debugfs_create_u16("pulse_width", 0600, dir, + &dev->radar_pattern.width); + debugfs_create_u16("pulse_power", 0600, dir, + &dev->radar_pattern.power); + debugfs_create_file("radar_trigger", 0200, dir, dev, + &fops_radar_pattern); + } + debugfs_create_file("reset_test", 0200, dir, dev, &fops_reset_test); debugfs_create_devm_seqfile(dev->mt76.dev, "temperature", dir, -- 2.18.0