Received: by 2002:ac8:3b51:0:b0:3f3:9eb6:4eb6 with SMTP id r17csp2796468qtf; Wed, 24 May 2023 10:46:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ngScn47LEQUA9q9m/lrL8ljDjRNuGxhh1dOgZc9iBurCjZlMpvk7g5L9MzxnaOXkc8jxW X-Received: by 2002:a05:6a00:1488:b0:64d:2ea4:937a with SMTP id v8-20020a056a00148800b0064d2ea4937amr5404312pfu.7.1684950382882; Wed, 24 May 2023 10:46:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684950382; cv=none; d=google.com; s=arc-20160816; b=f7/fZxeNRbpUoqiEIu9WD1R4pFbpoMQ7BtV8n1ePrXzxQW2PUI6IGSJjcTiSArcWq+ 0z3QcvaRIBf1RXh2hQFRCbzpz1BJBwEofMcIp4TqU86upWrPDFzS+ir8tFvDH0WOnqkk Zas1sPiks2aAFfgBFgaRxBxS6mMECIe75IPm6CX3OwBOExUx+/ZEcIBq7fLNxo9HLEpt z9sdIkuYM7PBS20TLdAmT99qn/RKjST04wQucxbON9KcUn4/jmP6aoyYY0jI+OF6TyDU wtkYZKKeXxOREYgk3+lFqs181DjcbLJjR3MSh1xBCb34SZNS1dsDPsfdycOXhvT/e4uq z36Q== 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=CN41oWpGKRKEWh1DiUdfShAOUzbOTrRbrG5yg8ffryU=; b=vbLE6LBE548MCaUtgaRualyXPU/fZnyYtZolt/HpAuCrqs5f2Z5RoBVVcj3wKKFS9R G6Bq7uW8dk04+fbOnK+s0eTWuI0JzjYyBrd/yjUqcZPNCrwwtgbSDhQPnPP5szInDYHz atHOX5Em50IykiyVsQ4JMR7PR7teLTxaFXJVs06zEe5JTsLq2SW3irLv9fbZoZmukv5d dW0urRnrYe/f2LAbJ9wifIWZAOJgUqVjIuYAl9qEYaPzYdEeKXAzibaLZyGXzJT0UkO0 uPuKG2RFfbgyrRB5AjpFBxsXNM5VslkEekIQ3Qv1DEqWD2mp0yOZez1ZWD7iaFMMQkKy iGUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Q6o2eYB9; 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 g13-20020aa79f0d000000b0064f7150b45bsi887979pfr.352.2023.05.24.10.46.14; Wed, 24 May 2023 10:46:22 -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=Q6o2eYB9; 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 S236153AbjEXRqA (ORCPT + 62 others); Wed, 24 May 2023 13:46:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236044AbjEXRpy (ORCPT ); Wed, 24 May 2023 13:45:54 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 144D6135 for ; Wed, 24 May 2023 10:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684950318; x=1716486318; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PqtcsslFkkVNO7nrIn1NxBzz1jUiP1SwibqK0cqnKLU=; b=Q6o2eYB9WjLH6z5iB15r0WGMtuF9PjLB6CgDEFXyWpjPgW4YMeQASpmY sCh81YMaAhvvHyNlL6SzgAs89gf19uQUFNHM3U3iR/v3ZiBlDtutExC0V LcbFAcsviea7ps6pnTbSiiT+wcBPw/uafwYuno13ItVnob6Glp5YWOvE1 BVqD99p1A1PLEOCjaiSPCkh7sZSV/wj8pPg4B56Had+Q/AcInlX1YG8Jr EcCcwCrjr8j/uAWFklRemviemJsA8AJdGNjsrUBTzNBD+noWUhW9N4kqW AW4Fj0rk3TStJzw8B51Syj2S03Yr9yzSIFDl8yYGAZDATgDV/aMlOX9/H A==; X-IronPort-AV: E=McAfee;i="6600,9927,10720"; a="440000423" X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="440000423" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2023 10:42:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10720"; a="769547941" X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="769547941" Received: from hmozes-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.249.89.195]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2023 10:42:48 -0700 From: gregory.greenman@intel.com To: kvalo@kernel.org, johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Miri Korenblit , Gregory Greenman Subject: [PATCH 07/14] wifi: iwlwifi: mvm: Make iwl_mvm_diversity_iter() MLO aware Date: Wed, 24 May 2023 20:42:04 +0300 Message-Id: <20230524203151.56a9c709e987.I9716195ec288cce2c929338c254ee9add8cfcc1f@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230524174211.1482360-1-gregory.greenman@intel.com> References: <20230524174211.1482360-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 From: Miri Korenblit This function is MLO related, so it should iterate over all the links, and not only on deflink. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman --- .../net/wireless/intel/iwlwifi/mvm/utils.c | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index af31b09c3966..2a10d851d2e4 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c @@ -413,16 +413,20 @@ static void iwl_mvm_diversity_iter(void *_data, u8 *mac, { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct iwl_mvm_diversity_iter_data *data = _data; - int i; + int i, link_id; - if (mvmvif->deflink.phy_ctxt != data->ctxt) - return; + for_each_mvm_vif_valid_link(mvmvif, link_id) { + struct iwl_mvm_vif_link_info *link_info = mvmvif->link[link_id]; - for (i = 0; i < NUM_IWL_MVM_SMPS_REQ; i++) { - if (mvmvif->deflink.smps_requests[i] == IEEE80211_SMPS_STATIC || - mvmvif->deflink.smps_requests[i] == IEEE80211_SMPS_DYNAMIC) { - data->result = false; - break; + if (link_info->phy_ctxt != data->ctxt) + continue; + + for (i = 0; i < NUM_IWL_MVM_SMPS_REQ; i++) { + if (link_info->smps_requests[i] == IEEE80211_SMPS_STATIC || + link_info->smps_requests[i] == IEEE80211_SMPS_DYNAMIC) { + data->result = false; + break; + } } } } -- 2.38.1