Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2850448rwl; Thu, 13 Apr 2023 11:43:21 -0700 (PDT) X-Google-Smtp-Source: AKy350aXympcxn44G5E/0oOmu47e/rnP7CkYT53kW20hm4V1doXshoCI0QkicWf8HLf/a8q1PHnb X-Received: by 2002:a05:6a00:2e8d:b0:636:f5f4:5308 with SMTP id fd13-20020a056a002e8d00b00636f5f45308mr5384274pfb.7.1681411400843; Thu, 13 Apr 2023 11:43:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681411400; cv=none; d=google.com; s=arc-20160816; b=ASRewb74jhTLrjPImqYRYmLd5Fpbh58YFsHT50WVbY3Ahg8+lbu4cJ3HvvYsSTqHpN bkkyzNm0Tu7KLvY7SO5JBTxW9E+rQgwoSGCvMhIWt0KPl9CjznId6C5G/ycfE28phQVw OT08TFV4rvUEERH55RjX82ejEbxw9Z3t/Skc6nwBOKieGVIzGai7xXeEG3PYVj1u0ogk dMltP9wVj19cmLnSor8Et7K/r3nzC4q2Iw8IOdMe0f8c5P7/oJWaHiPFjbyejtWADxOS +FjGYCTvhNsBGtCkBEtia4Ul0Suukcor8E5yJ2d4HLQBHELePGudgcrAy+rzJxmlSvuK k+Sg== 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=NLXLt5rR8UToGe0EOkBSRgqs3oSik56xd+pUYwHeKc0=; b=SM9zPanQ5wuBZqgnumxLCPMOUCl7YK4fHNnZQFGt5eXWCmN8VN+o8RhX59m1eivIM9 AU2Wt1zCYkhFr9Bhps+wR3CQcj7a4qwoF9h/vTGe4kPrvduV0MUMsy0rs3C89weNql8Q vNq8QErrxvcGMh6nhwGBCHpRQ8z9GFFgv0RKErTsAAaTfcyk2G4erCd/J8QNTMdjhoSV 8blS58nouEywYIn/av8uKOTCPfK5cZUfkhD15audBYYJZY9ETvH1hum03/EB9uBhJtTw H1MiT2FOSx5ewwLk+VLp1hmx7rul6Ram+PuswRlLTo1CByyfym3ZQ57syr18FfUtlYBJ uGHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=l1hgvBB5; 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 s7-20020aa78bc7000000b00637ab953799si2239824pfd.168.2023.04.13.11.43.11; Thu, 13 Apr 2023 11:43:20 -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=l1hgvBB5; 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 S229922AbjDMSmo (ORCPT + 61 others); Thu, 13 Apr 2023 14:42:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbjDMSmn (ORCPT ); Thu, 13 Apr 2023 14:42:43 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7762A83F5 for ; Thu, 13 Apr 2023 11:42: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=1681411343; x=1712947343; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yhR5YMhFEHD/3i6I88f26DmRxUOrdW9fnYIcHq+mDJY=; b=l1hgvBB5coahGhOv/+7uaovxn+4lbhvwCUyOtIYnV6i6UM8h//waVbz+ nj5nmnpJ5x9lWwlLpBpKybQV0w2XpABrWJ/8bVgIg8okAGSMXu0QBLWPj palnZE4bUVrsBQLcA5NZNDcNK6mAo6SivqIN6/j2SSYwZIYrtp23JjkhU r6u8/XRt39/QLKeDTVCpZFpi7tW93tupvJ3WFKHRNUB30mr9kmGr0+mYT w3UhFmk20N2xNnhIoFZCLVOS8uRM/DrLfx6fGW/JohFyB6G5QOvSS0yxQ VdO5+Py8mK5ftOSv45ldC/+IuriD9q/y1fG/voDPYBgfJXHqhTi9BvwOy g==; X-IronPort-AV: E=McAfee;i="6600,9927,10679"; a="372127126" X-IronPort-AV: E=Sophos;i="5.99,194,1677571200"; d="scan'208";a="372127126" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2023 11:41:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10679"; a="719984510" X-IronPort-AV: E=Sophos;i="5.99,194,1677571200"; d="scan'208";a="719984510" Received: from apeled2-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.251.184.75]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2023 11:41:22 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ayala Beker , Gregory Greenman Subject: [PATCH 15/15] wifi: iwlwifi: mvm: scan legacy bands and UHB channels with same antenna Date: Thu, 13 Apr 2023 21:40:35 +0300 Message-Id: <20230413213309.fd582c423ad8.I35239f94cb3ee1642d16936199c336a07ec2df8f@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230413184035.1140892-1-gregory.greenman@intel.com> References: <20230413184035.1140892-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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 From: Ayala Beker In case of UHB scan that follows a scan on legacy bands, consider both scan commands as part of the same scan cycle, and thus configure them to use the same antenna configuration. Signed-off-by: Ayala Beker Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/fw/api/scan.h | 3 +++ drivers/net/wireless/intel/iwlwifi/fw/file.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h b/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h index 7ba0e3409199..ec96ba053a5c 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h @@ -709,10 +709,13 @@ enum iwl_umac_scan_general_flags_v2 { * should be aware of a P2P GO operation on the 2GHz band. * @IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_RESPECT_P2P_GO_HB: scan event scheduling * should be aware of a P2P GO operation on the 5GHz or 6GHz band. + * @IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_DONT_TOGGLE_ANT: don't toggle between + * valid antennas, and use the same antenna as in previous scan */ enum iwl_umac_scan_general_params_flags2 { IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_RESPECT_P2P_GO_LB = BIT(0), IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_RESPECT_P2P_GO_HB = BIT(1), + IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_DONT_TOGGLE_ANT = BIT(2), }; /** diff --git a/drivers/net/wireless/intel/iwlwifi/fw/file.h b/drivers/net/wireless/intel/iwlwifi/fw/file.h index a0260a1fa099..34ef106a2274 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/file.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h @@ -459,6 +459,7 @@ enum iwl_ucode_tlv_capa { IWL_UCODE_TLV_CAPA_SYNCED_TIME = (__force iwl_ucode_tlv_capa_t)106, IWL_UCODE_TLV_CAPA_TIME_SYNC_BOTH_FTM_TM = (__force iwl_ucode_tlv_capa_t)108, IWL_UCODE_TLV_CAPA_BIGTK_TX_SUPPORT = (__force iwl_ucode_tlv_capa_t)109, + IWL_UCODE_TLV_CAPA_SCAN_DONT_TOGGLE_ANT = (__force iwl_ucode_tlv_capa_t)111, #ifdef __CHECKER__ /* sparse says it cannot increment the previous enum member */ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index 07045092c717..7749f15b7f14 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -2081,6 +2081,11 @@ static u8 iwl_mvm_scan_umac_flags2(struct iwl_mvm *mvm, IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_RESPECT_P2P_GO_HB; } + if (params->scan_6ghz && + fw_has_capa(&mvm->fw->ucode_capa, + IWL_UCODE_TLV_CAPA_SCAN_DONT_TOGGLE_ANT)) + flags |= IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_DONT_TOGGLE_ANT; + return flags; } -- 2.38.1