Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4737694pxf; Tue, 30 Mar 2021 16:10:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHey8cmBUTClMuRbevoZN/oRx07f69NU14mRIwCuXaQ9uCA+cgrJVgD62M50oB0JHETPt6 X-Received: by 2002:a17:906:e0d6:: with SMTP id gl22mr532716ejb.444.1617145822681; Tue, 30 Mar 2021 16:10:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617145822; cv=none; d=google.com; s=arc-20160816; b=VDdmqT1AvkYDARlFYJtEgXuNSCry5HuAWKBlboQAMrudiUz+7RowBWYEZ1NwMBNk6Z GaJkNHadAeUSBdQ5TOsF6FW6/oXkVeNjJOzWQu5+gwFO1vO/U3IdmCTnjox5s+2mGvqC yac7yjphLUthd5/AvGfY/pMftzmL9yMGRzYc2DBxgVwqGuS8hyGzXrc+vTfkTq53JLPi cRBkad1V5sZ3jRjNl/THK/hjitSx7VgXfmY1Rbp4XhXsdaydbqnLz/mJJhFsuBzrD38s T+LfujspEvJ9dIYfkiKDVz1tQzVQXNSggxjHG4L3sKT2gK7orUWr2xbq4P0bZ0ldXFGe oN+g== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=HwTLTcVPiuA+bJL997x9AfcnCYIqlg78KBKm2H5NYEE=; b=RzYb40u/l64EAvM3JeomXdNQgFJRHk+SRhnEBapXtN2+pIN91UIkfHJUj/dWWNvYhX ty2AQYslclD3/oJXNROw9kXgdfjdXyM1HIcgN1EHbYhtlPHnAAGba446rbjkJSy2EJs2 3zcDRE9V5/OZCQVrzqpY4FahCmHh5w4gVzCYrxf/0hiuMGni+HSd6AecB1jId3Vk/GHB FKd3astKQk1HIqd/SNwCWT/L21eI44u6/v8gyW+Erhf2yGGHWPkIeidLCLVGbr9S6Cq0 S0SJBJxwH5zj/dYTMq0dqEMFAGap/Y3xGGS/oi0DnUfPaGdXhEJi7k3bjXd6HawljIk7 b0Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=mwlnlFzw; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h28si343194edj.546.2021.03.30.16.09.53; Tue, 30 Mar 2021 16:10:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@candelatech.com header.s=default header.b=mwlnlFzw; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233083AbhC3XII (ORCPT + 99 others); Tue, 30 Mar 2021 19:08:08 -0400 Received: from mail2.candelatech.com ([208.74.158.173]:51494 "EHLO mail3.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231951AbhC3XHy (ORCPT ); Tue, 30 Mar 2021 19:07:54 -0400 Received: from ben-dt4.candelatech.com (50-251-239-81-static.hfc.comcastbusiness.net [50.251.239.81]) by mail3.candelatech.com (Postfix) with ESMTP id 6686113C2B0; Tue, 30 Mar 2021 16:07:54 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 6686113C2B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1617145674; bh=4hCnNB6cX64vrsPj5W538P5FZ2xNJ40RSORE2NgDsIU=; h=From:To:Cc:Subject:Date:From; b=mwlnlFzwt56vz77lCO5RdLAcb71NzYFNPZnlo8EPlJIuMVsHTgm7deC8GTjRocT7n i4lgp2b3y6wB4okITbJRtkxm8cqeHGUzUbBwMxHV65ifGJozj8Kdww1D9MiAS4dEgs 3zgdLMkg0NSMM15tnpN8aQnoQQy2mAB/R11pvowQ= From: greearb@candelatech.com To: linux-wireless@vger.kernel.org, nbd@nbd.name Cc: Ben Greear Subject: [PATCH] mac80211: fix time-is-after bug in mlme. Date: Tue, 30 Mar 2021 16:07:49 -0700 Message-Id: <20210330230749.14097-1-greearb@candelatech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ben Greear This fixes commit: mac80211: optimize station connection monitor which came in in the 5.10 kernel. This 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 --- net/mac80211/mlme.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index c137a8b5d8e1..b06c76116d86 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -4729,7 +4729,10 @@ static void ieee80211_sta_conn_mon_timer(struct timer_list *t) 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; } -- 2.20.1