From patchwork Tue Sep 4 14:41:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 10587455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C97F1174C for ; Tue, 4 Sep 2018 14:42:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B820229A07 for ; Tue, 4 Sep 2018 14:42:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACD2429A0C; Tue, 4 Sep 2018 14:42:38 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2539C29A07 for ; Tue, 4 Sep 2018 14:42:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=3DxQvyf11EYWtKrk7Ny/8cp034a+AMGTMllnOCcvhtk=; b=VGMN5KEIb6esrVMpp7MyJu0xKX ku5b8vQmF41iC52/UR1cb0yylo0G9hdzeXo8+z9h815Xc5LSWeotyGPMCYe8vihNkfoO0gIMoL7YR wwI2bAXrc8K7YpPXFVQtk/Uo0wi42FTW3E2mDHM4o8kiwhmMejiQGGjsiS5otoSwc8mtXAQxwqNqo QgJIThj0BlL1IqML6Y7qB4pBG6r+8sYOlCNACTCWpG4Ha2mZ8Jv9XLHAhuv/REdZgT0S2R33HhuOa FGrFmlcgAyogH8T3tUwd/5XVy6tJ0fKfO1C5INMohMU8D0G06JKy4Ld6jr1pkxWoPtPAaEZaHJKGW ZJtaE4QQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxCXJ-0005GH-Fx for patchwork-linux-mediatek@patchwork.kernel.org; Tue, 04 Sep 2018 14:42:33 +0000 Received: from mx3-rdu2.redhat.com ([66.187.233.73] helo=mx1.redhat.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxCX9-00057Q-4m for linux-mediatek@lists.infradead.org; Tue, 04 Sep 2018 14:42:26 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5037E2634A; Tue, 4 Sep 2018 14:42:16 +0000 (UTC) Received: from localhost (ovpn-204-92.brq.redhat.com [10.40.204.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB5CEA9E95; Tue, 4 Sep 2018 14:42:14 +0000 (UTC) From: Stanislaw Gruszka To: linux-wireless@vger.kernel.org Subject: [PATCH 12/22] mt76: unify remove_interface Date: Tue, 4 Sep 2018 16:41:05 +0200 Message-Id: <1536072075-6990-13-git-send-email-sgruszka@redhat.com> In-Reply-To: <1536072075-6990-1-git-send-email-sgruszka@redhat.com> References: <1536072075-6990-1-git-send-email-sgruszka@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 04 Sep 2018 14:42:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 04 Sep 2018 14:42:16 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'sgruszka@redhat.com' RCPT:'' X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180904_074223_423734_B9773D2D X-CRM114-Status: GOOD ( 10.76 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Bianconi , linux-mediatek@lists.infradead.org, Felix Fietkau MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use common remove_interface callback in mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 10 +--------- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 9 +++++++++ drivers/net/wireless/mediatek/mt76/mt76x02_util.h | 2 ++ drivers/net/wireless/mediatek/mt76/mt76x2_common.c | 9 --------- drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x2u_main.c | 2 +- 6 files changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c index a818a47f8e4e..d8efa009126c 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c @@ -62,14 +62,6 @@ static int mt76x0_add_interface(struct ieee80211_hw *hw, return 0; } -static void mt76x0_remove_interface(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) -{ - struct mt76x0_dev *dev = hw->priv; - - mt76_txq_remove(&dev->mt76, vif->txq); -} - static int mt76x0_config(struct ieee80211_hw *hw, u32 changed) { struct mt76x0_dev *dev = hw->priv; @@ -203,7 +195,7 @@ const struct ieee80211_ops mt76x0_ops = { .start = mt76x0_start, .stop = mt76x0_stop, .add_interface = mt76x0_add_interface, - .remove_interface = mt76x0_remove_interface, + .remove_interface = mt76x02_remove_interface, .config = mt76x0_config, .configure_filter = mt76x02_configure_filter, .bss_info_changed = mt76x0_bss_info_changed, diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c index 706f522f11d9..69f19ef361a1 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c @@ -127,6 +127,15 @@ void mt76x02_vif_init(struct mt76_dev *dev, struct ieee80211_vif *vif, } EXPORT_SYMBOL_GPL(mt76x02_vif_init); +void mt76x02_remove_interface(struct ieee80211_hw *hw, + struct ieee80211_vif *vif) +{ + struct mt76_dev *dev = hw->priv; + + mt76_txq_remove(dev, vif->txq); +} +EXPORT_SYMBOL_GPL(mt76x02_remove_interface); + int mt76x02_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_ampdu_params *params) { diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.h b/drivers/net/wireless/mediatek/mt76/mt76x02_util.h index 54f895d8cdbe..a61c9f2b9a62 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.h @@ -28,6 +28,8 @@ int mt76x02_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, void mt76x02_vif_init(struct mt76_dev *dev, struct ieee80211_vif *vif, unsigned int idx); +void mt76x02_remove_interface(struct ieee80211_hw *hw, + struct ieee80211_vif *vif); int mt76x02_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_ampdu_params *params); diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_common.c b/drivers/net/wireless/mediatek/mt76/mt76x2_common.c index 5ce9fbc654a2..be4e00fe7586 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_common.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_common.c @@ -18,15 +18,6 @@ #include "mt76x2.h" #include "mt76x02_mac.h" -void mt76x2_remove_interface(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) -{ - struct mt76x2_dev *dev = hw->priv; - - mt76_txq_remove(&dev->mt76, vif->txq); -} -EXPORT_SYMBOL_GPL(mt76x2_remove_interface); - void mt76x2_sta_rate_tbl_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c index 87302845d582..128a1c1c0f64 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c @@ -314,7 +314,7 @@ const struct ieee80211_ops mt76x2_ops = { .start = mt76x2_start, .stop = mt76x2_stop, .add_interface = mt76x2_add_interface, - .remove_interface = mt76x2_remove_interface, + .remove_interface = mt76x02_remove_interface, .config = mt76x2_config, .configure_filter = mt76x02_configure_filter, .bss_info_changed = mt76x2_bss_info_changed, diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2u_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2u_main.c index 1dcc6ced15a5..66a923a32e51 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2u_main.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2u_main.c @@ -164,7 +164,7 @@ const struct ieee80211_ops mt76x2u_ops = { .start = mt76x2u_start, .stop = mt76x2u_stop, .add_interface = mt76x2u_add_interface, - .remove_interface = mt76x2_remove_interface, + .remove_interface = mt76x02_remove_interface, .sta_add = mt76x02_sta_add, .sta_remove = mt76x02_sta_remove, .set_key = mt76x02_set_key,