Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4564537imw; Tue, 19 Jul 2022 08:56:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vIEIhl6RY2PCKDJgwzQLi+REXLkh80BJR0F5vR+Za0FDKpfp3GhQaA9vx8EnYMh7WMVJlO X-Received: by 2002:aca:1b13:0:b0:322:4c21:6ba3 with SMTP id b19-20020aca1b13000000b003224c216ba3mr8981oib.204.1658246180198; Tue, 19 Jul 2022 08:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658246180; cv=none; d=google.com; s=arc-20160816; b=G0WwdCBoaCi1CtCqG6aBy+eB6WY1qjjDUIYab1jNLhl0UfnNKaIKS7WKuP41oYTtFd NmY4y6NM931Zd+fEF8cP8Lihd36Dm3tAgrSJf5AoOufVVOI5PbyuQuGQ1r8P8eRRNqAS GZA+7/grW8zgeVbq1ZAICsCvrtQAT4AthKOnk79fq/ouTqu9Um7fUOMIhVrm4EMRnYuw EXKtRsHSz7/JApSYJADjD6gwDA17l5RYYG6/hkoaB8jaG2QQDI3Y1ABH+5/SQZPkzEFB NM4xsnetnKJ/a1DkYm2x6Qtoz0bw3FbqsIhUY+d6UYT21RKhvvNgvsaR3jz30s2yk/mz z/QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=MmfrJ/bNutr51ppQSSJ8MuIOa6hb53CImlPUfpf4NHQ=; b=LV2jwlm7hDOH85F81TYBpp9UjGyaBZ1FoGT3ognQbJq1VEwxoF3lb41K6i6ROZMnxO 4CU8ZXnHuEkcR8Czv/8sz4SDQ8CX6KcL9f43XWhmiOztqfJ7hEYmw5nce6tUrEw6UCcl wPCPu7P2AkvWiLA2VYvzPQ3RdpRQtqZ0XBpNTRecyaq2nBJ20B+8doQoaoyMNdlfET98 4CPpeQbw9o8+i3sTjO219o9BLOtbMBmUCHYHATW42tNuEckIBUvqDg5tVVyGx0srfZma RNk0cC+rQ8PFK2nk3+5hLXiUIq1acs6IiJtbPqxlPXV0U+IXglXdRjdTl3En/NwP6e1Q +9ZA== 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 v27-20020a056830091b00b0061ca6d0d065si6825285ott.163.2022.07.19.08.56.09; Tue, 19 Jul 2022 08:56:20 -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 S239504AbiGSPzl (ORCPT + 65 others); Tue, 19 Jul 2022 11:55:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239572AbiGSPzi (ORCPT ); Tue, 19 Jul 2022 11:55:38 -0400 X-Greylist: delayed 598 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 19 Jul 2022 08:55:36 PDT Received: from simonwunderlich.de (simonwunderlich.de [IPv6:2a01:4f8:c17:e8c0::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADA6DCE1E; Tue, 19 Jul 2022 08:55:36 -0700 (PDT) Received: from [IPV6:2003:c5:973c:81a8::792] (p200300C5973c81a80000000000000792.dip0.t-ipconnect.de [IPv6:2003:c5:973c:81a8::792]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simonwunderlich.de (Postfix) with ESMTPSA id 3F354FA86A; Tue, 19 Jul 2022 17:36:34 +0200 (CEST) Message-ID: <31e87fa2-6fea-5fe2-ab80-6050da9af7ce@simonwunderlich.de> Date: Tue, 19 Jul 2022 17:36:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2 Subject: Re: [PATCH] mac80211: Fix wrong channel bandwidths reported for aggregates To: Adrian Chadd , =?UTF-8?Q?Linus_L=c3=bcssing?= Cc: Johannes Berg , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , Kalle Valo , Felix Fietkau , Simon Wunderlich , Sven Eckelmann , ath10k , linux-wireless , netdev , Linux Kernel Mailing List References: <20220718222804.21708-1-linus.luessing@c0d3.blue> Content-Language: en-US From: =?UTF-8?Q?Linus_L=c3=bcssing?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,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 On 19/07/2022 17:03, Adrian Chadd wrote: > Hi! > > It's not a hardware bug. Dating back to the original AR5416 11n chip, > most flags aren't valid for subframes in an aggregate. Only the final > frame has valid flags. This was explicitly covered internally way back > when. Ah, thanks for the clarification! I see it in the datasheet for the QCA9531, too, now. And thanks for the confirmation, that what we are doing so far is not correct for ath9k. Words 0+2 are valid for all RX descriptors, 0+2+11 valid for the last RX descriptor of each packet and 0-11 for the last RX descriptor of an aggregate or last RX descriptor of a stand-alone packet. Or in other words, word 4, which contains the 20 vs. 40 MHz indicator, is invalid for any aggregate sub-frame other than the last one. I can rename that in the commit message. Another approach that also came to my mind was introducing more explicit flags in cfg80211.h's "struct rate_info", like a RATE_INFO_BW_UNKNOWN in "enum rate_info_bw" and/or RATE_INFO_FLAGS_UNKNOWN in "enum rate_info_flags". And setting those flags in ath9k_cmn_process_rate(). The current approach is smaller though, as it simply uses the already existing flags. If anyone has any preferences, please let me know. Regards, Linus