Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2520176rdb; Mon, 5 Feb 2024 09:00:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWw0a2vOw9MKvgzvwXEa1B2DY7+LSe1nLRUGLgxyvFyNFyuXwCSfiYwcCIVQbwkjMGj54e X-Received: by 2002:a05:651c:124e:b0:2d0:a3ff:33dd with SMTP id h14-20020a05651c124e00b002d0a3ff33ddmr203413ljh.38.1707152431787; Mon, 05 Feb 2024 09:00:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707152431; cv=pass; d=google.com; s=arc-20160816; b=BF8PU3xISy31TZZevjFIveiNbTijLMdM29nY+Zb5tU57LwlloJGs2I+D4fby90oF9y PQ96jdvBz3fx0HdkU2dQG8gFB6NgoVmXdtPeSskgYxmCR4CL3r3yiUsXGB1ZYEeeVXOW NIlABoCCCS/j1P5lap5b89CIpjE+QKusYBV7BCrAIKoeTaD8brAbTlSsIQxSghwWZJUy 9oavlMOyjxYMs7qQjRvCkiyb5ZizjMXfwLq15RyDTFIrk0zczT7sIb+c5C//QjboBkDZ ke2inNxG4bzX037i4CDLOER+L7PuwcDKwgLQK5n+4xHcUs90Vamr0sVl8H96XONwcNlW VyuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:message-id:user-agent:cc:to:references:in-reply-to:from :subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=/WNclPoNmmsZenLjJoexiqAgLR6qO95nzE/cAG0QJ10=; fh=Hwtu6N2U6h8ilQIT29OPc/WWAX/h4ULoIcqH1fq54/s=; b=BbIXXz03/d5uGJuIQRsxFkEyvuW4BK7aY+HRreeqh0C4qLO+lIi29HSsaeS1X8TKDF ITKLB9oyFC8KxaQLazrPqI2kWx+aXiz+9P9zGiJsG+sTDEKmJtgpu6lL0ALQscteDW63 1mY2eMnBPM9lgZ1ZUl5DJfC2ZzuIWqzNoICOJwXKIYBmB5tDUuwEFnZzBfl7WxjJaIuT kLSN5LrswjJVrI8pw/hmol1WlwZmvUVX9B7uKMLUO1AlucEhGsNybZi0lJ+gRt0PFxjZ xvwlp/d2/DLa+P78UGsEL6eqnxm7rnUC+pPPzGqhiVNKOdubHvYI8Uvu6BNubQvGahor 7rnA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DynhfXa3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-3141-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3141-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWt3AukQ8FDJNu/9zBpGVKKVoQB7k46H/Dad0XhYgGrBj/ulM4AANllGnve4FICO6G5w/XUeHHUiBSPFJ0VnQQ1v+9urAEeNc6ZZB8FPA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bd6-20020a056402206600b0055c67e64549si75680edb.2.2024.02.05.09.00.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 09:00:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3141-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=@kernel.org header.s=k20201202 header.b=DynhfXa3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-3141-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3141-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 856411F2221D for ; Mon, 5 Feb 2024 17:00:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79E673CF4B; Mon, 5 Feb 2024 17:00:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DynhfXa3" X-Original-To: linux-wireless@vger.kernel.org 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 56F9E3C46F for ; Mon, 5 Feb 2024 17:00:27 +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=1707152427; cv=none; b=V/pFmic8E0RBC8h/a1jArwULsRBHqAAWifhSqCSjgfr3YDU20sSpZsOxxLkV5AU+qaVKWlA2jYvIMslK4vBuMujg9x1CvhMzSQ7mR+Lrdd/hft/J7Am5nn1R3Rbj1MaLLVAPqGZIsvv4Uw2L1UFlJBuMZHfzeILzNdkVGP0VKgg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707152427; c=relaxed/simple; bh=bxL+BxvlQHAe89NWKzDQGbw1Dc3qITGhBAJv+A1KpVQ=; h=Content-Type:MIME-Version:Subject:From:In-Reply-To:References:To: Cc:Message-ID:Date; b=nlE5Lzp3xS6VomSE7m+hdedc/cnTSUBds/Xh+FyyiPSdEBjyU8Lw6IakQz1N6dEbsl/WYe7xQllZKet3s48lnwC3Dzu07eiJcLq4+tMwVSmJlZcmnXT3hwFcpiY6e0ObovPK66xVczVy7xLji3znVsQj811yAIuWo6T1fZuIEuo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DynhfXa3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBCC2C433C7; Mon, 5 Feb 2024 17:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707152426; bh=bxL+BxvlQHAe89NWKzDQGbw1Dc3qITGhBAJv+A1KpVQ=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=DynhfXa3itEgXiADpdPXsXsUDAc/xgcQIoLO7tcfu7hIrYlWWiLsN8drA9qvEDdqW 9QriOuTuL7XSYytb1Hzinx6MRR/u7S9DeXE+EJsTa9/u1gtj0Kf+hy2cprQVdU8eKK Fm/1bdUp4+bNWCLRTPLJ931CqWVkzr4z1EyQfjHtFtH7CfoUOKlMxhMfIbX37sGJuc rWqJfBnqptbCxkZxWUTK2XkQwesE3UAildRPudh6YOmj4UIIoHDM0RE77y5jP/CThg 8gzR2Yahyb8gMrCUeV6rmy0/MxM6hC8Yd0VAwSC1319BB/MkZmPA8Zcfy4tCMSWPU8 jtZpmRHS7a1yg== Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] wifi: ath11k: initialize rx_mcs_80 and rx_mcs_160 before use From: Kalle Valo In-Reply-To: <20240202023547.11141-1-quic_bqiang@quicinc.com> References: <20240202023547.11141-1-quic_bqiang@quicinc.com> To: Baochen Qiang Cc: , , User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <170715242424.1233901.13688011305726669667.kvalo@kernel.org> Date: Mon, 5 Feb 2024 17:00:25 +0000 (UTC) Baochen Qiang wrote: > Currently in ath11k_peer_assoc_h_he() rx_mcs_80 and rx_mcs_160 > are used to calculate max_nss, see > if (support_160) > max_nss = min(rx_mcs_80, rx_mcs_160); > else > max_nss = rx_mcs_80; > > Kernel test robot complains on uninitialized symbols: > drivers/net/wireless/ath/ath11k/mac.c:2321 ath11k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_80'. > drivers/net/wireless/ath/ath11k/mac.c:2321 ath11k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_160'. > drivers/net/wireless/ath/ath11k/mac.c:2323 ath11k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_80'. > > This is because there are some code paths that never set them, so > the assignment of max_nss can come from uninitialized variables. > This could result in some unknown issues since a wrong peer_nss > might be passed to firmware. > > Change to initialize them to an invalid value at the beginning. This > makes sense because even max_nss gets an invalid value, due to either > or both of them being invalid, we can get an valid peer_nss with > following guard: > arg->peer_nss = min(sta->deflink.rx_nss, max_nss) > > Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 > > Fixes: 3db26ecf7114 ("ath11k: calculate the correct NSS of peer for HE capabilities") > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202401311243.NyXwWZxP-lkp@intel.com/ > Signed-off-by: Baochen Qiang > Acked-by: Jeff Johnson > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. b802e7b7e771 wifi: ath11k: initialize rx_mcs_80 and rx_mcs_160 before use -- https://patchwork.kernel.org/project/linux-wireless/patch/20240202023547.11141-1-quic_bqiang@quicinc.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches