Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3589751pxp; Tue, 8 Mar 2022 18:13:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNm0s2fBK0QfSSnpGnXXUCNQyghgO45YaWAppR1rtZwsnnPKB7gu+82NLD3VSiM6PIs7JE X-Received: by 2002:a17:90b:3b8c:b0:1bf:8841:41e6 with SMTP id pc12-20020a17090b3b8c00b001bf884141e6mr7476964pjb.242.1646792021478; Tue, 08 Mar 2022 18:13:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646792021; cv=none; d=google.com; s=arc-20160816; b=orjQxlmZhQJ3Kb63iRRFqMLvMyRHoE7SzxHbItuuaW8z+BFjlr3rMVAe4dHIl1dbge BGWeyOYoHl1Yd2x4xfYtf9qaM+XV4H5xk1OnrEA3AhIZnbm81OP2iCYFoOiVTrvlBN0s pm86nLA5oSG7hPr2fvytTiRgZxE1WQQLttnMnbJtHpEtztMxHjl+zdFAHOv4tK9V5Nnn FT36fA+AyGxRqKdtfHVFwluUwnA8JnTgAWlh/8TykJyLfONpAvIFJZ5b5Lg0XZcvekuh WVXJEAW6RukgUQYz123aoY8rGoIvm+yusgJqRukOrgKOZAA3NP1NF43CZxdmr5MjZ004 Op5g== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=IEoS/jK3zy7gICSRHWJHcM1+R5lqEcfGSNouRgrKCgk=; b=wZL0xDDsQ0t45/Fc2YwzFvcDjfMTlz0HmwveCl/NI6Sqm30Nsr7Z+6Oc/BiUgxs7A/ J3geqWo5wac8PQX6eRWgqi2qdbElj5T0v4kxkRj56YOOnvCPymboAJAzpeOvhBUtnU43 wJite8roMf5g8IsEBhkqffnFEHqCKquhHqweq7AatgpM/H2bN9jh84mp7TF3/KUAF5eb tL2qeC7rmu4/eUWjWIXWJeiwMEikUl+lFTSirU7LpUsM2mK3DoFCOJCjTBwlpIi/1Kzk NRwvXpBLoo2+xnqrDPYBxNlpTuxjSM1JsCdATS4lDYQCdR9LBxz6MV/XNfXNaK2KFMrB +Ltg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=CSXdGHys; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w7-20020aa79a07000000b004f3b73671e9si502084pfj.104.2022.03.08.18.13.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 18:13:41 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=CSXdGHys; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D837615F34E; Tue, 8 Mar 2022 17:01:24 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229449AbiCIBCA (ORCPT + 70 others); Tue, 8 Mar 2022 20:02:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbiCIBB7 (ORCPT ); Tue, 8 Mar 2022 20:01:59 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FA79265B59 for ; Tue, 8 Mar 2022 16:40:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1646786408; x=1678322408; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=IEoS/jK3zy7gICSRHWJHcM1+R5lqEcfGSNouRgrKCgk=; b=CSXdGHysCKA+a0Pvw3bswhzbJ5gbp3tVeJ+3ma8pLx3EeQ1OqCiTnXuR ajKj+OE6S38+gfIQSzkbKl7H/BnPuV5cWih8GEpo/4bCJT1HQLuiIUnz6 Z0d6D7gQfzyeUpw2CZq76OkwWkX7c8eet/oUk9xNXOmogNRA8y1N2fO+g E=; Received: from ironmsg07-lv.qualcomm.com ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 08 Mar 2022 15:59:06 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg07-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2022 15:59:06 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Tue, 8 Mar 2022 15:59:05 -0800 Received: from [10.111.182.121] (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Tue, 8 Mar 2022 15:59:04 -0800 Message-ID: Date: Tue, 8 Mar 2022 15:59:04 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH] mac80211: correct legacy rates check in ieee80211_calc_rx_airtime Content-Language: en-US To: MeiChia Chiu , Johannes Berg CC: Ryder Lee , Shayne Chen , Evelyn Tsai , , References: <20220308021645.16272-1-MeiChia.Chiu@mediatek.com> From: Jeff Johnson In-Reply-To: <20220308021645.16272-1-MeiChia.Chiu@mediatek.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 3/7/2022 6:16 PM, MeiChia Chiu wrote: > There are no legacy rates on 60GHz or sub-1Ghz band, so modify the check. nit: s/Ghz/GHz/ here and in the code comment > > Signed-off-by: Ryder Lee > Signed-off-by: MeiChia Chiu > --- > net/mac80211/airtime.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/net/mac80211/airtime.c b/net/mac80211/airtime.c > index 26d2f8ba7029..c0e58eb7c7fb 100644 > --- a/net/mac80211/airtime.c > +++ b/net/mac80211/airtime.c > @@ -477,7 +477,9 @@ u32 ieee80211_calc_rx_airtime(struct ieee80211_hw *hw, > bool sp = status->enc_flags & RX_ENC_FLAG_SHORTPRE; > bool cck; > > - if (WARN_ON_ONCE(status->band > NL80211_BAND_5GHZ)) > + /* on 60GHz or sub-1Ghz band, there are no legacy rates */ > + if (WARN_ON_ONCE(status->band == NL80211_BAND_60GHZ || > + status->band == NL80211_BAND_S1GHZ)) > return 0; > > sband = hw->wiphy->bands[status->band];