From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D44029B224 for ; Thu, 15 Jan 2026 04:44:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768452242; cv=none; b=YWO4yVvZWI5KJT5N3wNCMBQNUglsANzGA7hht6AyrC+XWAwekfH5jomXsfOVqDX1Cf/JD1lNLu3zsUdRJ88JFt3U1QsaZNrsJiECz4tBxoFFUII7THqmnI+nbEwFx5C9uY2RWrEmSHTz98vNvVhb82XBWZbjPsCfxkwkvn1uzi0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768452242; c=relaxed/simple; bh=gea7RuH2/PFVWFXrNZ7LYLGqLx/mVrB0Dh3kN1pDCjg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dQMFsegyXQgV0IvGGMp9Z821xl4RXKgkwPxb9IIUs2tytvtdWyk4N+UrDZ4+19QRe5BDP/i1EqFoQCGT8pzX54XaXGrhSQyPTWqfK+O68VEmHVdORIiB+/xFxyf9okfSrRoZqx5EP157a9vilo0kjDXCUYQvE4gqbF5/woufGlY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=graEc0YF; arc=none smtp.client-ip=209.85.160.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="graEc0YF" Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-40438e0cba6so82225fac.1 for ; Wed, 14 Jan 2026 20:44:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768452240; x=1769057040; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FyJ1nwAoXFB46LdRdtLwHzhq+4ZJYtwrTRcf5CIjovw=; b=graEc0YFLarvHSi2YZtshR92VoLGPP0e9CBKe5ZYkAZMEiG6VeeCgAN7Rz4/a/SVic l0iH8b/D3uvDHf4n7SFdmmWne1EAlVZ9PFWF5L1ddcPlCVm9rlqsYUKvVETe68ej/tO+ irfShz9tmtwtZUvCkz5FIswEqjlQKUXA5QF8WKBg4YOS0RyNI7X+vKwUUxTB36lXwPoV L2gn85osARJwFtgNYCaq+Iv+GLnoqHt/uOl9AP/nrHWAtRT8SV77RNDTH/MxZVMbw6J6 H/uYiTSFHjLDKm+pqIsfoddq99zdmKk6SCrk4phUdWLXBPsj89IdTIlR6alwWV700orL yS7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768452240; x=1769057040; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=FyJ1nwAoXFB46LdRdtLwHzhq+4ZJYtwrTRcf5CIjovw=; b=IivYE5467AkCA6HtQkCMnt49o/5Nr4T/ufKHuw3hlmaBSgwsJs7em/Meyyf0VZq/PE zBkf3L3UFGPc2BL25rCbLGlZDrPL0N4YITupOylR7KnYGUp5bwM8TacQdN9Ee9hOsN/l 7gcSrcxF3yeK0DhksPSPexDMkmU/nBuv9gF7XjdTl88Ve/8GwCVaWNYlbx+9q5wqqcQ/ wxhHBISrmvSkWU/B7lY3tLY5d7HDVlNWL0vUmGNt1dcSGl+mTTusFy29vaoQSNWImNZR 7pTsKWAdhjZwACN/cxdZ38e4A1XTReGEwCT7kSusepFeyCJhc0gQLyJc7iKG9DHXeRPT ed/A== X-Forwarded-Encrypted: i=1; AJvYcCUykiMyQShNKztwvKV5SSHZ0Sfgn2b7++2DTOBXja/iwXrnRdvvMbo94A21cK5RMMh5Us1n0MyPDNtV1r0=@vger.kernel.org X-Gm-Message-State: AOJu0Ywm0SOmc+6piSbx2Lc/jODGRBOtzd9HtBwmmnBBSOOz3mVvA8qU XWLk36unW0Qg8v9qSnobjcxxUWF8N1Vwg4EOYeRvsECv9xC7Fswtckui X-Gm-Gg: AY/fxX5adbQySKdacjR4qpAZLYVbwBKfYCxtAaEcBYXCTdZoix29/qK2ZiQ2++exdww 3XtileToBIX8Cj7FfPkJmYCPEZufbZma4zxp7PtmptfehlYXzaMzn4iJ2pUd+ANmGyzzkqRyeBn j+1/IBPsOwV9ehv+SIs+LX5Gd1yYmA8bweLBuei62wFmmboYesZoXkOaLymuF7M4Zw7SxwZmDZ4 rpECqPr2bGN5I4xQqOnfBDjbVO1nOkdfFrHMQ/P021f5mXuVV4q+awMIpGBFA6/j9vEgcneZVoT 1n9gyjJI2jyLXvFe6sr5YohwOfvNAQ6a8+7NpYOPUIpapp/MDLwhg4NiXOCfC6vdm0xQGA+XBjx ZrEqibB4J66FhAbhk72jKWv0sIWtgxuQhKPgvwR+2Uijt7yhq2RinAXphlWSw08haGSwEm6FTYo yt3K2opudzRGL66WU6gAsPitsSkTT+ePF667YNDHiVCO3bQY9Nh0iz0NBfk2qLYngk6dtueoeTB /oJb1VAdYZFxjNxeWkIAFbwS1HnJ3g= X-Received: by 2002:a05:6870:e194:b0:3e8:9b25:2fc4 with SMTP id 586e51a60fabf-40406f33962mr3217936fac.7.1768452240100; Wed, 14 Jan 2026 20:44:00 -0800 (PST) Received: from nukework.gtech (c-98-57-15-22.hsd1.tx.comcast.net. [98.57.15.22]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4043b1b0116sm82362fac.12.2026.01.14.20.43.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jan 2026 20:43:58 -0800 (PST) From: "Alex G." To: Vasanthakumar Thiagarajan , jjohnson@kernel.org, ath11k@lists.infradead.org, Jeff Johnson Cc: baochen.qiang@oss.qualcomm.com, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] wifi: ath11k: move .max_tx_ring to struct ath11k_hw_hal_params Date: Wed, 14 Jan 2026 22:43:56 -0600 Message-ID: <6267675.44csPzL39Z@nukework.gtech> In-Reply-To: <89a61ef1-3e83-4303-ba04-cf5c5a4aae56@oss.qualcomm.com> References: <20251228151408.2116108-1-mr.nuke.me@gmail.com> <5896283.e9J7NaK4W3@nukework.gtech> <89a61ef1-3e83-4303-ba04-cf5c5a4aae56@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Wednesday, January 14, 2026 3:59:09 PM CST Jeff Johnson wrote: > On 1/14/2026 1:29 PM, Alex G. wrote: > > On Wednesday, January 14, 2026 11:24:19 AM CST Jeff Johnson wrote: > >> On 1/12/2026 11:00 PM, Vasanthakumar Thiagarajan wrote: > >>> On 12/28/2025 8:44 PM, Alexandru Gagniuc wrote: > >>>> ".max_tx_ring" is an upper bounds to indexing ".tcl2wbm_rbm_map". It > >>>> is initialized in, core.c, a different file than the array. This > >>>> spaghetti-like relation is fragile and not obvious. Accidentally > >>>> setting ".max_tx_ring" too high leads to a hard to track out-of- > >>>> bounds access and memory corruption. > >>>> > >>>> There is a small ambiguity on the meaning of "max_tx_ring": > >>>> - The highest ring, max=3 implies there are 4 rings (0, 1, 2, 3) > >>>> - The highest number to use for array indexing (there are 3 rings) > >>>> > >>>> Clarify this dependency by moving ".max_tx_ring" adjacent to the array > >>>> ".tcl2wbm_rbm_map", and name it "num_tx_rings". Use ARRAY_SIZE() > >>>> instead of #defines to initialize the length field. > >>>> > >>>> The ath11k_hw_hal_params_qca6390 uses fewer num_tx_rings than its map, > >>>> so use a constant to express the correct value. Add a static_assert() > >>>> to fail compilation if the constant is accidentally set too high. > >>> > >>> Text related to static_assert to be removed accordingly. > > > > Hi Jeff, > > > >> I removed the last sentence in 'pending', please check: > >> > >> https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git/commit/?h=pen > >> din g&id=26bb149b5e011b0f73f7b74421589cbd38e3304b > > > > Re-reading the commit message, I think it makes sense to also remove the > > sentence "The ath11k_hw_hal_params_qca6390 uses fewer num_tx_rings than > > its > > map, so use a constant to express the correct value.". Do you think it's > > worth submitting a v4 with this minor change? > > > > Alex > > No need to submit a v4. I can make that change in 'pending' Thank you! > /jeff