Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3029305rdg; Tue, 17 Oct 2023 02:17:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8IqHDMuGtbMuTvaKkkHd8zfliI9drGUSpSs6ipER/8LgWL0vv4Xt85kJFqqlE2TJScs6e X-Received: by 2002:a5b:e8f:0:b0:d92:ce77:b52b with SMTP id z15-20020a5b0e8f000000b00d92ce77b52bmr1336338ybr.47.1697534260647; Tue, 17 Oct 2023 02:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697534260; cv=none; d=google.com; s=arc-20160816; b=TtslRoLcEzD/h1iFEVY9cgt2LllcWtOygCFhpjcI4vMCwhATdNJXJ2lRa//eJH21i0 SCjDfDn4Fpx24Y9cltdYGMOOsMhDvY9PFeBtjXEQrPaD1rJoIVqywg2G7iliW4gTUZ4c GfS9OciBVVHWVxgnSmfxm7/urkLE521eK2wg1lQz1PemZe35gSF7uV1PFm18QJiKZiU/ dAFIWHMWPXDdqqsBqDe9JoMidF4uTKhKSZev0GOyU155/0JLjLWn5luI+CXs3+eq3chR bkj76C9R986khaELfbhkG/g8wcVzQ5PP8ebgzN+bLMtysTensRHsvJOy7F5lj0+zkyoF si3Q== 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=IaULMvc7lAIzTXkS/k9uuVo4yIu/pOkQyJqG/qcZALw=; fh=DhSylmOH9JFjkygjsFddDQ2RWrzOIKBtRU/Ws3tkwkY=; b=KsVbRu++yEDKijoPXqIAVXNgQp3T1DP4zA6VmPa2XB8O1LkRA5CQ3GXrc63+cIy2sp GgWaMiDDOULl+E+2M9fQPBdmKGe+u4zvXs/Lurw4C9+TY1PlIM+EhtNFRon8ruqbOZBs MLpD+QUo/zPfpT1lr8XlCzjF9/oi2O6oGt0g7gsPAJeLM0yW3N4pVzu6eKkAn8ZBo2oZ OxKwoWdFdos5UApxinusHJT2d4EpefvGCh9foylk/OgsVs8XJPXz4ZAUX7RhIusnGfp+ fj1ERXu7dwslDTesv7GCm0WHVnot9ahcH9K/THjrTmrQPpZWqZ5QnymB4CwKpQTvkuAF kDxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jMI31Neu; 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 u10-20020a056a00098a00b006b54b82dac0si1242551pfg.298.2023.10.17.02.17.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 02:17:40 -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=jMI31Neu; 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 933F0805DC68; Tue, 17 Oct 2023 02:17:38 -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 S234821AbjJQJRf (ORCPT + 52 others); Tue, 17 Oct 2023 05:17:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234828AbjJQJRd (ORCPT ); Tue, 17 Oct 2023 05:17:33 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EDECFB for ; Tue, 17 Oct 2023 02:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697534251; x=1729070251; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3qzVT5oIfZ44dbUYJSI1X7CaeoNzwsxLWjD/B7udzho=; b=jMI31NeuWu7hzO2UXcVuVU6x9ALRQLkeHPDkwPbUUfD5uuTkl3fX5kQI Uonkzbt8OPtCa+bjbPs7gRI7NvUDJ8bxzQzQjssxCmtQsOYxUlzTo170o eNzfKjtobtKVwgdLaQdpmvnwZZUtjgej30+56KPenEBuR+3u/XpCTosXT v9Aa7p5kZGEXpR6gPbPKQcbWEb2QuqRiufFTDQfbtb6WRNO0FKSAkBw4k PzBqSRM9Jlr/RCk/dPOepczeLFHUh6aRkemaG8Egv3u4RlkuNL9DmFsEy 3pc1CecyNeE/Xe92cup+OdNIyA9db+VXg8gZaQHhbWqTrzj4/BZkt9Set Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10865"; a="370808566" X-IronPort-AV: E=Sophos;i="6.03,231,1694761200"; d="scan'208";a="370808566" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 02:17:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10865"; a="759731964" X-IronPort-AV: E=Sophos;i="6.03,231,1694761200"; d="scan'208";a="759731964" Received: from obarinsh-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.214.213.101]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 02:17:29 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Yedidya Benshimol , Gregory Greenman Subject: [PATCH 13/14] wifi: iwlwifi: mvm: update IGTK in mvmvif upon D3 resume Date: Tue, 17 Oct 2023 12:16:48 +0300 Message-Id: <20231017115047.8ceaf7e5ece7.Ief444f6a2703ed76648b4d414f12bb4130bab36e@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20231017091649.65090-1-gregory.greenman@intel.com> References: <20231017091649.65090-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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]); Tue, 17 Oct 2023 02:17:38 -0700 (PDT) From: Yedidya Benshimol During the D3 resume flow, all new rekeys are passed from the FW. Because the FW supports only one IGTK at a time, every IGTK rekey update should be done by removing the last IGTK. The mvmvif holds a pointer to the last IGTK for that reason and thus should be updated when a new IGTK is passed upon resume. Fixes: 04f78e242fff ("wifi: iwlwifi: mvm: Add support for IGTK in D3 resume flow") Signed-off-by: Yedidya Benshimol Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index ffb1fdd7ee32..46ee280231ea 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -2031,6 +2031,16 @@ iwl_mvm_d3_igtk_bigtk_rekey_add(struct iwl_wowlan_status_data *status, if (IS_ERR(key_config)) return false; ieee80211_set_key_rx_seq(key_config, 0, &seq); + + if (key_config->keyidx == 4 || key_config->keyidx == 5) { + struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); + int link_id = vif->active_links ? __ffs(vif->active_links) : 0; + struct iwl_mvm_vif_link_info *mvm_link = + mvmvif->link[link_id]; + + mvm_link->igtk = key_config; + } + return true; } -- 2.38.1