Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp211794rwl; Wed, 29 Mar 2023 00:10:03 -0700 (PDT) X-Google-Smtp-Source: AKy350b/x6jyfdET+Ac4jwKBb+aHVF/AsHHv1ISub0F+NaUdCj1wFrAbbJ09vyH44WZGJ+uMymP+ X-Received: by 2002:a17:902:e0c5:b0:1a0:6eb4:3871 with SMTP id e5-20020a170902e0c500b001a06eb43871mr14681717pla.20.1680073802801; Wed, 29 Mar 2023 00:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680073802; cv=none; d=google.com; s=arc-20160816; b=sHolNdKGZFSXWhxgFAcgNZK8DPkLeyRimm+BKG6t6FKB/kLbAe1a38t+qDPGZMWFRe +ahpchcL+/K57rc1lc4RhMnzUYldMCjrrHBNCX2cq6BZAVERkp6xTGbRFmGp7jOTh72r BryxtSSLswMWcExbkWqX7/IsYjf5qylA0Mjb3pIRJIRXer/ZS8gojvhdwZsg5E0MAPKn Xam6eSNnwAOVMrim531aVIauXeAolQT1A2waycZmn01ucdhjqSA1+quQihub9n6yWepY KnYybi+Mx9IT3MvBbwbhGExSQO7S6vWatPMZv4SRGHA05IykyvWWw1UnEnPxXpEVtwbB +O1A== 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=fGbfpqr4DTKTv+H9KXaFpVRIaTG6uNPpTYaHndOdkoM=; b=JNJ7DeBfAgCbqMmpNU3Spp1WZhQLy/FlXBB5CfZeKUSNxn7xJID9RxzN6iDV68pjtd MM/jNbwWtdsA0ea+V9ZFQYHuqoVxNz4L7KHX3wyZInTeTpg6IkPZWkwZR39wbr4EY4ZU fB6Tvl7YBsIUFyCGe2QEoJgA6IhxJ2hd398emzcLyT4AdqHhN4Y9aKlmZ60tlP7Lr9TI l7rWFFkk6GMkD3YYsJgtjzcCwLguga7eBWjO2IDwfTO+SxtfcCbXK3UFGCTI2LZIZ4A8 8iRnu7UjoHiwYM1uLYISKG9Ky0xuPHiLThpGUPYVwRjgHdvOKIvRKEcinvAyG0rIdSVr ehwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SC08UHvZ; 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 r4-20020a170902e3c400b0019e37273a1bsi29552976ple.402.2023.03.29.00.09.55; Wed, 29 Mar 2023 00:10:02 -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=SC08UHvZ; 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 S229819AbjC2HIo (ORCPT + 60 others); Wed, 29 Mar 2023 03:08:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229823AbjC2HIm (ORCPT ); Wed, 29 Mar 2023 03:08:42 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CF5535B6 for ; Wed, 29 Mar 2023 00:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680073706; x=1711609706; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LOIK2LYOwsmrqLfCpdHjNxGfzJyQIijwX+x8hznW1dY=; b=SC08UHvZ+YFteRr7H++jaqXgbBEqru0QYDIoAZd0ckK5e308wmlPpZtC VerNo2yvCMfb6wYPvbJkJqzEgLwDGHdtZLhs5+NfFqNdOfAaLCOUz2+hQ 9ArRE5ubnrrDoX0oaMPyL9yA1mBjHPqzOJHeu6guEZK2Vg3rbQS8YP3KW FnluWgUPcYYDFO1/yjuiAJE6QN2E1nWNCx8gDySWNvcZD+2IYC+SdLhVA fUP99phC1qqUsNM1HwgdRjJdaNkkZmFHbwKR+uVTsoyrk0Kd7XRueVExB NojwKn7mQeTZgugcvMr1RGO2FSE4YUk2uNu3R7H0THve04QWdpgUAaBfn w==; X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="320451006" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="320451006" 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:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="795111488" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="795111488" 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:50 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 29/34] wifi: iwlwifi: mvm: send full STA during HW restart Date: Wed, 29 Mar 2023 10:05:35 +0300 Message-Id: <20230329100040.62d5371bb3c7.Ie25b62125a3a022f76a36bae5fed9796c18698aa@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: Johannes Berg By using the internal station add the station is installed in firmware with zeroed MAC addresses, which is wrong. Use the full installation function instead, to fill all data. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- .../net/wireless/intel/iwlwifi/mvm/mld-sta.c | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 4d713c78b508..26686cc7ff4c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -572,10 +572,9 @@ static int iwl_mvm_alloc_sta_after_restart(struct iwl_mvm *mvm, struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct ieee80211_link_sta *link_sta; unsigned int link_id; - struct iwl_mvm_int_sta tmp_sta = { - .type = mvm_sta->sta_type, - }; - int sta_id, ret; + /* no active link found */ + int ret = -EINVAL; + int sta_id; /* First add an empty station since allocating a queue requires * a valid station. Since we need a link_id to allocate a station, @@ -598,23 +597,19 @@ static int iwl_mvm_alloc_sta_after_restart(struct iwl_mvm *mvm, continue; sta_id = mvm_link_sta->sta_id; - tmp_sta.sta_id = sta_id; - ret = iwl_mvm_mld_add_int_sta_to_fw(mvm, &tmp_sta, - vif->bss_conf.bssid, - mvm_link->fw_link_id); + ret = iwl_mvm_mld_cfg_sta(mvm, sta, vif, link_sta, + link_conf, mvm_link_sta); if (ret) return ret; rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta); rcu_assign_pointer(mvm->fw_id_to_link_sta[sta_id], link_sta); - iwl_mvm_realloc_queues_after_restart(mvm, sta); - - /* since we need only one station, no need to continue */ - return 0; + ret = 0; } - /* no active link found */ - return -EINVAL; + iwl_mvm_realloc_queues_after_restart(mvm, sta); + + return ret; } int iwl_mvm_mld_add_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, -- 2.38.1