From patchwork Fri Feb 21 00:07:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 216443 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DBFFC11D00 for ; Fri, 21 Feb 2020 00:08:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 58F1F208E4 for ; Fri, 21 Feb 2020 00:08:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582243681; bh=F3ezLyPAEF0ppQSPhDFdznR6I5ZXXQGpYSAVOQZLoAk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ZuDsqI2cTpK8QgTQ4pQ0sDJk75CJedeyxTAQix0Ce/OUym1rbrrorvYxk371xmOy7 wsoCugOkt1sWhxf8DgAZEKtQlU+yAMXoaDrd19p72Uplbej13JKab+e0sOWycGwys7 6Pu78I7v97bqubnr7kyKMF50P4B363rd11bFtvY4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729451AbgBUAIA (ORCPT ); Thu, 20 Feb 2020 19:08:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:38564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729373AbgBUAIA (ORCPT ); Thu, 20 Feb 2020 19:08:00 -0500 Received: from localhost.localdomain (unknown [151.48.137.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 027682071E; Fri, 21 Feb 2020 00:07:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582243680; bh=F3ezLyPAEF0ppQSPhDFdznR6I5ZXXQGpYSAVOQZLoAk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OBIwPGOapgTVkCebjHpRWpLjg8lonPIWNmLgS+d6S9UjpGfVtOOqev1jF5OBs2GzQ ISUK5K/LprLSPWkydvlUm8iHt7lIuK4zSkHX2c2Pwne9sQPA85vR27Oy9/m7FRkLM1 rTl6BqTbd+YjNBxVMvoqL61dJhW5mV17HaqCFvbk= From: Lorenzo Bianconi To: nbd@nbd.name Cc: lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org, sean.wang@mediatek.com, ryder.lee@mediatek.com Subject: [PATCH 3/8] mt76: mt7615: add mt7663 support to mt7615_mcu_set_tx_ba Date: Fri, 21 Feb 2020 01:07:30 +0100 Message-Id: <5708ec66f5b2a8ed55f53a0bb3e43bfb6808835b.1582243031.git.lorenzo@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Extend mt7615_mcu_set_tx_ba routine in order to support mt7663e driver Co-developed-by: Sean Wang Signed-off-by: Sean Wang Co-developed-by: Ryder Lee Signed-off-by: Ryder Lee Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index 7218a3041ead..1b8c8da56b84 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -1746,7 +1746,9 @@ int mt7615_mcu_set_tx_ba(struct mt7615_dev *dev, wtbl_ba->sn = add ? cpu_to_le16(params->ssn) : 0; wtbl_ba->ba_en = add; - if (add) { + if (is_mt7663(&dev->mt76)) { + wtbl_ba->ba_winsize = cpu_to_le16(params->buf_size); + } else if (add) { u8 idx, ba_range[] = { 4, 8, 12, 24, 36, 48, 54, 64 }; for (idx = 7; idx > 0; idx--) {