Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13330585ybl; Sun, 29 Dec 2019 09:27:31 -0800 (PST) X-Google-Smtp-Source: APXvYqyQSqw7+uPV1n9rObefPEl/OJbm6e1kqZlmyGU1/kFs2jNVFP9pSGOsWHHsR2uODhE+iZ67 X-Received: by 2002:a9d:6181:: with SMTP id g1mr71641765otk.104.1577640450957; Sun, 29 Dec 2019 09:27:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577640450; cv=none; d=google.com; s=arc-20160816; b=LeO9Sg9xikIs6bskotTLw7alG/IVIARw2FoGDTWqiIJ7aQ2csNUk1sYuAUlbWV1Ajh 4EucsJGRyBIdKSYqfNzlu2ZkQZa+fcB+WkLPVSDGj8T8p6o+YZFAlmzBpybnl/uvzwFD S82cIFFn9vX1ufP3Z7Hkz/0DtQ0pURIBj6h7v1Ejvzd9Z66rKy1mx+DdfsSD66ZYn/BM RN+CbRu7zwmtcNScTw6Ql6dBS3zHwswkXopA1kQOMR7fgHDV6zMw7R+F7YungRqv8FnO 4hbR69Q58Ehy7F6co7JFo3HhOT+vzNb93dMKKf+EP8StNfyvLp6WNBlHW9+s8wi5wRlz NBQw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WgI3W/6P3YoG9IttIKF/WmRELsj2u2jKsRpUKQOJzjA=; b=IZ68zlDCURq+9cI9bVx9YaUzckh87RRzwiNRWFOdxVvP62uzlWwCJ2uFZoIeaaXrtR OThenIA98p8c1sQIfw9OK6V2Sn9NmblPDU1H/nD63ToqmxwsMi4lGjQMISNoIfNb6vqS EUa8TZr+ED/X5hI50IxXvdY3rQZkH5iYf3UiWkX/0cYBTRW/NeUGpXQerhe4ibnHraqs lHEby5dmauEzs4k+TkC2F3cVMfpDhXaBVIPJbMQb4TfyzQifNhOPeyPm7najzhzltG52 AWkHkQyv7uky/0M3isG0Eo79HGMZGc7GKu/yA8ko0lhqoV66PfW+Jfqy4OUupH/E8mot EevA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cbsHl3Uu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 l84si19287754oig.5.2019.12.29.09.27.20; Sun, 29 Dec 2019 09:27:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cbsHl3Uu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728164AbfL2R0S (ORCPT + 99 others); Sun, 29 Dec 2019 12:26:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:46930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727734AbfL2R0L (ORCPT ); Sun, 29 Dec 2019 12:26:11 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 46D9420409; Sun, 29 Dec 2019 17:26:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577640370; bh=9Q1KOpc9Gr9mqP8t/Q9Bi0RQNfaCGH6IfPJ4qLdMIvk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cbsHl3Uuy8Qm+3+qqrwRN0/cutP8z2kqpCh4IwvMNlz9k2zXTkR5GR6GRoRXeDI4Z 7O7rp8pukC8g1RnQO1GjY9Sl6ohnGNxyAcIhmCavVUONzzeZcTCGUQNX+NZlJXXhn0 I2afu6KlM78sYwGM3db+rbI9nrnOUM4HitFGsjaI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Pedersen , Johannes Berg , Sasha Levin Subject: [PATCH 4.14 131/161] mac80211: consider QoS Null frames for STA_NULLFUNC_ACKED Date: Sun, 29 Dec 2019 18:19:39 +0100 Message-Id: <20191229162438.526610307@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229162355.500086350@linuxfoundation.org> References: <20191229162355.500086350@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Pedersen [ Upstream commit 08a5bdde3812993cb8eb7aa9124703df0de28e4b ] 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 Link: https://lore.kernel.org/r/20191119053538.25979-4-thomas@adapt-ip.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- 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 b18466cf466c..fbe7354aeac7 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -856,7 +856,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