Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2484021rdb; Wed, 4 Oct 2023 02:37:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFbJc2EBKDJOrCduxxlVReIFpX7zDuQSidYY4AODPSNjtiuBpsLsdN76f1rme0FF0H2lSs1 X-Received: by 2002:a05:6870:a98b:b0:1d6:55a4:d97 with SMTP id ep11-20020a056870a98b00b001d655a40d97mr2040278oab.32.1696412252205; Wed, 04 Oct 2023 02:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696412252; cv=none; d=google.com; s=arc-20160816; b=rb424dwF9N1V0tNa1GU+2ZC2lZIEWTY8+luGAJTJqe87TsTClN+sbRZoMW2a0xp9Wb Dlqgzgon4baWLRx8syu5mV12eA7+Kob0+mjYR4O/PXeTghBPtOdQVOSUftFHPUxyIQjP 7sKjWMnpo5ZEok0GTxh1jEJXh+sbMWzdZf8sxljvCNMNNZGP5uc/UVGuYNzuHuUoHxTf 24dyr3namvIHVnSEfrcrQJM7RFkcqOxrLNAWRBsCYAYVrwx7yTMhUXLOQC/czcrN3j5W XymPNc5Snt/AV0nTN7Tzfc9Uo++twewPxf6413jNGMlrXkVuTPwohAd4Uaz4O/JnEyU6 XG3A== 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=Mj6gWzgwOpwYi8+/cuyIM/eF3LytCo5mN4kM6J7LYWQ=; fh=/GEb7gVUqTR6q5QKTfw0XUP5VVlqVBkkw8R/kfrGqdo=; b=WccbicKp/B1iYViJCbEzSsw3Rd7vQys1SXwAdkEZNnkK4R7tMEiX6p69UIcK0Rpmko g2xZ4Qz0FdNWdwfuJrWYvb0TPO1iOc1C4IJF3fRJzoCfzvB4iOQrBNx6/OfPOOUV8Bal qd7tBDpG9hCwCnf/EJxuJn9wcPM9n5fSuxyzgyLQwhOD9SISSrS+O1mWyZAuqMEAv19g DAdnyMFi2WDcqotdSP1V11+rW1K1wcBELj7GsT7mn61taoc3Y9FDpYpt/dFxwLJhHp5h URviHwyN5c/X5Me6zAI1FtBAcSeVJ2DWUC6XWpr/zh0yE04bu4GCPR7kPClF4Xbi1AzA 1PFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iej4nw7H; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id o21-20020a635d55000000b00578889362a2si3245059pgm.663.2023.10.04.02.37.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 02:37:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iej4nw7H; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 2D1AC8206D68; Wed, 4 Oct 2023 02:37:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242073AbjJDJhb (ORCPT + 53 others); Wed, 4 Oct 2023 05:37:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242055AbjJDJha (ORCPT ); Wed, 4 Oct 2023 05:37:30 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89F68E5 for ; Wed, 4 Oct 2023 02:37: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=1696412243; x=1727948243; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=l+BoPivn/2n2aRFyjul/I4IlFz2cIZjszNzL27RiQgA=; b=iej4nw7HxbxNwSdaSMqDPOqrp85onMZMxMc7njGyu70Nx/kyL8eZpTHS JO13BJ8zH0x1M/I3DjXym10YwzDBe0f4Et7LkaQIHdNZIWOSg/6AJ/MLG K0EMFw6w/L0KrOuel4jZiDod8IyrMHcI8FBun6aCxNo0IqFrpWFM7pe1z SeVnlCbss4wGcf4WE1VMBffhCC4YOlgYY0Mm8XYFolTy/aFMWTPrKq6pd elCLsl+BFo01TGSEgYnFrQIrlRktEevjLRqww6wrtMj7UlquxzGl3/uBX GGNGrHhTbAOgddFEPf7L5QkLGqlB0LLVrUUN+KWYDSTxXJR1wyHbUWAG3 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="449611916" X-IronPort-AV: E=Sophos;i="6.03,199,1694761200"; d="scan'208";a="449611916" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2023 02:37:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="1082415207" X-IronPort-AV: E=Sophos;i="6.03,199,1694761200"; d="scan'208";a="1082415207" Received: from oferweis-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.214.222.21]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2023 02:37:17 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer , Gregory Greenman Subject: [PATCH 15/15] wifi: iwlwifi: mvm: Correctly set link configuration Date: Wed, 4 Oct 2023 12:36:34 +0300 Message-Id: <20231004123422.2666ef86e032.I4b0e95722660acc5345ceefba7e8866a69572e8e@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20231004093634.131303-1-gregory.greenman@intel.com> References: <20231004093634.131303-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 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 02:37:31 -0700 (PDT) From: Ilan Peer In case the link puncturing is changed such that the channel is no longer punctured, configure the FW correctly indicating the EHT parameters changed (with a 0 punctured map). Allow EHT parameters configuration only when the link really supports EHT. Fixes: 55eb1c5fa4b2 ("wifi: iwlwifi: mvm: add support for the new LINK command") Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/link.c | 13 ++++++++----- .../net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c index e76f57d78125..6e1ad65527d1 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c @@ -189,11 +189,14 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif, flags_mask |= LINK_FLG_MU_EDCA_CW; } - if (link_conf->eht_puncturing && !iwlwifi_mod_params.disable_11be) - cmd.puncture_mask = cpu_to_le16(link_conf->eht_puncturing); - else - /* This flag can be set only if the MAC has eht support */ - changes &= ~LINK_CONTEXT_MODIFY_EHT_PARAMS; + if (changes & LINK_CONTEXT_MODIFY_EHT_PARAMS) { + if (iwlwifi_mod_params.disable_11be || + !link_conf->eht_support) + changes &= ~LINK_CONTEXT_MODIFY_EHT_PARAMS; + else + cmd.puncture_mask = + cpu_to_le16(link_conf->eht_puncturing); + } cmd.bss_color = link_conf->he_bss_color.color; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index 1e311eec9d5f..1154a6001b65 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -744,7 +744,7 @@ iwl_mvm_mld_link_info_changed_station(struct iwl_mvm *mvm, } /* Update EHT Puncturing info */ - if (changes & BSS_CHANGED_EHT_PUNCTURING && vif->cfg.assoc && has_eht) + if (changes & BSS_CHANGED_EHT_PUNCTURING && vif->cfg.assoc) link_changes |= LINK_CONTEXT_MODIFY_EHT_PARAMS; if (link_changes) { -- 2.38.1