Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3705512pxb; Mon, 24 Jan 2022 15:54:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8tNoYRcqS63s+3rWXauhlngxa94fwyqENtfaKi8fAqbFLqYEaruugGeMeVL9g56GlUSQ5 X-Received: by 2002:a05:6a00:1798:b0:4c8:df86:9e15 with SMTP id s24-20020a056a00179800b004c8df869e15mr8151262pfg.72.1643068467847; Mon, 24 Jan 2022 15:54:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643068467; cv=none; d=google.com; s=arc-20160816; b=D/ueb6bh7AIiieYYoGkdjO5K9P1IfDeoyacdD4fa1zOSZBnJLXVT+aOrAkUR4EjRMg JvnPRigXr7gv1ogPw5VzQMK0NBUYuw/n29UDv8hObkhUnKxkSE9aTi7RV0KmxNkgMMn3 LWXhl5h7JA3o0bc1U81SBcyR0j6TzmmGTVhcuSt34yA2sbxPb2K3E+FkTjTzqgdmLh8/ lo003gKpwo6n9plCeXZvjzXJHqsXLEC+4bG9szop0xdxUTQrCI67U6DRo10B1Fj69gt1 OreUMmAmq5mpz/G8uQIHLcs8adFXuF523XDDAjBVbA5oibJQOknAiRBO41Po5/uGeJjF n9Og== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EtYUhvzDa8lT0uB6kYcm8WY9cVnsJLx+XvVwKspBfZA=; b=fUwpSdRKMMVtVuLRidJEaWx/Vo2e402fxbIUiD2zhj6IbJao/aLVBRuyUL8m17gieA WPYfBhkQoXwvYed6gFbRwbpBgxFDVZNYoZp2TDD6KvHGAYUOJNW/A3GdEDKWPK+RECg0 zV6UYtBMSIQhg6QUuiKXhkhuo6fnq3EVGZ3ofvhJcoVW+ZsbggIo2BULAZvTkeG8CvQy 6RhOSn5ubvr+DUSDcldejUDk8mIV0yIavNHc8WP8xDY7CKRYtwyRUsy5VkdZq8JYExkN uu0Xqq55m27B86QA8qY0wJDRJnnbkj5PqVXkea46GlKcAq3mWHkXer+CPRe0DUSMjL2f CwDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zF0v6gTZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q10si17470582pfu.205.2022.01.24.15.54.15; Mon, 24 Jan 2022 15:54:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zF0v6gTZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2364357AbiAXXr1 (ORCPT + 99 others); Mon, 24 Jan 2022 18:47:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1840878AbiAXWzj (ORCPT ); Mon, 24 Jan 2022 17:55:39 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDD8CC0680A6; Mon, 24 Jan 2022 13:09:32 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8D6B161451; Mon, 24 Jan 2022 21:09:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AD62C340E5; Mon, 24 Jan 2022 21:09:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058572; bh=/CjwGGaAUdmDEBm/a/YjAd8KE0FRV4xADIfrAnFqqX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zF0v6gTZSEUTpfCTtpF3so4tOZMrDhuNyje+5hE4c4D0vgQUvPAylWRZ6aUeAccM2 MkKuWZHNC+MavCXmWOKt87zuGM7uPam7mx5SJFHmVthh/mDbXMrXzCUUSbH0qalGVx HdTISxWGS0OAkIjL+n+V2Q2kaRG6QLEPPNSgXtJQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Avraham Stern , Luca Coelho , Sasha Levin Subject: [PATCH 5.16 0331/1039] iwlwifi: mvm: set protected flag only for NDP ranging Date: Mon, 24 Jan 2022 19:35:20 +0100 Message-Id: <20220124184136.439036135@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Avraham Stern [ Upstream commit 6bb2ea37c02db98cb677f978cfcb833ca608c5eb ] Don't use protected ranging negotiation for FTM ranging as responders that support only FTM ranging don't expect the FTM request to be protected. Signed-off-by: Avraham Stern Fixes: 517a5eb9fab2 ("iwlwifi: mvm: when associated with PMF, use protected NDP ranging negotiation") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20211219132536.f50ed0e3c6b3.Ibff247ee9d4e6e0a1a2d08a3c8a4bbb37e6829dd@changeid Signed-off-by: Luca Coelho Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c index 3e6c13fc74eb0..9449d1af3c11a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c @@ -511,7 +511,7 @@ iwl_mvm_ftm_put_target(struct iwl_mvm *mvm, struct ieee80211_vif *vif, rcu_read_lock(); sta = rcu_dereference(mvm->fw_id_to_mac_id[mvmvif->ap_sta_id]); - if (sta->mfp) + if (sta->mfp && (peer->ftm.trigger_based || peer->ftm.non_trigger_based)) FTM_PUT_FLAG(PMF); rcu_read_unlock(); -- 2.34.1