Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2367045rdb; Thu, 21 Sep 2023 17:15:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYW4G7b4gIKV+O3ZFNpY//mFI+zgiwxPOURn9q1eGxVYREUBQ9lY0MCZiFuZvPRLL24iHn X-Received: by 2002:a05:6870:c152:b0:1c0:fe16:90fa with SMTP id g18-20020a056870c15200b001c0fe1690famr7304551oad.56.1695341724435; Thu, 21 Sep 2023 17:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695341724; cv=none; d=google.com; s=arc-20160816; b=WiHfvFwBFMPWwxf623tdHtHLRGC+NF6I9W1oE8TT+XOcYH5B7QPuvI+rZa3ZpmscUG qAKr9lP+VYWWz2yVPB8/kNBCeT6/cwQ4UshiS6CxhEKX6kG4Y2LYVBYlbez9OLgL+eyL QdYbjfmXcss9jVDmbcyuMI9bE/oYfOLogQ4kR+1ulwE4r5+LDx3R+P5BooBTN+RECVrX +c9KETAbRjfWQ5f3eD5U2petMEEj2fAzHapnsl6nYbl4NoaJc3fan0+yWamz6Gr8xHFa eB8LyBt7CKkuzKYFJNDcYNsMjuk676oxbpWUkdD8/TOe/tAPUGf2o3YCnRSyC7Glimhz R1bQ== 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=Zx/KTJbmGsA9Agv06JspuPpwYGsZgeSeBh5tAlqCfb4=; fh=Y2IfAqdjkYQAx7XZcGq/8JceY1atOOwfX771vvMvH7o=; b=aO10k5EiZGNV/Ne3rRvWL4UVjWCvkCpwFJLsJTiHHBLOqxEBWogJXmJd8B6i87c9xK i4ywI/03V6Lmx8e6gyRQEdCP/m8ziSy6bWdMi4Zdsi5UfHJQzo38CZQjvDS1y6NxsDD4 /Se9zd6gYwVx8bqzr05z3rH7ELLUzOOvnHdM9q9Fahv94RUTc1ytxaZR1s/YL+rF1KeW bFlL1QZJmj1K2nIF4jy7o7gMcTrBWWwqhZGFuZL0sRDgkEJv8J1p2JYMzz6FgTG1IDbs ozrCZGwOuiUWmLOoKjpG2qH6g4C5f6gkZQ9Io0Rzl/OQT5hUnpAa3ZJkAbwbTVJWw7FM mKwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DhOzpMzt; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id a71-20020a63904a000000b0057888936295si2424963pge.767.2023.09.21.17.15.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 17:15:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DhOzpMzt; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 277F280743E2; Thu, 21 Sep 2023 12:05:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230238AbjIUTFQ (ORCPT + 56 others); Thu, 21 Sep 2023 15:05:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231246AbjIUTE3 (ORCPT ); Thu, 21 Sep 2023 15:04:29 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 884005A56B for ; Thu, 21 Sep 2023 10:50:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695318623; x=1726854623; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qlzk2SgvGxnJaXvH29WJ8Ri5QPsI0Iproy6HF8JbI9g=; b=DhOzpMztmmKtQmy5JydU2lRoMGQWFz1T4KZ7sW1Jg93MK1kWk9apsrPA zz51n4txsVAFG7w7opqYU22TJ+VGVjTWjQBMTCC6UpUMhy4lGzeMWb1Vo 2aIe6C6XFes7VoTWkSe+FM4x7vWIeDVF+gq/YhGki8a05MzwEfB6Koy6O B18vkq3VKhrp5XDtnQejXWnXPxWJ06+PEGvt8rldpHCnZFMnLZcZk9qqi dmBRiZvQIfexpJScHRHqzRRkP9Djcw8Gy/fCG80IXgzvqwZfF5g8MkgCC FVKBbslf0uLq7McFgM/KHWd0iauSqPxHeN1LCbRdOsWVXyfTUgG4kDXXZ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="384305307" X-IronPort-AV: E=Sophos;i="6.03,165,1694761200"; d="scan'208";a="384305307" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2023 01:58:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="740545507" X-IronPort-AV: E=Sophos;i="6.03,165,1694761200"; d="scan'208";a="740545507" Received: from rchuwer-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.229.163]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2023 01:58:45 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 02/12] wifi: iwlwifi: mvm: iterate active links for STA queues Date: Thu, 21 Sep 2023 11:58:00 +0300 Message-Id: <20230921110726.7ee1f1a55e1c.I410c512d1fad7d1cf9b2d2a3451a312821dc816d@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230921085810.693048-1-gregory.greenman@intel.com> References: <20230921085810.693048-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 21 Sep 2023 12:05:14 -0700 (PDT) From: Johannes Berg During HW restart in eSR, links allocated in a station and links active in the interface may differ. Use for_each_sta_active_link to capture this. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index 51ca99bd5117..61d564735d57 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -865,11 +865,11 @@ int iwl_mvm_tvqm_enable_txq(struct iwl_mvm *mvm, if (sta) { struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); + struct ieee80211_link_sta *link_sta; unsigned int link_id; - for (link_id = 0; - link_id < ARRAY_SIZE(mvmsta->link); - link_id++) { + rcu_read_lock(); + for_each_sta_active_link(mvmsta->vif, sta, link_sta, link_id) { struct iwl_mvm_link_sta *link = rcu_dereference_protected(mvmsta->link[link_id], lockdep_is_held(&mvm->mutex)); @@ -879,6 +879,7 @@ int iwl_mvm_tvqm_enable_txq(struct iwl_mvm *mvm, sta_mask |= BIT(link->sta_id); } + rcu_read_unlock(); } else { sta_mask |= BIT(sta_id); } -- 2.38.1