Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp740259rwd; Thu, 8 Jun 2023 07:10:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6UbqgOqudM/qTPcMUrp19a2Rp5/fbuEzk/GK7GPnsV1kKXnsWldmcmQfa/QcLTTJAF94sw X-Received: by 2002:a17:90a:ea05:b0:256:3cd5:4fde with SMTP id w5-20020a17090aea0500b002563cd54fdemr4419467pjy.44.1686233452005; Thu, 08 Jun 2023 07:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686233451; cv=none; d=google.com; s=arc-20160816; b=IWPKdHSgV/8RraPqQueyhYSGCCbsjdKPblGQp1i58fTdXGV4EyCPp6/9T8tuIngy6w Dz50puEAP97QRm0JCJtyENF1Hr3+ObTWmxSHRUM5e+TcxmOXaGT+VGOGTtSXMMq+T0GY rDN2fzQOGQKotijjk764hQKpoTRIV/+zsyjh4N1TLzroYr3AAAAOxYO9JkZb16RZx6wQ VagBPnQSSdn3xbtqfTH/ze3v4W2F57VScuuefXjlaxut8L5nLZq5i6zgxERyoovx+Aqn o4PuIOqdK6Ik9EhI3DSJn/1dJyXmMS1KTxUEKw/E3OjHT6xPb+ckU2jcF/QlHr37NZB/ fIKQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lzee9KNw0S3lz8niqk5jdTlae9IrY3vyWSr8GJYxJyg=; b=ZeGgb3DqnW6bD6gbCtDjt46/4Acdkkb0pA0BDJKJ3KYfLENI9yjERJroFQwgceAVFI NvDZYtsb9SrcpFwRQ6Qj7cZCZpLdUIEOBPS21S+fBxWLxlzkA7VFJUHpUPrSf5oRism0 2NE/LcVEhc65+E0l9LZLmGL7PpqrgahJQEgaxtZWUVq9MkfHP6DT9vWZt31N6f/STRdu Dhej4sY+yB4pK1xaNSv+TcDxJr12dF0+vBjFDifh9V8ueiw/7jaVjlUN9RfiU+McO6SA JndTCEdNZU7ODgrUOz8cycF9HrTBuKZK7x1I0oq3CiXmOZ+1I1cAcLVQsFNdqreFyij0 4Ttw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lpu68yiB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu13-20020a17090b388d00b00255ab0ed47asi1131844pjb.49.2023.06.08.07.10.44; Thu, 08 Jun 2023 07:10:51 -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=@intel.com header.s=Intel header.b=lpu68yiB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236839AbjFHOH0 (ORCPT + 61 others); Thu, 8 Jun 2023 10:07:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236841AbjFHOHQ (ORCPT ); Thu, 8 Jun 2023 10:07:16 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 124052726 for ; Thu, 8 Jun 2023 07:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686233235; x=1717769235; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=orgMaRnvG4azastAsyl2CS0eCcfX1KbsbSyhwgWZmoA=; b=lpu68yiBJPBVGSiBY8upVyxVTApCY9FyNdy9brsZ+nJ+/DWgEEA0k3uO ZF/uRQR9HgFKv3Dv7f94WpUFBZ1ZHhq3BBuW1/T2Sq6EXeIEKUEwcFnuj UW+k6locp912/xzvRxLYAPC8Bb82YnHEKPDLcv8PsdwjoHN01SquTV4ML HoN0hPnjqPqZ7ODU9cR737prOsMY1QrgBeLKDxlEt2/DvTAI3tCSw8bxR dNJDOnwpGX0JGndlsh5it62BDtjXg84/stCw6Qof4v7Y3loN8N3girzf9 1uvE27n+l2c6zDSR3zcYygQGzhYcdVkzZJqwFt/lJF3ulRMEUeLcq4VUJ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="423176246" X-IronPort-AV: E=Sophos;i="6.00,226,1681196400"; d="scan'208";a="423176246" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 06:36:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="956706268" X-IronPort-AV: E=Sophos;i="6.00,226,1681196400"; d="scan'208";a="956706268" Received: from unknown (HELO ggreenma-mobl2.intel.com) ([10.249.94.100]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 06:36:41 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 09/15] wifi: mac80211: don't update rx_stats.last_rate for NDP Date: Thu, 8 Jun 2023 16:36:05 +0300 Message-Id: <20230608163202.8af46c4ac094.I13d9d5019addeaa4aff3c8a05f56c9f5a86b1ebd@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230608133611.1303724-1-gregory.greenman@intel.com> References: <20230608133611.1303724-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 From: Johannes Berg If we get an NDP (null data packet), there's reason to believe the peer is just sending it to probe, and that would happen at a low rate. Don't track this packet for purposes of last RX rate reporting. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- net/mac80211/rx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index ed9939466198..77c7dac760ba 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -6,7 +6,7 @@ * Copyright 2007-2010 Johannes Berg * Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright(c) 2015 - 2017 Intel Deutschland GmbH - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation */ #include @@ -1732,7 +1732,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) if (ether_addr_equal(bssid, rx->sdata->u.ibss.bssid) && test_sta_flag(sta, WLAN_STA_AUTHORIZED)) { link_sta->rx_stats.last_rx = jiffies; - if (ieee80211_is_data(hdr->frame_control) && + if (ieee80211_is_data_present(hdr->frame_control) && !is_multicast_ether_addr(hdr->addr1)) link_sta->rx_stats.last_rate = sta_stats_encode_rate(status); @@ -1746,7 +1746,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) * match the current local configuration when processed. */ link_sta->rx_stats.last_rx = jiffies; - if (ieee80211_is_data(hdr->frame_control)) + if (ieee80211_is_data_present(hdr->frame_control)) link_sta->rx_stats.last_rate = sta_stats_encode_rate(status); } -- 2.38.1