From patchwork Thu Jan 18 23:08:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10174225 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 715D8602DC for ; Thu, 18 Jan 2018 23:08:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6982128459 for ; Thu, 18 Jan 2018 23:08:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5ECEE28569; Thu, 18 Jan 2018 23:08:28 +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 1057C28459 for ; Thu, 18 Jan 2018 23:08:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932474AbeARXI1 (ORCPT ); Thu, 18 Jan 2018 18:08:27 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:43179 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932517AbeARXIZ (ORCPT ); Thu, 18 Jan 2018 18:08:25 -0500 Received: by mail-wm0-f67.google.com with SMTP id g1so73493wmg.2 for ; Thu, 18 Jan 2018 15:08:24 -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=5ywimLVBI3KWDxSE8jttIuaDzJMOhDmXqDvLfAo4mh0=; b=IyDM/f4dfmNlgfnHpZTbSTuRYZaoXDAKdG0mvjwhkkIAwJYrhOj3oPzkFIJkbAt5J1 KPhzNM0ux5p+rmHYWww8FyqMkccKXUgUICPK3mnXV2rZAr9hQVji/mT1HmqI0EOs8Kkv +tE53D1GOdXQgf0sj09d4VTW4MQ5maQd5CeFPCdxP2igeNZn4TFAxaVsnMk290M/LrU+ 48mZVEolY7q60HHL5ztEANJlxQczFIN+D+qN3NPNi4pXWCqGdlntnI61I+17P/duYl2B 8Ee7PT38to5KGRqLn0xQdinwdqqbfyTL6aiDLpOGE92Sc3a9v8dJMVhK21SW8CR5jY8Y 0J+w== X-Gm-Message-State: AKwxytcK1tzqduabsEgnv+lRHoNFwKFrTrNzwUQE4cf6ioXhWlOZ1O5A 3M7MyvhD4vCIDB1vBL3sDONsUs7ks7Q= X-Google-Smtp-Source: ACJfBosDlC/eJwuIOoIrT8iO12I/TK4rlWqGTY9i9ODD1nUZs+UN7gv/ZFNRUJplr8j8oUmglClYdg== X-Received: by 10.28.59.69 with SMTP id i66mr6024747wma.159.1516316903831; Thu, 18 Jan 2018 15:08:23 -0800 (PST) Received: from localhost.localdomain.com ([151.66.74.3]) by smtp.gmail.com with ESMTPSA id l40sm254258wre.6.2018.01.18.15.08.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jan 2018 15:08:23 -0800 (PST) From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org Subject: [PATCH 2/2] mt76x2: dfs: disable dfs tasklet during device cleanup Date: Fri, 19 Jan 2018 00:08:14 +0100 Message-Id: <04f915e7611a50fd1c57562e6673baf418e55d3a.1516315624.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 Define mt76x2_dfs_cleanup() routine since it will be helpful to add the support for dfs sw detector Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c | 6 ++++++ drivers/net/wireless/mediatek/mt76/mt76x2_dfs.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 1 + 3 files changed, 8 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c index f936dc9a5476..19ac6edd672a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c @@ -504,3 +504,9 @@ void mt76x2_dfs_set_domain(struct mt76x2_dev *dev, } } +void mt76x2_dfs_cleanup(struct mt76x2_dev *dev) +{ + struct mt76x2_dfs_pattern_detector *dfs_pd = &dev->dfs_pd; + + tasklet_disable(&dfs_pd->dfs_tasklet); +} diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.h b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.h index 8dbc783cc6bc..f70220615bbc 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.h @@ -74,6 +74,7 @@ struct mt76x2_dfs_pattern_detector { }; void mt76x2_dfs_init_params(struct mt76x2_dev *dev); +void mt76x2_dfs_cleanup(struct mt76x2_dev *dev); void mt76x2_dfs_init_detector(struct mt76x2_dev *dev); void mt76x2_dfs_adjust_agc(struct mt76x2_dev *dev); void mt76x2_dfs_set_domain(struct mt76x2_dev *dev, diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c index 66d4bfc70977..2bf861058658 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c @@ -618,6 +618,7 @@ void mt76x2_cleanup(struct mt76x2_dev *dev) mt76x2_stop_hardware(dev); mt76x2_dma_cleanup(dev); mt76x2_mcu_cleanup(dev); + mt76x2_dfs_cleanup(dev); } struct mt76x2_dev *mt76x2_alloc_device(struct device *pdev)