Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1357556pxj; Fri, 18 Jun 2021 05:33:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhV25y9uWtGsNWf7SFnfVrjZEkrW9FMWKY3uQptz9mLHyD1o82St7yeByVdwAQI38yfTvP X-Received: by 2002:a17:906:dbc2:: with SMTP id yc2mr11068285ejb.390.1624019604010; Fri, 18 Jun 2021 05:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624019604; cv=none; d=google.com; s=arc-20160816; b=xjjQpiSBwBCanOkjOUar0/kvs5J7/jFa9ISTOsyAjohNSERShDD9N7PZAwhDH4aBlm 2dXYhJMkXELaXhP8oZkO6O9ABhXuZfWyhkyHnSXuLPryQuduDwHhhemBJeygAGqMIbz/ MgOo0hgfR2N25ADrPZiWs7HwLT5XWDaVo85jVmChmm7fiOt2w4uDDoB7dd278I4IHYjm b14pksYcFZ/noOBAFCZbW48+mpBusmgCbTKvSbqNYPqMZxLTn5hdUEC+xfnv77wS3JUi 7OmzC6ZF+1hhT30lWD0UwgqgPrT6RWZr5+wqxNIEfV7bBHG+VdWHXa1nPBRaAjuHB8Lv bfag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from; bh=sQsqwu+73sd8k+cn6bklOqzjFI/DP8jN7/00ve0hBEA=; b=GHiVmTgFf8YUQEkiFk2OQtuibTXtBwPu65X1fLjDGkZDG9WH75T2i4BbU7SLhmpRA5 ipBJQjHOcseKUG+1BRqMyD8PO3iGHwH5935I9apBhmBo6vF44aElrdvBgzHWRDsvpyLo xsRZi+yMULcmg/QFXTNtTUdQVB0r7QdfvvDrJF/qazDSowPiNmyCWiC0gN+K5ib5/lfu yWqDlO7BWhxgxsC0ZRY7MznfwxJUi94bvL3ZSUpQAlr5/TudoNGWn+FpKFl8VMc5Mcdg /T8h+tMbrNt00s/Z2J2OlyjVQOiuzHROatqp+Bj8BiD39pZeUb9GpdBBWU97W9QXlU9m wc2g== ARC-Authentication-Results: i=1; mx.google.com; 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 h18si2427241ejl.104.2021.06.18.05.33.00; Fri, 18 Jun 2021 05:33:24 -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; 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 S233762AbhFRKoU (ORCPT + 99 others); Fri, 18 Jun 2021 06:44:20 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:48156 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233742AbhFRKoT (ORCPT ); Fri, 18 Jun 2021 06:44:19 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=kveik.lan) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1luBws-001YXx-Ct; Fri, 18 Jun 2021 13:42:08 +0300 From: Luca Coelho To: johannes@sipsolutions.net Cc: luca@coelho.fi, linux-wireless@vger.kernel.org Date: Fri, 18 Jun 2021 13:41:32 +0300 Message-Id: X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618104156.747775-1-luca@coelho.fi> References: <20210618104156.747775-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP autolearn=ham autolearn_force=no version=3.4.5-pre1 Subject: [PATCH 07/31] mac80211: allow SMPS requests only in client mode Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg The code currently allows this for AP mode, but then ignores it. Clarify that since the spec doesn't allow it in AP mode. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- net/mac80211/ht.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index 3d62a80b5790..2eb7641f5556 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c @@ -9,7 +9,7 @@ * Copyright 2007, Michael Wu * Copyright 2007-2010, Intel Corporation * Copyright 2017 Intel Deutschland GmbH - * Copyright(c) 2020 Intel Corporation + * Copyright(c) 2020-2021 Intel Corporation */ #include @@ -555,17 +555,15 @@ void ieee80211_request_smps(struct ieee80211_vif *vif, { struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); - if (WARN_ON_ONCE(vif->type != NL80211_IFTYPE_STATION && - vif->type != NL80211_IFTYPE_AP)) + if (WARN_ON_ONCE(vif->type != NL80211_IFTYPE_STATION)) return; - if (vif->type == NL80211_IFTYPE_STATION) { - if (sdata->u.mgd.driver_smps_mode == smps_mode) - return; - sdata->u.mgd.driver_smps_mode = smps_mode; - ieee80211_queue_work(&sdata->local->hw, - &sdata->u.mgd.request_smps_work); - } + if (sdata->u.mgd.driver_smps_mode == smps_mode) + return; + + sdata->u.mgd.driver_smps_mode = smps_mode; + ieee80211_queue_work(&sdata->local->hw, + &sdata->u.mgd.request_smps_work); } /* this might change ... don't want non-open drivers using it */ EXPORT_SYMBOL_GPL(ieee80211_request_smps); -- 2.32.0