From patchwork Thu Sep 6 09:18:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 10590301 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 A338C13BB for ; Thu, 6 Sep 2018 09:21:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9242D2A40D for ; Thu, 6 Sep 2018 09:21:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86BC52A442; Thu, 6 Sep 2018 09:21:53 +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 244A92A40D for ; Thu, 6 Sep 2018 09:21:53 +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=HbBi44Z6p+OMAuf1lN1UzFniWtMtbUMFLtADPEADgqY=; b=YLTCct8/4x5q7gAecTxiPJlcl1 S8IAqSGJHa7CnYrQk3873voPeA28Yukh7DbDNMdQ4AqUPfuIh1G/bhegRKduFOLLhg9JDo4ECrF/s RfILpM5toN6Akif8qCGICWQF/+DhJ6t/Q29PAAFJGOqlwBMDj2OKlWhYO76B2I/rY+8a+VaHPq8TZ R+WmSn6qXkB4RnKT07FYEgsQqxWpoir1mM/4oKm2iCOaGZeEAQ6EbJ84+5OPeV2NvA/Mq3eyiIbS+ p5pwAMrnCDTWsJs7Wk2ScE+jrBVC0bR5VsQzQat44FGLB/j1p/M78Y3iHBLzSEx7+0H0l7Hts1e41 3q3XrsxQ==; 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 1fxqU2-0007FU-89 for patchwork-linux-mediatek@patchwork.kernel.org; Thu, 06 Sep 2018 09:21:50 +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 1fxqS7-0005Cn-V0 for linux-mediatek@lists.infradead.org; Thu, 06 Sep 2018 09:20:13 +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 3167D40216F6; Thu, 6 Sep 2018 09:19:49 +0000 (UTC) Received: from localhost (unknown [10.40.205.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id C0BCEFA973; Thu, 6 Sep 2018 09:19:48 +0000 (UTC) From: Stanislaw Gruszka To: linux-wireless@vger.kernel.org Subject: [PATCH 19/42] mt76x0: remove unused stat work_queue Date: Thu, 6 Sep 2018 11:18:35 +0200 Message-Id: <1536225538-16454-20-git-send-email-sgruszka@redhat.com> In-Reply-To: <1536225538-16454-1-git-send-email-sgruszka@redhat.com> References: <1536225538-16454-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.5]); Thu, 06 Sep 2018 09:19:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 06 Sep 2018 09:19:49 +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-20180906_021952_163922_C03711CB X-CRM114-Status: GOOD ( 10.06 ) 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 From: Lorenzo Bianconi Remove unused tx_status workqueue since now tx feedbacks are processed by mt76-usb layer Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 7 ----- drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 2 -- drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | 30 ---------------------- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 2 -- 4 files changed, 41 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c index 9c4029b3d0ae..5be4c48936e4 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c @@ -511,12 +511,6 @@ struct mt76x0_dev *mt76x0_alloc_device(struct device *pdev) spin_lock_init(&dev->con_mon_lock); atomic_set(&dev->avg_ampdu_len, 1); - dev->stat_wq = alloc_workqueue("mt76x0", WQ_UNBOUND, 0); - if (!dev->stat_wq) { - ieee80211_free_hw(mdev->hw); - return NULL; - } - return dev; } @@ -715,7 +709,6 @@ int mt76x0_register_device(struct mt76x0_dev *dev) dev->mt76.chandef.chan = &dev->mt76.sband_2g.sband.channels[0]; INIT_DELAYED_WORK(&dev->mac_work, mt76x0_mac_work); - INIT_DELAYED_WORK(&dev->stat_work, mt76x0_tx_stat); ret = ieee80211_register_hw(hw); if (ret) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h b/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h index 974ca932333c..f63c44999bdd 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h @@ -132,7 +132,6 @@ struct mt76x0_dev { struct delayed_work cal_work; struct delayed_work mac_work; - struct workqueue_struct *stat_wq; struct delayed_work stat_work; spinlock_t mac_lock; @@ -237,7 +236,6 @@ void mt76x0_mac_set_ampdu_factor(struct mt76x0_dev *dev); void mt76x0_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, struct sk_buff *skb); void mt76x0_tx_status(struct mt76x0_dev *dev, struct sk_buff *skb); -void mt76x0_tx_stat(struct work_struct *work); void mt76x0_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q, struct sk_buff *skb); diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/tx.c b/drivers/net/wireless/mediatek/mt76/mt76x0/tx.c index 2b7ca7cd48c1..de12c769b353 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/tx.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/tx.c @@ -126,33 +126,3 @@ void mt76x0_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q, mt76_rx(&dev->mt76, q, skb); } -void mt76x0_tx_stat(struct work_struct *work) -{ - struct mt76x0_dev *dev = container_of(work, struct mt76x0_dev, - stat_work.work); - struct mt76x02_tx_status stat; - unsigned long flags; - int cleaned = 0; - u8 update = 1; - - while (!test_bit(MT76_REMOVED, &dev->mt76.state)) { - if (!mt76x02_mac_load_tx_status(&dev->mt76, &stat)) - break; - - mt76x02_send_tx_status(&dev->mt76, &stat, &update); - - cleaned++; - } - trace_mt76x0_tx_status_cleaned(&dev->mt76, cleaned); - - spin_lock_irqsave(&dev->tx_lock, flags); - if (cleaned) - queue_delayed_work(dev->stat_wq, &dev->stat_work, - msecs_to_jiffies(10)); - else if (test_and_clear_bit(MT76_MORE_STATS, &dev->mt76.state)) - queue_delayed_work(dev->stat_wq, &dev->stat_work, - msecs_to_jiffies(20)); - else - clear_bit(MT76_READING_STATS, &dev->mt76.state); - spin_unlock_irqrestore(&dev->tx_lock, flags); -} diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c index a5ca74594290..219524c233ee 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c @@ -107,7 +107,6 @@ static int mt76x0_probe(struct usb_interface *usb_intf, usb_set_intfdata(usb_intf, NULL); usb_put_dev(interface_to_usbdev(usb_intf)); - destroy_workqueue(dev->stat_wq); ieee80211_free_hw(dev->mt76.hw); return ret; } @@ -126,7 +125,6 @@ static void mt76x0_disconnect(struct usb_interface *usb_intf) usb_set_intfdata(usb_intf, NULL); usb_put_dev(interface_to_usbdev(usb_intf)); - destroy_workqueue(dev->stat_wq); ieee80211_free_hw(dev->mt76.hw); }