Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3816371pxk; Tue, 22 Sep 2020 03:27:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv/vMZl9AY1pIObmqjzmUQKna83uwKq39Cweka1yBzPh3yeCU+4YhNzpVhU2BicGpEWAyU X-Received: by 2002:a17:906:7f06:: with SMTP id d6mr3986947ejr.553.1600770434624; Tue, 22 Sep 2020 03:27:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600770434; cv=none; d=google.com; s=arc-20160816; b=YNE+P5YHBSyhb8k64mmQiTNVqjDErkWGlPCj5HnQjH1ODnq/lmj4EjMy3k6qS2ompG UpWfsxvSGlAKUbe2xaYQua1EbVVx0g6fkHYYgU8KVixZZTqvd6HAslE3pgfyzBdTqky3 T1S9duuAp/0Nd7VYh09g4/dZRkfYuxeqMH8r45ZIeU4R3TwRcl/E0tu7JI59X00FKfXe WHJoJ46yKgr3X1t+rERs1/1XA7r+3qtgA30EUerg9TbL7wz77dKlTNRPH8OrcNS59fIY R0JNUKDmxhBhllJ7UkccR9Qh9zF7NKChhYfdbe7lTM6bJCjuN/wo69vEKad6+OUuACMX PojA== 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; bh=pQGJtkUrXuMxTVGBKNjPtRwCzVwoiD+gH/7spihF/zQ=; b=xYiGjF9sBhpZW0bUMzjFDTiIT1VSnG8/RQiS8oEKZ0dPPPcrI8p0aVV7Zs3jbPefuE h5u+ancxBO+IlhY9z6co3mhFcAU0gN063DgAzkPB2KqKflp8tpdYmE/BtZWctR9gGSP/ 8oEGMKesELGOEe5yc+SHPRnsAlEEJ8N+MucTSzferd+xf1O03kexI9UDoonACOjkK9wM IG+uY0C6ar11yI9sPrg+/iaR7AemcIiXcp6sVfevhzQDD4pbpJQdAh6IpWrQLupivOXB ihyW3I6UCtbto17s8XpX4Ia0/rRzqlsVtJKjPYHEyYcrPqN99DSkrg3nAyUuN3kNEllI BCrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=gN8OVJdE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gu16si10062301ejb.218.2020.09.22.03.26.41; Tue, 22 Sep 2020 03:27:14 -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=fail header.i=@nbd.name header.s=20160729 header.b=gN8OVJdE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726473AbgIVKYh (ORCPT + 99 others); Tue, 22 Sep 2020 06:24:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726419AbgIVKYh (ORCPT ); Tue, 22 Sep 2020 06:24:37 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B8A5C061755 for ; Tue, 22 Sep 2020 03:24:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=pQGJtkUrXuMxTVGBKNjPtRwCzVwoiD+gH/7spihF/zQ=; b=gN8OVJdEyaqL8+wn3bcnESfTFK NqZtyCohTcaoS3vhceRKkxo++AhyzuZwoXlKAWsaoaN0pb943QrM7LhbDFsP+w3sD56hYfO+wEj9V oQ424Tac3WVo01KwAUL4xi7UI4V0e077WVY3AKxXuxYB6zHtolvOltnzLku3ie89KXzA=; Received: from p4ff134da.dip0.t-ipconnect.de ([79.241.52.218] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1kKfTP-0004Kj-R7; Tue, 22 Sep 2020 12:24:35 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Georgi Valkov Subject: [PATCH v2] mac80211: fix regression in sta connection monitor Date: Tue, 22 Sep 2020 12:24:34 +0200 Message-Id: <20200922102434.42727-1-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org When a frame was acked and probe frames were sent, the connection monitoring needs to be reset, otherwise it will keep probing until the connection is considered dead, even though frames have been acked in the mean time. Fixes: 9abf4e49830d ("mac80211: optimize station connection monitor") Reported-by: Georgi Valkov Signed-off-by: Felix Fietkau --- v2: reset connection monitor when a frame was acked (not just for nulldata) net/mac80211/status.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 7fe5bececfd9..cc870d1f7db6 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -1120,6 +1120,8 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw, noack_success = !!(info->flags & IEEE80211_TX_STAT_NOACK_TRANSMITTED); if (pubsta) { + struct ieee80211_sub_if_data *sdata = sta->sdata; + if (!acked && !noack_success) sta->status_stats.retry_failed++; sta->status_stats.retry_count += retry_count; @@ -1134,6 +1136,13 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw, /* Track when last packet was ACKed */ sta->status_stats.last_pkt_time = jiffies; + /* Reset connection monitor */ + if (sdata->vif.type == NL80211_IFTYPE_STATION && + unlikely(sdata->u.mgd.probe_send_count > 0)) { + sdata->u.mgd.probe_send_count = 0; + ieee80211_queue_work(&local->hw, &sdata->work); + } + if (info->status.is_valid_ack_signal) { sta->status_stats.last_ack_signal = (s8)info->status.ack_signal; -- 2.28.0