Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp211067rwl; Wed, 29 Mar 2023 00:09:13 -0700 (PDT) X-Google-Smtp-Source: AKy350brr3QhEnjPwWaA0DQIzt4z6/8zC6hTsBs2/J3GjHI/2LQ0JYX1YzcTeV7XykeATCpHJlA1 X-Received: by 2002:a17:90b:4a8b:b0:237:99b9:c415 with SMTP id lp11-20020a17090b4a8b00b0023799b9c415mr19418669pjb.38.1680073753783; Wed, 29 Mar 2023 00:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680073753; cv=none; d=google.com; s=arc-20160816; b=Yud2icVCZIGx2lUmd0tn1dEMQu8i6DXDzlz+PL6NHPfryaYPzxWe36tlms+kn3kZXc hvcDyd0Up3yHpj4TekiHOuaGXkil9W/FRzcW1ID0m6vw4nuo1Q/bjZQLhYGAlKxYjI1K ZXLWhhprf0b7P4WkyR11qWuEf/ARjJiJ+z/JR0NzMuCR8xr0ox6QP+4pr2Fvqm9y0jOg qstvCS72kWdVan4nKO1S0C2JSOliOq8TuUhBiZm6JW3UrdOMEFrEFmgH8UTt2YUEiuLc haWlMzYvdBgGoXxqoBWGu/qMxb6w5iYwe7iVTTT01lgwl4hJHCxmmpMBS+HgDyfrGykm rgOQ== 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=mEjtp7VOJ0gq6LIiI55wHLvubH6LuR00ztZ1yi+tQNU=; b=fNc5C+XfAh/OQaiV9hMd/bFv9N1rBl3dbnoNQoeGI445M6LonF0rIB4RRR+5w1XuKO 52AvsrPB/vj8/SG6x9LrQdlyUD/51yhBI3I7fUjpGQqZNuPPZElqjOdXbAqcM7Zk32Gy cpeY7ceQLkUTTUif1H7J0sGXCOOIh6ZMUOx4cwn7H8I+5vsE5lgdEiWL99fkD/dZ6oGC PLGHvVBLhUP57h8e7pCVpDUxeG27sGLYOkgFC14smPlfdx1Kfg9vsqJYJ5ASnKFaMgNf 1VHaK9MkqrAcluI+ArbMNx7/PWvojun40ZP4kVzY65stWwV2lYd0bqC7dbWZWCwnRZfQ eqKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KC6TrO2M; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s16-20020a17090ad49000b00240263ef11bsi886524pju.120.2023.03.29.00.09.06; Wed, 29 Mar 2023 00:09:13 -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=@intel.com header.s=Intel header.b=KC6TrO2M; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229663AbjC2HIh (ORCPT + 60 others); Wed, 29 Mar 2023 03:08:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229821AbjC2HIf (ORCPT ); Wed, 29 Mar 2023 03:08:35 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1908830ED for ; Wed, 29 Mar 2023 00:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680073699; x=1711609699; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VoUaCKJz1zPDVqUDp1cNNOyUZJBcbbcqVnm+2sOP6UQ=; b=KC6TrO2MCnV1k0mFquIvpZDvEwFnqw4mdO1EKAlTUrIbe5hBjMdA9Mm8 MMeJArFoU8NAL6JA8y2U44N+fybRiW2YLSAvvtqMhqgPJeXemMK0YzDmS zNuNWhhPkXRl+ZiEiRPtXzW5ZTkTvZHnVQAQdZjOeLy5XDmEmONKPyJRk aPSIrIFO4kKaTP5aV60PwxLWwv0rByW6hX3xVdYOAL2ukpDoyYVRrb3Q0 GfR7Ucp8wMyMQA3df3To3nEbLRgxoM1/O2U879q3v7aVg5jVXu3WFSRoP 8vfyiUs6mgTdCC9oQaVE9mRayiK2mxy3GXjIig+RwTT+HFUJjWskPRq8g Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="320450972" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="320450972" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2023 00:06:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="795111439" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="795111439" Received: from sfrank1-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.214.228.42]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2023 00:06:46 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Gregory Greenman Subject: [PATCH 27/34] wifi: iwlwifi: mvm: update mac config when assigning chanctx Date: Wed, 29 Mar 2023 10:05:33 +0300 Message-Id: <20230329100040.d7882a0d6e04.Ie38cd854a237c46cf85fd7143dc757326f30da6e@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230329070540.2739372-1-gregory.greenman@intel.com> References: <20230329070540.2739372-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE autolearn=unavailable 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: Gregory Greenman Some mac parameters, such as HE support, can change at this stage. Update mac config before updating links. Signed-off-by: Gregory Greenman --- .../net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index beef706d0598..4d56b2fc5f33 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -231,6 +231,18 @@ __iwl_mvm_mld_assign_vif_chanctx(struct iwl_mvm *mvm, if (WARN_ON_ONCE(!mvmvif->link[link_id])) return -EINVAL; + /* mac parameters such as HE support can change at this stage + * For sta, need first to configure correct state from drv_sta_state + * and only after that update mac config. + */ + if (vif->type == NL80211_IFTYPE_AP) { + ret = iwl_mvm_mld_mac_ctxt_changed(mvm, vif, false); + if (ret) { + IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr); + return -EINVAL; + } + } + mvmvif->link[link_id]->phy_ctxt = phy_ctxt; if (switching_chanctx) { -- 2.38.1