Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp509870imw; Wed, 13 Jul 2022 02:50:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vHbTEsLcmPwxaeWoEexCaNA1xwEABNcaA8dSS5CVmBOQ9NgYcxspoK2YkwArND7Qv2nXg/ X-Received: by 2002:a63:ea58:0:b0:40d:fb08:5796 with SMTP id l24-20020a63ea58000000b0040dfb085796mr2263164pgk.320.1657705709693; Wed, 13 Jul 2022 02:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657705709; cv=none; d=google.com; s=arc-20160816; b=C3SsoZLVieHQ3TO9XMZ4EFbYE7mECXq21a3wJb5CBW8nT0bBwAZXSiGG072saIMGyT mV7wDL/+0nDfk3zkd+0DFH8Bq8sGZEZ3djodNYaWYGdm1QcVmggCoIlYsUoyQMpMwNzm ZfXTjMQXM8Bg86jNBhK0ZruFVdN9rDnsh49FDAv3MAhi0UINYZl2diDy9sLQXTH2h1yO UMCVw8R+ncVRWCPi27e7wZ/JtkginEcIehh87FAFyh1RObMBdpN8DUlbkH37Vvd5fMZV mVzuX5/OHM9AvT+q0fkwE9cjK//BuS3iWlsoMpkUiSpEmxTSTFKCHehufOU+gF4uQqKs dNvA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PeBNybZtri/YEfvBgYuHATnDQTwZssoziBYs0uzehgc=; b=SAV2TLQRgNCJp7fNTfjEBLS9WGmJ4n+bQskdTu+1GeK8BrQRu+/8mbh817gMjuj3CJ VP1W+Fxu9krz+D+MXb+1p3+AoEwXhoEWJaQiE9g/oJMNU0Ij4Qt0FQWKVjedB1Hb/Y72 M6/VepzKQQR4o7Al9weOto+LN3jZDuc0Baez0BPnleduvklroUeShgl0wIR+ps5J2hzr WEnBWdT3svCcfQ0pIt8Uyygwp4O/JiPXNBUmJhiEj+vr6TTJsn9Zyn3QpfJtsqfuhnHe TWfJB/X9GKTdRSoANM6tXHKZbw4rtS+xIw5GZ6PeMNfuMVaAVJ7EY1UNZxYk3rJNGUlV tvVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=MHwN6RiH; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id my5-20020a17090b4c8500b001ec9759c171si2201082pjb.35.2022.07.13.02.48.22; Wed, 13 Jul 2022 02:48:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=MHwN6RiH; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236267AbiGMJpn (ORCPT + 65 others); Wed, 13 Jul 2022 05:45:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236114AbiGMJpP (ORCPT ); Wed, 13 Jul 2022 05:45:15 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5554E0279 for ; Wed, 13 Jul 2022 02:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=PeBNybZtri/YEfvBgYuHATnDQTwZssoziBYs0uzehgc=; t=1657705514; x=1658915114; b=MHwN6RiHgv6X5m8ZWy2v7QdfmzQDQ45u1OszDbN3NpM/Wc8 XLzK9zZeNKe5f/j4zT9G9lPbQ6g2PGgIiDMZlayAlzcRBBJNpOdLHCjpDJklDzx910jhgr0xvEJgU W1xAYTYSIRIK0XmzsAZHpUWPIxPy9maZ5ngbMwDNkdXTtkW/NwAwqFyNA2O9bBcljriDMA2Lqu8td VBywthGLAmEzYSW3Dt9le+vBrgKK0D1X3RvYUz45B5/pYrxq4VVwQvOs82BSQar/wt+Rl8iSVwQ2c cQ1Y9xwk94B2pijn4cz6AO0VwsAmB5Tb4qKBqBKPMPvhEt1CAsTB9gl3pF8aLW2A==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1oBYvg-00EgvB-Lt; Wed, 13 Jul 2022 11:45:12 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 28/76] wifi: mac80211: expect powersave handling in driver for MLO Date: Wed, 13 Jul 2022 11:44:14 +0200 Message-Id: <20220713114425.e4d19d275aaf.If82f6ab725e6b755f1f821810df4050e285db3ed@changeid> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220713094502.163926-1-johannes@sipsolutions.net> References: <20220713094502.163926-1-johannes@sipsolutions.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg In MLO, expect the driver fully handles powersave handling, including tracking whether or not a beacon was received, the DTIM period, etc. Signed-off-by: Johannes Berg --- net/mac80211/main.c | 3 ++- net/mac80211/mlme.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 1258e506377e..8d5b18318b20 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -984,7 +984,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) return -EINVAL; if (WARN_ON(ieee80211_hw_check(hw, SUPPORTS_PS) && - !ieee80211_hw_check(hw, SUPPORTS_DYNAMIC_PS))) + (!ieee80211_hw_check(hw, SUPPORTS_DYNAMIC_PS) || + ieee80211_hw_check(hw, PS_NULLFUNC_STACK)))) return -EINVAL; if (WARN_ON(!ieee80211_hw_check(hw, MFP_CAPABLE))) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 1035d6d433b1..7b9211d16193 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1785,6 +1785,7 @@ static void ieee80211_change_ps(struct ieee80211_local *local) static bool ieee80211_powersave_allowed(struct ieee80211_sub_if_data *sdata) { + struct ieee80211_local *local = sdata->local; struct ieee80211_if_managed *mgd = &sdata->u.mgd; struct sta_info *sta = NULL; bool authorized = false; @@ -1801,7 +1802,8 @@ static bool ieee80211_powersave_allowed(struct ieee80211_sub_if_data *sdata) if (mgd->flags & IEEE80211_STA_CONNECTION_POLL) return false; - if (!sdata->deflink.u.mgd.have_beacon) + if (!(local->hw.wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO) && + !sdata->deflink.u.mgd.have_beacon) return false; rcu_read_lock(); -- 2.36.1