Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp742877lqh; Sat, 4 May 2024 23:20:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUKJjaPbW8Jthv8EzQwXqvpQKe5EiSi9D6vgTAuB6WeCltUYeTzmUI8BNOf/4FGWzQD7229JhGQ09rCENczbRAbdMQDe/gy1bfav7fFWg== X-Google-Smtp-Source: AGHT+IFjbQzBESAyMfbLZK1Jmyqn05H7Kw5oYauZPmr3P05t4XwVuIct3GM+wJ3OiRGiGNEme7dz X-Received: by 2002:a50:d595:0:b0:572:9d22:eb8c with SMTP id v21-20020a50d595000000b005729d22eb8cmr5447601edi.15.1714890041784; Sat, 04 May 2024 23:20:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714890041; cv=pass; d=google.com; s=arc-20160816; b=SlUifRRr0VrqmC7XED0uavMQDLbvA3gwzQzEv2tzc5l+MHWI96GK/d35cNiTHtGVYJ Eol7tb90vq69pWnXWyjCf3IM9adjmNRtHmtckubtwHPIlLe1FLsq2KK2myKji85rTsPT KxJ40RPR82+T1rbr2pLALCS90foYg9eNfA7CcU+hPCAy50Z0+7G3IvUpkx/PFjUUM+21 jGoxVDmtA9fVO9VYHexcqpWnCYhhvfVmfjecIASG7uCV/vRBa2wPNKyE9f8ZE413jDhV aBEiWSs5Ywk4KJaD8dPVtie31R9ZXQc7n1VRttq1aY5RJcdntuIM7K5QxHsKsmltwCV5 e1Tw== 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=LAJuK/Tl2cJfJ2MtqYcRSlHrciKrY0jEIZZsWPGuMGQ=; fh=TquNsOiV+zNY1csTpltVB6A9QFW5SbuNs6JlqcKCQkw=; b=nxWQKacocU0ILIOi2IiC/ky8ZuaoiyPVkFCMbAfaJOJ0hhEsTHaMxsZEeEVSOMoXLc kGkX2rbSVl8Xm3WXg8SEKAVxuSqpEYObflLxbImIY6r8GKb8T94dQvYM0Dlxu3jzO5U2 fOixOcPfTMr24TfMDl/0KUDccJgtofUUbSJf8Frk2YNBT6n3x98zVEvd5eIuBRAJhEIY SDCMP42ETmkYziN6pFk58a8QZUQghMuzr0ESbor/TUACf8u+ItL5U7RQbV732cF/aISO fi921QCDC6hpJP1cRBvpeHvVFq5D+Q6ZUAQ1SlNqmaQte/yAqBLFCRWp/vWF4izrwVnj x1sg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mVSej6HG; 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-7184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7184-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b7-20020aa7cd07000000b005725e66ad4dsi3544079edw.482.2024.05.04.23.20.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 23:20:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mVSej6HG; 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-7184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7184-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 81D2D1F2174A for ; Sun, 5 May 2024 06:20:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48B8823B0; Sun, 5 May 2024 06:20:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mVSej6HG" 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 B8D0C6FA8 for ; Sun, 5 May 2024 06:20:26 +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=1714890028; cv=none; b=AucExI+mBhoDYou1RukdWEQMuuZ5UKv2aOsQAHGeFwx2bZoibj6t92z53Blw5GLN/d5PwdExdA4O7i/zM+fhAiP1GXQLxb+vaIQ4Efu3ztV1iNzfvSskH/vihmnN0/gnzXPv0X8rAh290mpbnG1kcctctP0uhj54MNP2jqNhpTY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714890028; c=relaxed/simple; bh=DTo/uaxtyOfASmehvluczep0GFn52uKxTV1Fr5U9CIs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ut3YSEbziGqgQh+7gGqWO/u2rau+wKOarP+l7nS/XBxL3EDODt5Otxt0L8+xhHSiZ3Mij8NwNT/8En0olm4v9O+HNbWmpD/+3heYgABSlIXBpCjMnhdL+H1LMW2LsrrAH+/1bfzDyW/V8yoaUIFkHYtoTf1TH8GiShKa34ygPk8= 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=mVSej6HG; 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=1714890027; x=1746426027; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DTo/uaxtyOfASmehvluczep0GFn52uKxTV1Fr5U9CIs=; b=mVSej6HGNUZ7ybGtCjtVFZy7+QSbW52Jg249NvsMuigRiHcfVS9C2HZj WWnZAxKlWtcbpx3IFXfYlkgeNjZn3xgT1HcwH6mVCvbhbGwHe/+oiXSUt POGUYWq/hOv1lxMhLyLzfJGRvIXtwyoIKUoxa70Io3JqcMq8tzgAyLrlT Fg1hk4nqKlz6OFYhADeHfsNkw0H+db0GOZVFHpEzYMJrcxymHh/GjOcsc PabE8zg6JZe+wlS9rMNCzYSy3TzTcyWyaWqytfiEFEfgJUoF52Pme3Llp sVDQBtfMAYXKFjuPS8FmYNGubNjg6ia55hKwDjhbVZo9YBrjjN0+1whid Q==; X-CSE-ConnectionGUID: aYMFRYT1R+O2hE5MB13NCA== X-CSE-MsgGUID: UOU7tJnATVGaV6QGZER80g== X-IronPort-AV: E=McAfee;i="6600,9927,11063"; a="14461809" X-IronPort-AV: E=Sophos;i="6.07,255,1708416000"; d="scan'208";a="14461809" 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:20 -0700 X-CSE-ConnectionGUID: unNgmFxpTp2W47IqIV+6ZA== X-CSE-MsgGUID: OMCgiyJKQDmY7VYaielATg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,255,1708416000"; d="scan'208";a="27903601" 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:19 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 05/15] wifi: iwlwifi: mvm: don't always unblock EMLSR Date: Sun, 5 May 2024 09:19:49 +0300 Message-Id: <20240505091420.eb861402dac9.I6a1d9f774f5551cfab60ea37b71a62640496af9b@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 When an event occurs to unblock EMLSR, the code attempts to re-enable EMLSR. However, the current implementation always tries to activate EMLSR, regardless of whether the blocker was set before the unblocking event or not. If EMLSR was already unblocked, there is no need to re-activate it. Fixes: 6cf7df9f013f ("wifi: iwlwifi: mvm: Add helper functions to update EMLSR status") Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg --- drivers/net/wireless/intel/iwlwifi/mvm/link.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c index 1ce52adf3173..79f048f54a21 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c @@ -956,9 +956,11 @@ void iwl_mvm_unblock_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif, if (WARN_ON(!(reason & IWL_MVM_BLOCK_ESR_REASONS))) return; - if (mvmvif->esr_disable_reason & reason) - IWL_DEBUG_INFO(mvm, "Unblocking EMSLR mode. reason = 0x%x\n", - reason); + /* No Change */ + if (!(mvmvif->esr_disable_reason & reason)) + return; + + IWL_DEBUG_INFO(mvm, "Unblocking EMSLR mode. reason = 0x%x\n", reason); mvmvif->esr_disable_reason &= ~reason; -- 2.34.1