Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4091384rwl; Tue, 28 Mar 2023 02:25:59 -0700 (PDT) X-Google-Smtp-Source: AKy350Y7D0xdp2SZ8lkyyFybb5OD993e4f3Gj+gUEWwCvHktiWmZMOmhlT40Ad+sCj79xVmyUnOW X-Received: by 2002:a17:90b:3e86:b0:23d:e2b:cf1f with SMTP id rj6-20020a17090b3e8600b0023d0e2bcf1fmr14480337pjb.16.1679995558775; Tue, 28 Mar 2023 02:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679995558; cv=none; d=google.com; s=arc-20160816; b=S8Jc9IEPwQ/vff/nMSYDd8mejyX9+7tQSQ5NS21FGEwzvv0Nl250MrfYIoiG/KaP2H k59uD+Q38gfOkD247kFn5Ryn3rblcFlsgmmBnRcwq+2RLGMYBtQjA0itoCi0vngGMrxz AOsw14eSQqr9J9tcnttoQqib7cVyptbks/0z4o2vClIReqEbbq0PBGtWtAfW5NpSAsBp KvlLHJuzy4/gnk151sb9a5fgMiVXFAF+mwTsEwOg0K+zsvB4K8LQjyKaREM/TyB8iZyh xB9HwJKbmZ1E1W8d+rtAfUbR287o2j3YXGj5s9wl4uHC1dbBVLOOIILXC6ZbL1jst4vz JEzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:content-transfer-encoding :mime-version:to:reply-to:from:subject:date:message-id :dkim-signature; bh=myO0D6XH8p9pXGY2VVO/A9aXEXWQC+cb0pvqnft8hiU=; b=i7ZmxkeS213esF6LLWeu1ngLk4HyzfmWelZnEF5sAjqTmpCSwFG7HUHJmlv5qD6N9I nf+PSOOPXClyylkI9e8Z+rMBrrxmd/8auEhxhhmXGGtIR0ed1WUlHJ1PAh6notCWmQOO WWOtK+WYO0C0jAy24Ry5wJlIK82/6BcJZQOxfQXJ1zyHC6EKu3r/cAB95EJ/DMVaizlq IircF8osyU7ht1UDycstLTXlnnVSZmxtDGFJYNtRGA+aBtHXz3vCiK2GFO+XGM6fxmwt a123y0x6B0lTIGvXjsaStJhxFYLDBEhd1Ptx8P3vxJJtDgo8LuNL60Iz/6dJ6cdlkflT 5nbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fls.name header.s=20200831 header.b=4XqLSJej; 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 f7-20020a17090a638700b00233fdfd70fdsi7884600pjj.18.2023.03.28.02.25.51; Tue, 28 Mar 2023 02:25:58 -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; dkim=pass header.i=@fls.name header.s=20200831 header.b=4XqLSJej; 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 S230403AbjC1JYG (ORCPT + 60 others); Tue, 28 Mar 2023 05:24:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229778AbjC1JYE (ORCPT ); Tue, 28 Mar 2023 05:24:04 -0400 Received: from smtp-8fad.mail.infomaniak.ch (smtp-8fad.mail.infomaniak.ch [IPv6:2001:1600:3:17::8fad]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FD305FF2 for ; Tue, 28 Mar 2023 02:24:01 -0700 (PDT) Received: from smtp-3-0001.mail.infomaniak.ch (unknown [10.4.36.108]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4Pm44Z4HtyzMqKxP for ; Tue, 28 Mar 2023 11:23:58 +0200 (CEST) Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4Pm44Z2BbyzMqmNM for ; Tue, 28 Mar 2023 11:23:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fls.name; s=20200831; t=1679995438; bh=4ba78suVH5BCk/pT1Aw/f9HveXrg0Z+HKhSJMcyxDYM=; h=Date:Subject:From:Reply-To:To:References:In-Reply-To:From; b=4XqLSJejLYcvX77xD7g9f8XwPFgbXz8du99HKccdtLqxPfT4MIJLl2ohFqDecgqTB nEqAHrqP3WcTnvg14cMCbHUaleAgAyH0nl/DvrS8cxYkYZEcjNFNoZTGfmOO34aTzb XateHQ4Ag4/YCwsgIh5Kw9gjqVcnqKO6Ed3Jparg= Message-ID: <943d0ea35c97f2e8076f127dbb43f5bf@mail.infomaniak.com> Date: Tue, 28 Mar 2023 11:23:54 +0200 Subject: Re: wifi: mt76: mt7915e: mt7916 monitor ampdu id is invalid From: Florian Schmidt Reply-To: Florian Schmidt To: "linux-wireless@vger.kernel.org" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-WS-User-Origin: eyJpdiI6ImFQWitJYXdBWTRxK1pVNk5TQmcvMXc9PSIsInZhbHVlIjoiT2pGd0liVXJjNWRYRjlXeUdyT3N2Zz09IiwibWFjIjoiMjFjYTBkMzNlZDFhMWI3MWUyNTQ1MmViZjMxMWI0ZjIzMGQxNGI5ZDQyYWU0ZmNiMDZiNjczZThlZTgzZGNmNSIsInRhZyI6IiJ9 X-WS-User-Mbox: eyJpdiI6IjR6dTZ4eTh0MGZQREtwdVE2cTJlZHc9PSIsInZhbHVlIjoiRFZUeG1LUk91d0FsZU5vcU1sUUZVQT09IiwibWFjIjoiM2E4MTIxYTQwOWViMjc4Y2YyMWI4OGRkYjIwNGY0M2FkN2I4ZDY1ZWY4MGIzOWYwNzM3NWY4OTZmYTViYmM1MCIsInRhZyI6IiJ9 X-WS-Location: eJxzKUpMKykGAAfpAmU- X-Mailer: Infomaniak Workspace (1.3.472) References: <2f3ea768bc27a26918a4e8a4363b8c97@mail.infomaniak.com> In-Reply-To: <2f3ea768bc27a26918a4e8a4363b8c97@mail.infomaniak.com> X-Infomaniak-Routing: alpha X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 > Hi all, >=20 > Using a mt7916 in monitor mode, I see that the AMPDU reference number is = incremented for each part of a single AMPDU. Instead it should be constant,= and ideally, the last subframe field should be set on the last part of the= AMPDU. Capturing the same traffic with an intel AX200 show each parts of t= he AMPDU with the same id as expected. >=20 > This issue is still present using kernel from tag wireless-testing-2023-0= 3-16. >=20 > How can I be of any assist investigating and fixing this issue? >=20 > Thanks, > Florian Replying to myself, it look like a firmware issue.=20 I dived a bit in the code. Toying with the code snippet below (from mt7915/= mac.c), show that the firmware actually does something incorrect. It never = increment the ampu_ref. This would be okay because the code below increment= the ampdu_ref when the timestamp are the same for all parts of the ampdu, = unfortunately, the firmware put a different timestamp to each part of the A= MPDU. Because of those two conditions, the ampdu_ref is simply incremented = by the driver for every single packet even when parts of the same AMPDU. /* all subframes of an A-MPDU have the same timestamp */ if (phy->rx_ampdu_ts !=3D status->timestamp) { =09dev_warn(dev->mt76.dev, "AMPDU Timestamp diff: ref:%d t1:%d t2:%d\n", =09=09=09 phy->ampdu_ref, phy->rx_ampdu_ts, status->timestamp); =09if (!++phy->ampdu_ref) =09=09phy->ampdu_ref++; } I guess I could maybe do some hack around this myself finding some relation= between timestamp of the ampdu, computing the end time of the previous par= t of the AMPDU, but this would be really hacky and complicated for a workar= ound to what look like a firmware issue. Is there any mediatek dev around with access to firmware sources to help wi= th this? Thanks, Florian