From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 041E33A4D13; Sat, 28 Feb 2026 17:37:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300273; cv=none; b=teCruZ0zdueeo9B/G9LeXjOmkabLAT1arzXf35eyZNhZFeOyDzE9tKD0cwM2F8kibk4POqWAgRDCck66qfOIYxZi6W5sXVdOkJmr/m4NPAAfK8GFla8wUJA7S9lS2EZMKovHR/ggyPDMHregzVe/sQZCHusa7ZQ9hP2NuIGLARQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300273; c=relaxed/simple; bh=fDYPcimZDZhPGyE2cEZ+FxCWO3FkJ2vofv7HgYRbTFQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jy8SNduusTcrS3I1pVt2Qkx6zc7uScDi81qh4JryTe2uH42oB5y9yNYv3fjMlP6ao+8uoGanzJfGzSIFPfFird+XNf70iB7MHRAOgyU2mQZloE/S0CZc1i4kwdZ6xOApq6LfeocEmhrzc5sDkuLMT+7L6LqMNgHFabUVMen1DnQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TvZki4Q4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TvZki4Q4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24628C2BC87; Sat, 28 Feb 2026 17:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300272; bh=fDYPcimZDZhPGyE2cEZ+FxCWO3FkJ2vofv7HgYRbTFQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TvZki4Q4nXV3dETx1LsvyRYgxBHZSqa2UWkFRCAmifWVKUlw8jQk6CFGyFXtVJ8Bf 9VCy4bgwivzKM3pmnCtp88cCT3qtZWw1ai0TuKMZ5HQJuAClVzMeOA+ukzLo7gX4wP 62inojGDY6958imEGCYy6fKD8rNSFgDv24wqw7o3aQRx+RzZjcJwBBujBi3OCso8g1 XubS5k3muWzn4tYEpMOijeqjwZ4c7fZGoGMHDUSQifpUWSaAvbhDLnwJSgr+6PO+xU tXC9ExGi4k5/bYQzWKviTlP8ixuDRKHZ3rvySlwJQF+J3UUKWLf2v9g/XVuiJriQh1 NWbGTXgAC5L+A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Miri Korenblit , Johannes Berg , Sasha Levin Subject: [PATCH 6.19 299/844] wifi: iwlwifi: mld: fix chandef start calculation Date: Sat, 28 Feb 2026 12:23:32 -0500 Message-ID: <20260228173244.1509663-300-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Miri Korenblit [ Upstream commit d2fcdf36554316cc51f7928b777944738d06e332 ] A link pair in which both links are in 5 GHz can be used for EMLSR only if they are separated enough. To check this condition we calculate the start and the end of the chandefs of both links in the pair and do some checks. But the calculation of the start/end of the chandef is currently done by subtracting/adding half the bandwidth from/to the control channel's center frequency, when it should really be subtracted/added from/to the center frequency of the entire chandef. Fix the wrong calculation. Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20260111193638.2138fdb99bd5.I4d2e5957b22482a57b1d6ca444e90fcf73bf2cab@changeid Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mld/mlo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mlo.c b/drivers/net/wireless/intel/iwlwifi/mld/mlo.c index c6b151f269216..1efefc737248f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/mlo.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/mlo.c @@ -844,9 +844,9 @@ iwl_mld_emlsr_pair_state(struct ieee80211_vif *vif, if (c_low->chan->center_freq > c_high->chan->center_freq) swap(c_low, c_high); - c_low_upper_edge = c_low->chan->center_freq + + c_low_upper_edge = c_low->center_freq1 + cfg80211_chandef_get_width(c_low) / 2; - c_high_lower_edge = c_high->chan->center_freq - + c_high_lower_edge = c_high->center_freq1 - cfg80211_chandef_get_width(c_high) / 2; if (a->chandef->chan->band == NL80211_BAND_5GHZ && -- 2.51.0