Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp146797ybc; Mon, 18 Nov 2019 22:10:24 -0800 (PST) X-Google-Smtp-Source: APXvYqwaEvJPklijYesvF5vpvaGAEzfPBUC6IVub6UtrWgGlE64n6isZMUOnt52qMCpot1EdvmUC X-Received: by 2002:a17:906:2e52:: with SMTP id r18mr33134758eji.178.1574143824303; 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=OoOcLqRRxfNIMFwXTy8CAGpuuVQnFO84tMW63FN9KSbd1IHpx+nLuzANH7ihMq4OTm HZSkceS2efbD/tyojJsyuhFBDi54tWInpt4oDQRiNgVt0blFCorfU/gpG2iw1D4eovDa 0kU0cBXwt7DF+6mam1YH/JTa45Md1DQI1etZ03d5OyFRmU8RCg4J/uE0cr93ST3AH9DP ZkbEj2HNMjjOJWC3PLWBYNH7uq9nF+TnKoKr6jT7BvITvfXWYHUD6eQfrwB35aOsxTo4 8NyGpCgy/uQjJw3iHW0EDm9LcjUDyRgk9pVurnBVhwvootaEY7sJIMKyuw1WMbopl7Kk tgOg== 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=GxNs6HN7xVUtB1LzKWE1ynr3takZtWDsBRscgZ8Gfrw=; b=ZYolza75T7f6y2mz4y2Pw4LgLRiheVEIgzjWO77T2qx8MrwPyNDGwmEvXghu6IP+sv 6kDUODz/IQe9GvM7t4iEuY/8H4z25dhisPCFndfwVmLfr7PN+S8QbK3lz9fhrHRFC/6O sFbhilHlDf9ncWooTR2U1jQTyVR3699bBdYznyYniqk/8b5+EhsanGmpaXG7lPUuGKpF EMNIuOmafJkLBugMtjkRTUmYccHq+riaOBuZVyOe6eps/eYZHx7aXhti59bX0tCXUoB1 7vqG7wHz2vGvSim9mr9AgAqzAkgaO3yTpurDre9M2pHDz8ei6z5gsuuRlOk4z6hGDo4N KCkw== 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 s13si14696124edt.427.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 S1729059AbfKSFfr (ORCPT + 99 others); Tue, 19 Nov 2019 00:35:47 -0500 Received: from mail.adapt-ip.com ([173.164.178.19]:43009 "EHLO mail.adapt-ip.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728618AbfKSFfq (ORCPT ); Tue, 19 Nov 2019 00:35:46 -0500 Received: from localhost (unknown [127.0.0.1]) by mail.adapt-ip.com (Postfix) with ESMTP id 4B2422F03D6; Tue, 19 Nov 2019 05:35:45 +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 eXtaOKadYs7q; Mon, 18 Nov 2019 21:35:39 -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 65BCC2F03E3; Mon, 18 Nov 2019 21:35:39 -0800 (PST) From: Thomas Pedersen To: Johannes Berg Cc: linux-wireless , Thomas Pedersen Subject: [PATCH v2 1/3] mac80211_hwsim: add power save support Date: Mon, 18 Nov 2019 21:35:36 -0800 Message-Id: <20191119053538.25979-2-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 Advertise the correct flags to mac80211 to indicate PS trigger frames and frame buffering should be handled by mac80211. This means mac80211_hwsim will now also have to release buffered multicast frames after a (DTIM) beacon. Signed-off-by: Thomas Pedersen --- drivers/net/wireless/mac80211_hwsim.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 03738107fd10..219c23571919 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -1595,6 +1595,11 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac, mac80211_hwsim_tx_frame(hw, skb, rcu_dereference(vif->chanctx_conf)->def.chan); + while ((skb = ieee80211_get_buffered_bc(hw, vif)) != NULL) { + mac80211_hwsim_tx_frame(hw, skb, + rcu_dereference(vif->chanctx_conf)->def.chan); + } + if (vif->csa_active && ieee80211_csa_is_complete(vif)) ieee80211_csa_finish(vif); } @@ -2925,6 +2930,9 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, ieee80211_hw_set(hw, MFP_CAPABLE); ieee80211_hw_set(hw, SIGNAL_DBM); ieee80211_hw_set(hw, SUPPORTS_PS); + ieee80211_hw_set(hw, REPORTS_TX_ACK_STATUS); + ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING); + ieee80211_hw_set(hw, PS_NULLFUNC_STACK); ieee80211_hw_set(hw, TDLS_WIDER_BW); if (rctbl) ieee80211_hw_set(hw, SUPPORTS_RC_TABLE); -- 2.20.1