From patchwork Thu Sep 6 09:18:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 10590313 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 C90DC13BB for ; Thu, 6 Sep 2018 09:22:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B72112A40D for ; Thu, 6 Sep 2018 09:22:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AADBB2A442; Thu, 6 Sep 2018 09:22:25 +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 262602A40D for ; Thu, 6 Sep 2018 09:22:25 +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=S9ZkknM3e9B8sXtu1iuYk7v+mK4SSHevpp/63uogJPk=; b=BlLNfQ7UcQ+by+jXsFGNQigljh qzjlegS4/R9CCfNKTgerqTy6Wm1gCzhCwbofGYuA9mZM7PMweR03/NUWfQxVyLynFUJ/7qZZrMJIg FB6KjQ295QILBiPQdgaTJAm0StAKiOF+j8hs5nNXaHDtPgc98Xqzv90ord9IoM5RSaJI/Cx4Iyrc6 j3inBQX2wwN2kmy49dOmFOc+5vpIoVpshh2j8DlQ+UgsgbzKYOl8zaRQA7z52onenyez4hHEG6Z+v /S+r2ZpwUv+rr8pmgL74JVgmVuFLli5zq4fu3w6GyzAfdMaaT7GZkuEmK4ZeUHvb4bsbZ+UWDI42I vVyYsD1w==; 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 1fxqUS-0007Z9-3g for patchwork-linux-mediatek@patchwork.kernel.org; Thu, 06 Sep 2018 09:22:16 +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 1fxqSJ-0005EV-J5 for linux-mediatek@lists.infradead.org; Thu, 06 Sep 2018 09:20:20 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ABFB387AA9; Thu, 6 Sep 2018 09:19:52 +0000 (UTC) Received: from localhost (unknown [10.40.205.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6296D2166B41; Thu, 6 Sep 2018 09:19:50 +0000 (UTC) From: Stanislaw Gruszka To: linux-wireless@vger.kernel.org Subject: [PATCH 20/42] mt76x0: remove unused {tx/rx}_queue definitions Date: Thu, 6 Sep 2018 11:18:36 +0200 Message-Id: <1536225538-16454-21-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.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 06 Sep 2018 09:19:52 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 06 Sep 2018 09:19:52 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.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_022003_842015_0093F961 X-CRM114-Status: UNSURE ( 9.06 ) X-CRM114-Notice: Please train this message. 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_queue and rx_queue definitions since now mt76x0 driver uses mt76-usb {tx/rx}_queues Signed-off-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 2 - drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 50 ---------------------- 2 files changed, 52 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c index 5be4c48936e4..a7d6e747f221 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c @@ -505,8 +505,6 @@ struct mt76x0_dev *mt76x0_alloc_device(struct device *pdev) mutex_init(&dev->usb_ctrl_mtx); mutex_init(&dev->reg_atomic_mutex); mutex_init(&dev->hw_atomic_mutex); - spin_lock_init(&dev->tx_lock); - spin_lock_init(&dev->rx_lock); spin_lock_init(&dev->mac_lock); spin_lock_init(&dev->con_mon_lock); atomic_set(&dev->avg_ampdu_len, 1); diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h b/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h index f63c44999bdd..6ba5e9ba2c7f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h @@ -40,13 +40,6 @@ #define MT_USB_AGGR_SIZE_LIMIT 21 /* * 1024B */ #define MT_USB_AGGR_TIMEOUT 0x80 /* * 33ns */ -struct mt76x0_dma_buf { - struct urb *urb; - void *buf; - dma_addr_t dma; - size_t len; -}; - struct mac_stats { u64 rx_stat[6]; u64 tx_stat[6]; @@ -55,38 +48,6 @@ struct mac_stats { u64 zero_len_del[2]; }; -#define N_RX_ENTRIES 16 -struct mt76x0_rx_queue { - struct mt76x0_dev *dev; - - struct mt76x0_dma_buf_rx { - struct urb *urb; - struct page *p; - } e[N_RX_ENTRIES]; - - unsigned int start; - unsigned int end; - unsigned int entries; - unsigned int pending; -}; - -#define N_TX_ENTRIES 64 - -struct mt76x0_tx_queue { - struct mt76x0_dev *dev; - - struct mt76x0_dma_buf_tx { - struct urb *urb; - struct sk_buff *skb; - } e[N_TX_ENTRIES]; - - unsigned int start; - unsigned int end; - unsigned int entries; - unsigned int used; - unsigned int fifo_seq; -}; - struct mt76x0_eeprom_params; #define MT_EE_TEMPERATURE_SLOPE 39 @@ -108,9 +69,6 @@ enum mt_bw { * struct mt76x0_dev - adapter structure * @lock: protects @wcid->tx_rate. * @mac_lock: locks out mac80211's tx status and rx paths. - * @tx_lock: protects @tx_q and changes of MT76_STATE_*_STATS - * flags in @state. - * @rx_lock: protects @rx_q. * @con_mon_lock: protects @ap_bssid, @bcn_*, @avg_rssi. * @mutex: ensures exclusive access from mac80211 callbacks. * @reg_atomic_mutex: ensures atomicity of indirect register accesses @@ -146,16 +104,8 @@ struct mt76x0_dev { u32 debugfs_reg; - /* TX */ - spinlock_t tx_lock; - struct mt76x0_tx_queue *tx_q; - atomic_t avg_ampdu_len; - /* RX */ - spinlock_t rx_lock; - struct mt76x0_rx_queue rx_q; - /* Connection monitoring things */ spinlock_t con_mon_lock; u8 ap_bssid[ETH_ALEN];