Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp705593rdg; Wed, 11 Oct 2023 03:19:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHN95CN2uQekqsARvFvlC2GOjuhwiKeo+QDOAxhMmJpGFSFYD2hVE/iYaR+wUy8DIk2U0nM X-Received: by 2002:a17:902:bd47:b0:1bc:2188:ef88 with SMTP id b7-20020a170902bd4700b001bc2188ef88mr18212838plx.3.1697019542491; Wed, 11 Oct 2023 03:19:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697019542; cv=none; d=google.com; s=arc-20160816; b=N2Gd9SYgUYWKi/T5NCo6v5s2Lx8wwebKRkxrJ6fU/i1Pn1NCQ4E86o8kjbPMiv4pXl CxtPhCk3ry4sSdgbnuIfcwPSHB+WJLelphmxqciPV9CxrEUJM8HFXg0VwIN3RjW0obxH HGM8/faB7ufXFVqAkwFpwyCSdRQkcF/2OZQ/OXW4jpza7mAR9Ccthra5M+CvwSWy9BNP G/b9lxEqiQ1CNjaSymaUEgl4PIjIY3gE+1PAugI8f2KfmD56X3+YrOvfM3a0xLepWhcr zwm43MWwuj3TGsGK24l4wbvVhKP+oTBwZN0yVu6JmIVKlu3MCzOwZgRdWgiwGZ47hlKq t6yA== 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=ZG8mDkgXsork/a5QCFb6r1T3xCgFS626sk0J7g5mTeQ=; fh=/GEb7gVUqTR6q5QKTfw0XUP5VVlqVBkkw8R/kfrGqdo=; b=cUQWaFIeGPVpc/ow74cWgXfrQuWRrx7XNwq8ubIKso2GNQHYcGE73OizOBL2zopo4P i0l84N3o4EWyG8Nn0Ya5x/4+sWFGTTeFStIV22yi7hpypdJT2xJOQNmjEEvrk1VPFuH5 2RXRmmCk6yXvXy/VNwlc8xAajkfzXtOArDS/gtqiywFV/l8lbpSBos5BG3ACPvI+Fyly 3nHH9/NJcfMy+cb1UtxW9qzXoUboyTwaEJry6sS8QwQdK8iU5YS9r/SHeasE64dKDOqC VoCLboQXiBX2X2jAFTqhcyTkyMy3ZISZz1RXiiv9ZTiLcyOhX9EyqFPDJZKJiYXMVjZ3 yw2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UkbHJpg+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id n5-20020a170903110500b001c5bfb049a4si15292828plh.368.2023.10.11.03.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:19:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UkbHJpg+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 60E928347B63; Wed, 11 Oct 2023 03:19:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346256AbjJKKS3 (ORCPT + 52 others); Wed, 11 Oct 2023 06:18:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234764AbjJKKSL (ORCPT ); Wed, 11 Oct 2023 06:18:11 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2F361BFA for ; Wed, 11 Oct 2023 03:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697018874; x=1728554874; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bWANzQ9T/QGDKqgs06ShgCH2sHgnaVQIv/mfQCgfJpk=; b=UkbHJpg+yLHVF32KtQwKrn4+PZ2MLVb9xHkXsOe8X0aEi+Uf7lDSgj2x Dv8gkl61cDl1R2kQswT2F1z/p1nfAAwYLkNm9rjKMFo2mJ41mE7yEPJ4U dsfACXJ9IM3dps9oOZVkrQ8ZhnLn0DCQPH/sE4goAD9JQuu3bZXml1+3n rZYPTUcIKkDy3wTNsfVFNj9t6tGrJPTYFRrMoSZ04ju2JDJF1WLab3V/G wH5kIXg8iIUh5fJ+oWtHUjvD/YB83cej6RYPrIoFXbpZCyKn/X/RslSpD 59li5qUBYUlN7U5bNd0sNok0jI3UZBcpq+wyPL3n+eePtpx/qaHyCGbT/ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="415670583" X-IronPort-AV: E=Sophos;i="6.03,214,1694761200"; d="scan'208";a="415670583" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2023 03:07:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="1001050266" X-IronPort-AV: E=Sophos;i="6.03,214,1694761200"; d="scan'208";a="1001050266" Received: from mzarix-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.249.94.125]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2023 03:07:53 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer , Gregory Greenman Subject: [PATCH 05/16] wifi: iwlwifi: mvm: Fix key flags for IGTK on AP interface Date: Wed, 11 Oct 2023 13:07:20 +0300 Message-Id: <20231011130030.f67005e2d4d2.I6832c6e87f3c79fff00689eb10a3a30810e1ee83@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20231011100731.361200-1-gregory.greenman@intel.com> References: <20231011100731.361200-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 11 Oct 2023 03:19:00 -0700 (PDT) X-Spam-Level: ** From: Ilan Peer When an IGTK is installed for an AP interface, there is no station associated with it. However, the MFP flag must be set for the installed key as otherwise the FW wouldn't use it. Fix the security key flag to set the MFP flag also when the AP is an AP interface and the key index matches that of an IGTK. Fixes: 5c75a208c244 ("wifi: iwlwifi: mvm: support new key API") Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c index f49820647041..ea3e9e9c6e26 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c @@ -96,7 +96,12 @@ u32 iwl_mvm_get_sec_flags(struct iwl_mvm *mvm, if (!sta && vif->type == NL80211_IFTYPE_STATION) sta = mvmvif->ap_sta; - if (!IS_ERR_OR_NULL(sta) && sta->mfp) + /* Set the MFP flag also for an AP interface where the key is an IGTK + * key as in such a case the station would always be NULL + */ + if ((!IS_ERR_OR_NULL(sta) && sta->mfp) || + (vif->type == NL80211_IFTYPE_AP && + (keyconf->keyidx == 4 || keyconf->keyidx == 5))) flags |= IWL_SEC_KEY_FLAG_MFP; return flags; -- 2.38.1