Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2095127pxb; Mon, 12 Apr 2021 14:20:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1GoG7fqhBN6Sz9D0Vb8+0va66xUAv/dIFyDOlFQofh2yFqlrpS3/3Eq9rJDlRxTib0YeG X-Received: by 2002:aa7:d54c:: with SMTP id u12mr32196145edr.234.1618262435725; Mon, 12 Apr 2021 14:20:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618262435; cv=none; d=google.com; s=arc-20160816; b=TEPi9BiQL/is0zOP4VODYLfE3eAWtbXFGwAeL1T5O4+HvEH9URQBSP7yrERlrh6zUA adSwKwJA3UJ4Qk7vXyIx+QldDZMJiR2BCic3XqkhfXylifzEAmId+Z7WbEfno/CZnvyq PEm5NWH36vy4IXeMcpHv2iewOXUd5Ly3RXLp53zly9En5KTScFUDb/WtqUtwDIjq5G4x fa4DEKOdimhBLz+yrAU/Ur1fqBpxGeJFPLCnKmE61g8gjRt840yhg+3iLn+GDUcih72i fHdHUP8e5qK5cJL+5jS35y8za2TSGPe66n/WL2M+ymxgDNs+Xhh//nrXNRpIshP/bydC OIrw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=K/n9RMsO+RMBH+WeyU0FgENmQEZfgJ5b+zZUBWSAsII=; b=mashG3Y0efUqlVnbTh4Z7iBmpKuf8B9dyWvBH2u/pWk66WDQKyypT/BB9PkhWR5CAl 8+5dHSPKj/oNcr2lYHO9OhFHQ0Y4zheUZZiNmy0jClb8iWCqIeaTmB/CO2G01D0Yu/Zi HDpIYVJ9l5Cz4mbvHKOT0FBJDfIyz0x4mskW+XuEN86uTCIk0Qriv3wGXF7FSOUHYQHd fyf4kxOcbu5rBzpi5gCxqp9EojAIqiJLO27EzwbhdHygRp752buwnc04VFBUivTL3A70 P1OmFiT7008IRMFRK+dG8iEkFr7uCI8Gb8uy3CadXhlwd5lOt7SrmWvv6sK9VC6bwK4U 6RIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="G/wl0qwP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id re11si4386121ejb.590.2021.04.12.14.20.12; Mon, 12 Apr 2021 14:20:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="G/wl0qwP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239771AbhDLJIa (ORCPT + 99 others); Mon, 12 Apr 2021 05:08:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:44106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238992AbhDLIzR (ORCPT ); Mon, 12 Apr 2021 04:55:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F07F96125F; Mon, 12 Apr 2021 08:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217667; bh=PNofxI6sIvCp2AxAW5xCeCO5rACjP1WGLH4QwCCnBPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G/wl0qwPDcnBXMx9oD5hyJCxybshSmkeKcOmvEYU5sIRgadmyCMclaxPFtaNFL3rK 2jPDf378vvU0TTU8sJxUI9I9l2WztjqhB3ZRHD0oAO1fy/YuDnmrumQ+NjWOulXxFx bB5bjh9ZT8vKMvyE64zuGzAEU58/GxaV1+ptiNIs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ben Greear , Felix Fietkau , Johannes Berg Subject: [PATCH 5.10 066/188] mac80211: fix time-is-after bug in mlme Date: Mon, 12 Apr 2021 10:39:40 +0200 Message-Id: <20210412084015.848407820@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084013.643370347@linuxfoundation.org> References: <20210412084013.643370347@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ben Greear commit 7d73cd946d4bc7d44cdc5121b1c61d5d71425dea upstream. The incorrect timeout check caused probing to happen when it did not need to happen. This in turn caused tx performance drop for around 5 seconds in ath10k-ct driver. Possibly that tx drop is due to a secondary issue, but fixing the probe to not happen when traffic is running fixes the symptom. Signed-off-by: Ben Greear Fixes: 9abf4e49830d ("mac80211: optimize station connection monitor") Acked-by: Felix Fietkau Link: https://lore.kernel.org/r/20210330230749.14097-1-greearb@candelatech.com Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/mac80211/mlme.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -4660,7 +4660,10 @@ static void ieee80211_sta_conn_mon_timer timeout = sta->rx_stats.last_rx; timeout += IEEE80211_CONNECTION_IDLE_TIME; - if (time_is_before_jiffies(timeout)) { + /* If timeout is after now, then update timer to fire at + * the later date, but do not actually probe at this time. + */ + if (time_is_after_jiffies(timeout)) { mod_timer(&ifmgd->conn_mon_timer, round_jiffies_up(timeout)); return; }