Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp146806ybc; Mon, 18 Nov 2019 22:10:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzv4o/IHCVQRWRynqUN2ma6L9Ux6U4cdKrGUbeegvWFD4FE+4CFs45laA2sxuH1xp0bVaK0 X-Received: by 2002:a17:906:11cd:: with SMTP id o13mr32093943eja.272.1574143824737; Mon, 18 Nov 2019 22:10:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574143824; cv=none; d=google.com; s=arc-20160816; b=X3sHXZl0B02U2CagkIoUwFEtGvIh1zHF3kSmxMKtqCsTb6h5VNGgVp6P+e5YjghsEa Rb7r81ZtEA3NOFAp2SQzEuH/RAQNHmsO2JF9LM7h4Ea7mYw34t915FF1Qj/ReWPuJuwG 6Po+L41wTFY56G4tbTbJ+GPc+PWI8tTHhv22kITxkHvPAmRR/q9E4XI4EWynRa3JAybc 2t5LcibB7lnTsBlganL9LAjGcpsu8q9cCIu+gPipCS16OTWySs7hSJtDbNxvCJy5Al6W qsZwCyyfW+yA37QwWGNb0ZgAeca6Dd8Fl6aifsfpeVLX4xjEQR5MfudcL9tpHDHmsFvN t3wA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mUkE3w2Fxb2ABqSRJRGulrrSotNqWa7UBBOTcvjKtt0=; b=BOvkI3HDrjbQVvOgUfXR8uoCPUmQanMbPR6bk/7PEXmrfrA0j9a3eyuVONlioQd8Wm uUlBg5W2wKBu03YEAgwaBsbXEqsLrN0KMGyUnzgv/SHSxqpz2qLr3KjTkytHncOr2wKf GcfFW1zYK+4cIg6GURKiDeSbbQVs3fehkYXrKTvMBsfkJ2wQCnF6oLMGdPHdQPRPX6iK 0Xn7PXBSY2b8NWOx+PYFhcaD0Rv23y4WM5zRld1Uz22urKWA6+fjxdOmGScmVcDFuwva N0ccvNlJI51pgzakNadLiYhY1KdsIR/mEdkqVdwZJnhCVRSOP6Utheq1ADbwjbQUYaFv K9Pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qn27si12776854ejb.426.2019.11.18.22.09.59; Mon, 18 Nov 2019 22:10:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727479AbfKSGFt (ORCPT + 99 others); Tue, 19 Nov 2019 01:05:49 -0500 Received: from mail.adapt-ip.com ([173.164.178.19]:43014 "EHLO mail.adapt-ip.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729403AbfKSFfw (ORCPT ); Tue, 19 Nov 2019 00:35:52 -0500 Received: from localhost (unknown [127.0.0.1]) by mail.adapt-ip.com (Postfix) with ESMTP id 0517B2F03D6; Tue, 19 Nov 2019 05:35:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at web.adapt-ip.com Received: from mail.adapt-ip.com ([127.0.0.1]) by localhost (web.adapt-ip.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ecBuW9aQtppH; Mon, 18 Nov 2019 21:35:45 -0800 (PST) Received: from tractor.ibsgaard.io (c-73-202-5-52.hsd1.ca.comcast.net [73.202.5.52]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: thomas@adapt-ip.com) by mail.adapt-ip.com (Postfix) with ESMTPSA id F16462F03E6; Mon, 18 Nov 2019 21:35:39 -0800 (PST) From: Thomas Pedersen To: Johannes Berg Cc: linux-wireless , Thomas Pedersen Subject: [PATCH v2 3/3] mac80211: consider QoS Null frames for STA_NULLFUNC_ACKED Date: Mon, 18 Nov 2019 21:35:38 -0800 Message-Id: <20191119053538.25979-4-thomas@adapt-ip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191119053538.25979-1-thomas@adapt-ip.com> References: <20191119053538.25979-1-thomas@adapt-ip.com> 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 Commit 7b6ddeaf27ec ("mac80211: use QoS NDP for AP probing") let STAs send QoS Null frames as PS triggers if the AP was a QoS STA. However, the mac80211 PS stack relies on an interface flag IEEE80211_STA_NULLFUNC_ACKED for determining trigger frame ACK, which was not being set for acked non-QoS Null frames. The effect is an inability to trigger hardware sleep via IEEE80211_CONF_PS since the QoS Null frame was seemingly never acked. This bug only applies to drivers which set both IEEE80211_HW_REPORTS_TX_ACK_STATUS and IEEE80211_HW_PS_NULLFUNC_STACK. Detect the acked QoS Null frame to restore STA power save. Fixes: 7b6ddeaf27ec ("mac80211: use QoS NDP for AP probing") Signed-off-by: Thomas Pedersen --- net/mac80211/status.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/status.c b/net/mac80211/status.c index ab8ba5835ca0..5a3d645fe1bc 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -1030,7 +1030,8 @@ static void __ieee80211_tx_status(struct ieee80211_hw *hw, I802_DEBUG_INC(local->dot11FailedCount); } - if (ieee80211_is_nullfunc(fc) && ieee80211_has_pm(fc) && + if ((ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)) && + ieee80211_has_pm(fc) && ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS) && !(info->flags & IEEE80211_TX_CTL_INJECTED) && local->ps_sdata && !(local->scanning)) { -- 2.20.1