Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp666637rwe; Fri, 26 Aug 2022 11:56:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR6ePMj+VLos4x0T9STh++ESncJ2Jda9Q38rRayMtHGrG2EqnQbii9Vexo1GEzPgyPRqqMtw X-Received: by 2002:a17:90a:7086:b0:1fa:f82c:ce7b with SMTP id g6-20020a17090a708600b001faf82cce7bmr5868795pjk.38.1661540190587; Fri, 26 Aug 2022 11:56:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661540190; cv=none; d=google.com; s=arc-20160816; b=XUnlK31+lioF3X2Tiwm8YG+gmqR3VFP7HKGAjSgrsY3GFrUyq9ViTQsXaKh5QC51P0 8Dz/avl+AwXqXdMnPvZ/eG9oqU3bprfeTV/DMamcCBmzTEsJ2Xow166Jt54X71gvhMDA E+eEEZwAsgixGdcfVznrIxUXkUYfdhN7maCul/HLdlKXUOw15Q7QpDfyimpd+rM9X0vJ LekeWnakOC6upe3WT0RnHh0yL8VTUVT2/VOaR1aANn3jTcWVL4DgKE5A2P9dM1MUu+27 /lb56bhH5zpHPg8R2UgMziqZz7r4mYXMoo2u+evCTEta2zrBWVwM0oHK1rRqmlP+EuRv 33NQ== 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 :message-id:date:subject:cc:to:from; bh=d60dSFxloJXoVW1jQU0abstCBtaj5ZlRTyoB5UiB8ao=; b=NhtSFu1z+KdjU+En9ffmtXSMHkSybatu5TE/pi20cHpVNFlNerDIcA+pVwEadOi8dg vUhw5DhXXJTsFGHcXPG5dWWlHiAYBeVl4q+hPlXAkbNlLvyIr2PBjEn/UX28JO1qZZz4 aI1AVSAF8t0Bh7PHVbvh2aXhPFoYsQ9NTw25czYjnfC8ZZDmvP3ANdZpXnbYkhu8fxkH iB+Xe6rOvHltPTJx2IZpmMqJygm2W2EuSWcYNehPS8Qwjzc6FkCWoQH3UoDvwGkRieXr 2CiKXI2DrrK07roNB9fOEJIt7zXj/iq0BlXFPYbfRZXuz6OBqQWuDHMJUU9Fkb4TPvaN lntQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne20-20020a17090b375400b001f73d0d9204si2375777pjb.29.2022.08.26.11.56.18; Fri, 26 Aug 2022 11:56:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345243AbiHZS4L (ORCPT + 64 others); Fri, 26 Aug 2022 14:56:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345521AbiHZSzu (ORCPT ); Fri, 26 Aug 2022 14:55:50 -0400 X-Greylist: delayed 1682 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 26 Aug 2022 11:51:38 PDT Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AA604505E for ; Fri, 26 Aug 2022 11:51:35 -0700 (PDT) Received: from p200300daa713fa00d95ad2224e59825a.dip0.t-ipconnect.de ([2003:da:a713:fa00:d95a:d222:4e59:825a] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1oRdzP-0003Hc-FH; Fri, 26 Aug 2022 20:23:31 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: kvalo@kernel.org Subject: [PATCH 6.0] wifi: mt76: fix reading current per-tid starting sequence number for aggregation Date: Fri, 26 Aug 2022 20:23:29 +0200 Message-Id: <20220826182329.18155-1-nbd@nbd.name> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The code was accidentally shifting register values down by tid % 32 instead of (tid * field_size) % 32. Cc: stable@vger.kernel.org Fixes: a28bef561a5c ("mt76: mt7615: re-enable offloading of sequence number assignment") Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index ad6c7d632eed..d6aae60c440d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -1088,7 +1088,7 @@ u32 mt7615_mac_get_sta_tid_sn(struct mt7615_dev *dev, int wcid, u8 tid) offset %= 32; val = mt76_rr(dev, addr); - val >>= (tid % 32); + val >>= offset; if (offset > 20) { addr += 4; -- 2.36.1