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 77C811FCC52; Wed, 6 Nov 2024 12:56:25 +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=1730897785; cv=none; b=kZRY4H8XSXDSqGb/KpsJCZx0POzj8K0rYBKZQsMVFt6i9hrYmrQi7XOrisig+TZzHVfTVZTu1Z6ajcCzd5lSQ7ihDMZLr7cfBsYy9UFAACBDjBebKd9cVBFqp6Vk2uWoJfOJ9YRKIKvs/Crl3h1S89uek3vMe/nGmLeW22cqwQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730897785; c=relaxed/simple; bh=1U+XVtdfDLsPjpQt0LIyhGKWak64cigvm3SDS6q88s0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b81xlY5zQNWPbMo0iiZ+TUQr99y9EwkL1SJoty/XvQQhpMR6QIR9WZfkIFaNnN+MxNZVC5sKPQfPscwDA4L17oUfmV7Ze4cO0bwj5L4+Z4L72Ki+ivcWZCh2F57BZkttEqFProptV8DJfowxg2S78oiPZ1JTaLLTphTu7JGCzdE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mKwISALe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mKwISALe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01EA7C4CECD; Wed, 6 Nov 2024 12:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730897785; bh=1U+XVtdfDLsPjpQt0LIyhGKWak64cigvm3SDS6q88s0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mKwISALeEko30iCZxdOCzhIjurQEJ84WaFJKl1howPTLoz51o6B6UsiMLoobF03ca N5NiuvaSRJ6dNKEy14XCPFlmxMxi7TT1kfYsp86zSVRp9G4yU7R839GmyHdbT+Bw1W gAfGVWgVJuKMOxlnArfm1xwVB1cicEbMHHqGFVNo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Daniel Gabay , Ilan Peer , Miri Korenblit , Johannes Berg , Sasha Levin Subject: [PATCH 5.4 019/462] wifi: iwlwifi: mvm: fix iwl_mvm_max_scan_ie_fw_cmd_room() Date: Wed, 6 Nov 2024 12:58:32 +0100 Message-ID: <20241106120331.984097296@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241106120331.497003148@linuxfoundation.org> References: <20241106120331.497003148@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Gabay [ Upstream commit 916a5d9c5354c426220a0a6533a5e8ea1287d6ea ] Driver creates also the WFA TPC element, consider that in the calculation. Signed-off-by: Daniel Gabay Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240825191257.e710ce446b7f.I2715c6742e9c3d160e2ba41bc4b35de370d2ce34@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index 3bce3b59a12b1..55292e9b15c15 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -93,6 +93,8 @@ /* adaptive dwell default APs number in social channels (1, 6, 11) */ #define IWL_SCAN_ADWELL_DEFAULT_N_APS_SOCIAL 10 +#define WFA_TPC_IE_LEN 9 + struct iwl_mvm_scan_timing_params { u32 suspend_time; u32 max_out_time; @@ -378,8 +380,8 @@ static int iwl_mvm_max_scan_ie_fw_cmd_room(struct iwl_mvm *mvm) max_probe_len = SCAN_OFFLOAD_PROBE_REQ_SIZE; - /* we create the 802.11 header and SSID element */ - max_probe_len -= 24 + 2; + /* we create the 802.11 header SSID element and WFA TPC element */ + max_probe_len -= 24 + 2 + WFA_TPC_IE_LEN; /* DS parameter set element is added on 2.4GHZ band if required */ if (iwl_mvm_rrm_scan_needed(mvm)) @@ -776,8 +778,6 @@ static u8 *iwl_mvm_copy_and_insert_ds_elem(struct iwl_mvm *mvm, const u8 *ies, return newpos; } -#define WFA_TPC_IE_LEN 9 - static void iwl_mvm_add_tpc_report_ie(u8 *pos) { pos[0] = WLAN_EID_VENDOR_SPECIFIC; -- 2.43.0