Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp742954lqh; Sat, 4 May 2024 23:20:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2nzMkEI1e/r7eQ5aSZJoHksQqyZOI/0babB4/LZmG64tSydcnRKU76gcbUNFbuOQG0CI7daW6I4rW+zdnTV0GWvSlv7N1gs5vKvWyrg== X-Google-Smtp-Source: AGHT+IHwFOROHYrgJOrdvswWcLnX6xmmZvPRAmnBBskN7TeWmUe0ZO18uk2Je3TwBihhFKLWHk4q X-Received: by 2002:a17:907:829b:b0:a59:9b8e:aa61 with SMTP id mr27-20020a170907829b00b00a599b8eaa61mr3268377ejc.35.1714890056344; Sat, 04 May 2024 23:20:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714890056; cv=pass; d=google.com; s=arc-20160816; b=LuYz59+NMZGkh15ObKkK2kdDweUB5M76H3aSD5/FqW7Xurw2XmEvReIEV24u8lxXoC 64igLyQik9e6gytpGTNFgyj2hmocVUxR0V5ZAkLzFTGRHypKL5hbrsx1FqFqEDjvxX/c usIi5689y4cVsDJSWGw6gLFB28PYU6FN3eshX+hSl4IiQYFE2C1w8tmn+okY7P2cNZ0L VSuLbNUBQossBOLNVxrWdV8hs2DQqT3yq0BGuF8nWU8L2k26A9GHddrMS5+UsufmywRK LEMTnW2iOwHjIuuFMLDK0agZFPcTpqUwxYIJn8y887C+Hut6wHmDmQCWH/UydwUHt7Ni +nAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=xta1YdLNpbm1iU3Cg0txlgypJiGZPaEIXTGIxaQlBY4=; fh=XwhrcOa2XvQCrpFgIB6LfmqW6XC6AohXSgvbFj2WExc=; b=rNgvJJmrDvtzMJBW+hVOJ5IK/JcaXC8PtlZdRH9UQPNreKYzuwAlHgGtVMqwhQjatp +W/bcTZ5g1COmBmAbDOhFc/WA2sAB2Vr7dK8Af2Af7Bmtr2ZeiCOw6LSFoL3k/OTva1C OHAbL76iNGAcUO29YDF7NlgepG3Od73Rn0La/nqHkzJW5MLQ4xNvRcEompCDnEhAmKYh gdI84WiPYMlb7MLcvvALCfbr2SJezIjEPNHW04oujdJR/M9CW5DwC6NP83Ba5MqoQqno HZco00ypu7jK3GEL3wR8/L2TpmrrYRPvPqGo0Cg+RI1jgd3na8eIwg7b6BCmF22axY6I k7Yw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=h1AaobuQ; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-7187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7187-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r13-20020a17090638cd00b00a591effe552si3569184ejd.834.2024.05.04.23.20.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 23:20:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=h1AaobuQ; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-7187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7187-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 183A01F216F1 for ; Sun, 5 May 2024 06:20:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91135AD32; Sun, 5 May 2024 06:20:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="h1AaobuQ" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B8706FB9 for ; Sun, 5 May 2024 06:20:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714890030; cv=none; b=W9iGu/XiTp9TO5wGzl9vnykB7mPj5V9ck2bx3fsaIiy8xabEkYp9k8l5W9urqMSq1JqAaf5C1mCwgLAcuuXnxS0AnwyD+/OR62nSSOf3sp3V/OKEO0+j8ciiZlfKJG0bKwjDq0gnKZCdbjH+bqnMpjjpFnROF/ngo4Z1qHI1ZR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714890030; c=relaxed/simple; bh=XShRLm5EvFM3vQ4Kpn4WVXyIfB16VncYCzrERvcQbVk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TpLPcqf1RsbyNhxA+v4Dnv8CuhMvHo5EHH4mmnkBDwsgTkWcd9OOLDO6/KZKEIlBjff9WvNnsDpYNlVBMRAEpH6j9m6md+9vuVRwCkJ1G81ChSGOcBYw+T5qJCfTk/HCS37NlR80Q5TqzUZvLGKIi9VV1/z7BsQcDU//vWOir/A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=h1AaobuQ; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714890029; x=1746426029; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XShRLm5EvFM3vQ4Kpn4WVXyIfB16VncYCzrERvcQbVk=; b=h1AaobuQvWhuRgiigpoaxPQSi6bniwLoDoeYRqHJ3dKIHmLleli+ni9b qhhtzM9d+qqCnRsWIOYKe1AdGBRt+54j4YKy/Se2qwZuJg60ofm65jwl8 /I/AQ6JAxwTZbLcXo7r+xI2M6hvGA4n91uLRJjYejTX1prVJciF7fvEBz gRbuZauq1pJN3LbQH+QQxvzoRIK13XbuvJCz65yqTkbGXXOx95QlwXrXz Bj9q58dIk5BW+tdkH0FY2oOjMWK5PiwwzZp55cHl4uRI8kiH2VndGmD6E SGpfKge1MY7/2T35jfq0IwIjn505qhzPAqj7PbJ5DhnCOqE9NuMzw7ae6 g==; X-CSE-ConnectionGUID: /EuMkwnBS6GciuMoJIRiAg== X-CSE-MsgGUID: NVkiKukQSmOmy8DGQ7BIKg== X-IronPort-AV: E=McAfee;i="6600,9927,11063"; a="14461823" X-IronPort-AV: E=Sophos;i="6.07,255,1708416000"; d="scan'208";a="14461823" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2024 23:20:29 -0700 X-CSE-ConnectionGUID: LsBlShIiSAquzgDaTF/6Lw== X-CSE-MsgGUID: 8OxpTaV0TOucDv+TEhPdvg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,255,1708416000"; d="scan'208";a="27903615" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2024 23:20:28 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 09/15] wifi: iwlwifi: mvm: avoid always prefering single-link Date: Sun, 5 May 2024 09:19:53 +0300 Message-Id: <20240505091420.4614e6891dbd.Ie40eae0dd99d82ba60dea5b6dbcd42dcdf16b90d@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240505061959.825245-1-miriam.rachel.korenblit@intel.com> References: <20240505061959.825245-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited Content-Transfer-Encoding: 8bit The new link selection algorithm uses defaults values for BSS load if the BSS Load element was not published by the AP. For 6 GHz, that value is 0. So if the best link is 6 GHz, the EMLSR grade to always be equal to the grade of the best link, and then the best link grade is getting a bonus of 10 percent, meaning that we will never activate EMLSR. Change the logic to not give a bonus for the best link. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c index 79f048f54a21..9d7f9e5be253 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c @@ -727,8 +727,8 @@ void iwl_mvm_select_links(struct iwl_mvm *mvm, struct ieee80211_vif *vif) if (hweight16(new_active_links) <= 1) goto set_active; - /* prefer single link over marginal eSR improvement */ - if (best_link->grade * 110 / 100 >= max_esr_grade) { + /* For equal grade - prefer EMLSR */ + if (best_link->grade > max_esr_grade) { primary_link = best_link->link_id; new_active_links = BIT(best_link->link_id); } -- 2.34.1