From patchwork Tue Jan 9 13:13:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10152035 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9A7A0602CA for ; Tue, 9 Jan 2018 13:13:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9731E289CD for ; Tue, 9 Jan 2018 13:13:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C0A0289D1; Tue, 9 Jan 2018 13:13:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AA34289CD for ; Tue, 9 Jan 2018 13:13:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757332AbeAINN3 (ORCPT ); Tue, 9 Jan 2018 08:13:29 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:44902 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753992AbeAINNX (ORCPT ); Tue, 9 Jan 2018 08:13:23 -0500 Received: by mail-wr0-f195.google.com with SMTP id w50so4849138wrc.11 for ; Tue, 09 Jan 2018 05:13:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PRHzMbLoOhrH7KBNE+8GkXaqPvOAmP8fBdAL9vHZU34=; b=dXMxvUBNo9D4qEzoNZCaAeSy0y1+8Hst7kvM0aGZpZk/B8NRygzyZXXzFR9KC7iw0p UYGG514yZdKTor7x5XnZp5VdyAnLkyacj7/DDflRhanCCKcbLqkkiemqX78Wuu0cy+pE 9eoN/Uujgf6b1jUD1HfNj91heuGg5PTg9P+r+Mr6sKN1EEV93P2XPqn/qm8Wxi0tM6zf uG3VQ820QfcCnlnYXE0VkaGb/7DqhrKKuBcJXW8NAyfoAb0L5/mXlzkVmFoU0iZhhDgk bYAV3rSuYaddWN6/gyi2Is+tcgxIcQeTwrr7IoVIwfpmh2JrD5oO2CJu0b5PWRJSqW0q 2W+w== X-Gm-Message-State: AKGB3mLziU4Tj+y4trfUvs5E4nglN1fFevKloU28IMU6dgpeIRy3g+I9 scatwoi5H4r/UF6VM5UBjhYV+A== X-Google-Smtp-Source: ACJfBotGPi85Iqnr7lZNfqwXs2MO7mJIEViDrOcq4BLLVxFZd0cvUQWxRmv/kRmlwnW3d07sB+qGxw== X-Received: by 10.223.177.208 with SMTP id r16mr6867727wra.20.1515503601907; Tue, 09 Jan 2018 05:13:21 -0800 (PST) Received: from localhost.localdomain.com (nat-pool-mxp-t.redhat.com. [149.6.153.186]) by smtp.gmail.com with ESMTPSA id 17sm17488732wmq.10.2018.01.09.05.13.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Jan 2018 05:13:21 -0800 (PST) From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org Subject: [PATCH 3/3] mt76x2: dfs: take into account dfs region in mt76x2_dfs_init_params() Date: Tue, 9 Jan 2018 14:13:12 +0100 Message-Id: <380bdfe40558af66959f6658b50b4999a825edcd.1515503003.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: References: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Do not enable DFS state machine if dfs region is set to NL80211_DFS_UNSET Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c index df23ba5ef900..f936dc9a5476 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c @@ -460,7 +460,8 @@ void mt76x2_dfs_init_params(struct mt76x2_dev *dev) { struct cfg80211_chan_def *chandef = &dev->mt76.chandef; - if (chandef->chan->flags & IEEE80211_CHAN_RADAR) { + if ((chandef->chan->flags & IEEE80211_CHAN_RADAR) && + dev->dfs_pd.region != NL80211_DFS_UNSET) { mt76x2_dfs_set_bbp_params(dev); /* enable debug mode */ mt76x2_dfs_set_capture_mode_ctrl(dev, true);