Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2798079ybh; Sat, 25 Jul 2020 01:46:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjV8PZo/OzQg2nUnW9O7BTwE7BF2RjgKTmKgTyIcZpTQ1UvajovJcpvk0bvzgmVODGR83B X-Received: by 2002:aa7:cf02:: with SMTP id a2mr12757634edy.263.1595666814676; Sat, 25 Jul 2020 01:46:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595666814; cv=none; d=google.com; s=arc-20160816; b=UJLqmSjW8LyGKARI3gld8vvnljnR8v4tZQR7tc2sU4vfRqSYx3Tas2wteYO4NOeq1X SECFsOM8fAdgDWnUAYVnUK2Jm3bPI5qvRxMEGlyV2IR/UBLeKbGAIXc4RZoQavFUGzar Eo/FqMmPY8PtYcBt+kPiqOzULF6mt08gWXogBI6dabtSKHWzNk57HQNkcVk4R3KGqMj1 wJuA7fCGJiutnc4B78RN6yxnNDr0+uRs4GBGttUDRwuMHvjmOSjhVP3OWcnalgfFOY/n TAfPbUH/+fmDBZGXhWTsW4sAVon0CgFWC+4otiX3QU4ui14KXvAZJ2+LnqRUdXsqpJ2g YQ1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ZAheVPeNLygUtxQgCoGLzX2L+HWtpbgpsOmRMK+zrrk=; b=M7RCp5IeDcywrK935L1rNHy/7zdCe3iftZMNhBUHoQT+baVDnrbSqxGsULYYKoSMu5 XUOGhLsf/CBUOLuw1B6DrWzQdwuq4QrrcDrnWNlWm1XGy6iYU1H2GNQ4cHvfEmX2jc6a xb/DnYBiaQ0vRRMdrp91tTf0JakCulPr1aV/OxocVIbjqh8kck/C4hKHkLUZ1CTIc1iA ebfD51IiwUskhstfCjFAoPNgV8W0oMvQuEoRJqiYygAKF1ZH8ZofqOuNkeWLSOG3fBU0 kHQxIyoJDb8EqZtreQmhRn57sSSxwR4KMmTzf3IXjIFG/ntulkPLZvRhAovSTMzG48Fx yA6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=CNwI13jH; 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 f20si1946528edc.220.2020.07.25.01.46.17; Sat, 25 Jul 2020 01:46:54 -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=CNwI13jH; 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 S1726704AbgGYIph (ORCPT + 99 others); Sat, 25 Jul 2020 04:45:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726593AbgGYIph (ORCPT ); Sat, 25 Jul 2020 04:45:37 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63B4FC0619D3 for ; Sat, 25 Jul 2020 01:45: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=ZAheVPeNLygUtxQgCoGLzX2L+HWtpbgpsOmRMK+zrrk=; b=CNwI13jHY4DV2SnA1RsqoDs0NF NjNwztO6t8DwBHlx0x2vUr5Iz/FFpmiGBkoS9VKWKnv4uwSt0hD8CPVU4Fng+KOdqTOTToW4aWEkD gNm7tMDQuuyrx4qOP6VwFbw+6gZZQNnmxUXC42IiQrDh85LhynPS+lR7JyXBYeUX41mM=; Received: from p5b206d80.dip0.t-ipconnect.de ([91.32.109.128] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1jzFoF-0005Yr-5R; Sat, 25 Jul 2020 10:45:35 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Subject: [PATCH] mac80211: remove STA txq pending airtime underflow warning Date: Sat, 25 Jul 2020 10:45:33 +0200 Message-Id: <20200725084533.13829-1-nbd@nbd.name> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This warning can trigger if there is a mismatch between frames that were sent with the sta pointer set vs tx status frames reported for the sta address. This can happen due to race conditions on re-creating stations, or even in the case of .sta_add/remove being used instead of .sta_state, which can cause frames to be sent to a station that has not been uploaded yet. If there is an actual underflow issue, it should show up in the device airtime warning below, so it is better to remove this one. Signed-off-by: Felix Fietkau --- net/mac80211/sta_info.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index cd8487bc6fc2..af4cc5fb678e 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -1923,9 +1923,7 @@ void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local, if (sta) { tx_pending = atomic_sub_return(tx_airtime, &sta->airtime[ac].aql_tx_pending); - if (WARN_ONCE(tx_pending < 0, - "STA %pM AC %d txq pending airtime underflow: %u, %u", - sta->addr, ac, tx_pending, tx_airtime)) + if (tx_pending < 0) atomic_cmpxchg(&sta->airtime[ac].aql_tx_pending, tx_pending, 0); } -- 2.24.0