Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3127264pxb; Tue, 19 Jan 2021 14:41:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwo14seusQiXUAKRXe0BOSJRa/pR6IZxpdssX87/+pWscw6tNE7GGQ7dylPRJteG7KJe0oA X-Received: by 2002:a17:906:ae4a:: with SMTP id lf10mr4491498ejb.480.1611096098718; Tue, 19 Jan 2021 14:41:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611096098; cv=none; d=google.com; s=arc-20160816; b=pzKV/Oi8BRWR7rLhCl23jKwq7xWsHaHpg9aHRmkzvtZcLxWKq2lpEjMbFqq8lrsYRL TXfyYQenTSuH6DxRqppqIVzc9KqwdvwaF12bQKSF3suzPENYuybUwTfmhU2tq+s1WQ9d OZmscNJqJAfaljSkJcS6QDHviAGjXmJwN+yuwpbtuF3yFgiBl9M8zGguBJ+zWAngBhLQ V5nFCrlWdUoOgB+1wGHTEomaWn48Av9UnwVlDmFlHiGgHPDGlfGm4cyuA7TVGZCf7/TF 28JyFALvYrcBVwOUQsTu14Z2bTSC63HQvAXEoMxoEuYEx24hvpX+rdn7abxs36lThqLc RYfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=gVdFiAdSMIYCT8DjPwNQK/+h0xKtd8CRFhx1qOws3j0=; b=v8hqwZQy4TfRFl3FtJpZgdRB+LGkYV0o4TkbsHpzkVOJ1VtBYCvrwq4uffm7dJ16YC wtPR6bsfr5cDm/dpRfw5svwlG6XtWTwLPhqN++V4ULqiJG5xcYE/Omsd2dO/kW9XiZYe zK/TLVZXTOe5Td/jaHr4mH/VgtvE/SCruH0VQObppoAHI10jPmpyRb/ILZK0ohryzmp3 rqJ4+tqY082+IgYqzGSoS75+8XorR8UkYkQDLEU4tQ7BHfJ2dkcndp31OopEeI3dn6WR 5dsY1QJJFt+JPhUcKK1VvvkrB3PvGXHdWOcHkPUUiRkiRgFGv4piyKGe42NN+zUqtm66 ycXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b="DruICp/4"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j21si77686edh.58.2021.01.19.14.41.15; Tue, 19 Jan 2021 14:41:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b="DruICp/4"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390356AbhASOgl (ORCPT + 99 others); Tue, 19 Jan 2021 09:36:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389637AbhASKGp (ORCPT ); Tue, 19 Jan 2021 05:06:45 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A58B3C061575 for ; Tue, 19 Jan 2021 02:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=gVdFiAdSMIYCT8DjPwNQK/+h0xKtd8CRFhx1qOws3j0=; b=DruICp/4XLbJWdtMUYTNEa04PK ThIf+7SuRR9FAsBYonoijDaT7hPFkhAfaemFxhrnT6aprGdARI6fPXsb2JhC737aNbzgvycw985jG T3O9GSgB3bY1lfkPKl0R2bjATA3NjLd8QwerWaiddfIEpbL7PLixwbSioRQe3KoU4YaI=; Received: from p54ae91f2.dip0.t-ipconnect.de ([84.174.145.242] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1l1nti-0004Zi-Ff for linux-wireless@vger.kernel.org; Tue, 19 Jan 2021 11:06:02 +0100 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 2/2] mt76: mt7915: bring up the WA event rx queue for band1 Date: Tue, 19 Jan 2021 11:06:00 +0100 Message-Id: <20210119100600.27949-2-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210119100600.27949-1-nbd@nbd.name> References: <20210119100600.27949-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This is needed for DBDC cards to work correctly on both bands simultaneously Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt76.h | 1 + drivers/net/wireless/mediatek/mt76/mt7915/dma.c | 8 ++++++++ drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 1 + drivers/net/wireless/mediatek/mt76/mt7915/pci.c | 4 ++++ drivers/net/wireless/mediatek/mt76/mt7915/regs.h | 3 ++- 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index 7a7776f38f44..90fbdaec8b89 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76.h +++ b/drivers/net/wireless/mediatek/mt76/mt76.h @@ -81,6 +81,7 @@ enum mt76_rxq_id { MT_RXQ_MCU, MT_RXQ_MCU_WA, MT_RXQ_EXT, + MT_RXQ_EXT_WA, __MT_RXQ_MAX }; diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/dma.c b/drivers/net/wireless/mediatek/mt76/mt7915/dma.c index 8c1f9c77b14f..d47d8f4376c6 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/dma.c @@ -286,6 +286,14 @@ int mt7915_dma_init(struct mt7915_dev *dev) rx_buf_size, MT_RX_DATA_RING_BASE); if (ret) return ret; + + /* event from WA */ + ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_EXT_WA], + MT7915_RXQ_MCU_WA_EXT, + MT7915_RX_MCU_RING_SIZE, + rx_buf_size, MT_RX_EVENT_RING_BASE); + if (ret) + return ret; } ret = mt76_init_queues(dev); diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h index f45e88bf2626..a5882faa62ce 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h @@ -61,6 +61,7 @@ enum mt7915_rxq_id { MT7915_RXQ_BAND1, MT7915_RXQ_MCU_WM = 0, MT7915_RXQ_MCU_WA, + MT7915_RXQ_MCU_WA_EXT, }; struct mt7915_sta_stats { diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/pci.c b/drivers/net/wireless/mediatek/mt76/mt7915/pci.c index aeb86fbea41c..99f11588601d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/pci.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/pci.c @@ -26,6 +26,7 @@ mt7915_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q) [MT_RXQ_EXT] = MT_INT_RX_DONE_DATA1, [MT_RXQ_MCU] = MT_INT_RX_DONE_WM, [MT_RXQ_MCU_WA] = MT_INT_RX_DONE_WA, + [MT_RXQ_EXT_WA] = MT_INT_RX_DONE_WA_EXT, }; mt7915_irq_enable(dev, rx_irq_mask[q]); @@ -67,6 +68,9 @@ static irqreturn_t mt7915_irq_handler(int irq, void *dev_instance) if (intr & MT_INT_RX_DONE_WA) napi_schedule(&dev->mt76.napi[MT_RXQ_MCU_WA]); + if (intr & MT_INT_RX_DONE_WA_EXT) + napi_schedule(&dev->mt76.napi[MT_RXQ_EXT_WA]); + if (intr & MT_INT_MCU_CMD) { u32 val = mt76_rr(dev, MT_MCU_CMD); diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/regs.h b/drivers/net/wireless/mediatek/mt76/mt7915/regs.h index 6fb5cbab9c32..77402eb13b9c 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/regs.h +++ b/drivers/net/wireless/mediatek/mt76/mt7915/regs.h @@ -348,7 +348,8 @@ #define MT_INT_RX_DONE_DATA1 BIT(17) #define MT_INT_RX_DONE_WM BIT(0) #define MT_INT_RX_DONE_WA BIT(1) -#define MT_INT_RX_DONE_ALL (BIT(0) | BIT(1) | GENMASK(17, 16)) +#define MT_INT_RX_DONE_WA_EXT BIT(2) +#define MT_INT_RX_DONE_ALL (GENMASK(2, 0) | GENMASK(17, 16)) #define MT_INT_TX_DONE_MCU_WA BIT(15) #define MT_INT_TX_DONE_FWDL BIT(26) #define MT_INT_TX_DONE_MCU_WM BIT(27) -- 2.28.0