From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 9D98D34F24C for ; Mon, 20 Jul 2026 14:01:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784556099; cv=none; b=Xa+8rLh6UKaaX3He8F740gn5jmgotTQJ7ZdiJ6eE1NeAYlL/V/qDND0NITKKXtcJktcjfiAmHCculg8Vy+ZnyJP+abx+eQNO3KV+atA2kKKl2LEAGJoOoko0/q5fobWMhPywECdORBYQGuG85QktyUNgLLGxRqZSpyrqRhA8Vlw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784556099; c=relaxed/simple; bh=Wgg0Xu0pKRAoIE/78sNdaI2/OubTxL4i+ZlvCaiEPtE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=J89vPlhQn8EyyK8GyYuqvOEx2rIn8ypurbXpiN3+D7uUIQ15teCI5yj4gxKKYeE0jfvzr846CeMqcE5ZyCtK+0NLyNCFwXuIOfWLdF7+n1q1su7BpLjcwhItfxx5GLta+5/rdLxIziwSq22WBBvXHV/+pU2OnCqlccTualrY6NQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=U46QdtAY; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Vfmoidvd; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="U46QdtAY"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Vfmoidvd" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66KDquRX2839963 for ; Mon, 20 Jul 2026 14:01:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Me63HAxi1n5R+/58j1Al3kh5edACqJibvGy9/ANPjZs=; b=U46QdtAY6/peMZ0V gX19r7MV7qAaHtcSr4pyGTiBNNikQahYh4VaECdQVFONzJ3D8SbianLZtmUoR3Qt 0mB+fDXbwkG6X5GZTWxpAAYRFeV6zdCGgXLdZk0X0idf5Qp2JUKx4EkKvHWPAVCi YJXFeZxxiFiSsRQeu3BD3T+oyWKfsFb68CDqPd8ClEmL/FTixEhHkEbQKzz2ZMws 7T9KpnYop1BmtnI9zBayME9vp6LkD3wzII5P0WqhjwnezQqGMczZ1mtHhzXZoVyw tIxCxGoMTpBvAKyICLikOhMb79uuWaBMNh0IaHk4RwxtcrPDG/ekov6fimxetr70 wJMqMQ== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fhfvxhhp5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 20 Jul 2026 14:01:37 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2cf7dd9fd91so398135ad.1 for ; Mon, 20 Jul 2026 07:01:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784556097; x=1785160897; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=Me63HAxi1n5R+/58j1Al3kh5edACqJibvGy9/ANPjZs=; b=VfmoidvdC8aN3FzCEn6fay/NsekTnRyFFPF+oVeBwsmEnUbQBSOMxSA3W17anNu2zt 3c1u1lKJwjthm/fS32i6SNfw8XFDBulrVKO1N9B0UzeFlXz2QKnvJW8pE1g/ymgAggPj mI7lYuf/N9yxrGeYp9h6B7wMHPfJlE5Tr17XXqitOWFZ6PvK3LU8w7fqPTOcxNHQkXzm uEuq5HceFKXqKXtA82bHRKIUHJ7ErW7sQbi8HhwtXiXMCCBXbtoC6YU1g+x1UHXTuNWs 2emgoJdVqs/BC3usHfjb042xdow7Aq79rNo3NRHO1dgZArhDTfoePptz56ZcIzarUbsx RUhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784556097; x=1785160897; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Me63HAxi1n5R+/58j1Al3kh5edACqJibvGy9/ANPjZs=; b=h/DADEzD7ejlGl4KXxG0+NjYAZ802DzGN27YV4IzKjSjbFn9Q46oZJ4yVy8nxiK6CX X0bX+Wmxa3Ax4uhYpABYUBGql81Bg9fWJvmDJZzX01Mp4GbQUS9ncJI6Af9mYWFlOrR2 DwmgBM6MTqafoZ0BgB/xunWfwRCxATHAzVVTS/8bz30F4HmtxKYXe8Dv0COUvVKVbMM3 op5+S1nEtuvwa5pX/dUw/eF9H60cPFpNysqIQmfG1n7+jBC3RxX7l9WpKUNOF+X4euAf FE0ttPqVWVspq+iLOC8Z/7D7VS9eCRJcLXp/5BUkvPloAKhjiOOPUQLYdA/4fPO+lJYj 4v0Q== X-Forwarded-Encrypted: i=1; AHgh+Rq1lgGmLnejTRv7O75a2KDU/myq5MZRP7NBFsU78RWgNbTMs43vmGeV2TYuepfrqYFuJuppRkNWMWDxWLU=@vger.kernel.org X-Gm-Message-State: AOJu0YwM7u3vcwlg43EAf2JCZVgHdtb2e2IXinDTnvUIzRNvQfkLM7gd Fi1dyUJspnrCPaVN8ljYAGLf8umfDYxaCVxSZwQqQapR7agMg5E7L3r5AiFLmm7FWZKHJhZnNfF fljJcSuphAoY2iLJ6PU5lKIyhmk54qA9fmgd8AVeEdFKf9Lh2ByPaTpmgWU05U7EoiUw= X-Gm-Gg: AR+sD12YRZJFbrvDf0f0BwfqUXZe9vTu9MAbldN6hEmNdrsZJVK+WxTHjtnBjAuDx2w S2A6x4xIE2keThVbKoSdl5S6saWgthT1iD4dW6d/0Ug+f9kAAHLnIPeluaOTCsi6t7Ift1EIJgE rozdKV8RuCKJwPiV2DoAEYS723QzBKpByoBOZvdtmp4xCIl26LqHuqrfDr3oURXVLqLKBkGjU0W 3EhNk86+QYZtDMym0nLeC/Byjr8DdhA3ihzAi7ov+BS0KXho7TMK8sXwRH09Lfl3E2VKi+dJAp7 OEXZjO4160XsNzPc+X7FF3+kDtvz4E6WkpxTKYPXp5e2t2b9H7Gh7Z46Mtr8aeN5AHQ6mekpHWx B0cVNg0MoIw6Gg1cki698aZkkEvfJ+8S3z3Aj1cMzBqLX90Gm0qjIaN7sPQPf X-Received: by 2002:a17:902:ef01:b0:2c2:62ee:5a0d with SMTP id d9443c01a7336-2cf3489181cmr154941455ad.14.1784556096992; Mon, 20 Jul 2026 07:01:36 -0700 (PDT) X-Received: by 2002:a17:902:ef01:b0:2c2:62ee:5a0d with SMTP id d9443c01a7336-2cf3489181cmr154940705ad.14.1784556096252; Mon, 20 Jul 2026 07:01:36 -0700 (PDT) Received: from [10.227.110.203] (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-31429ff04absm34396812eec.8.2026.07.20.07.01.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jul 2026 07:01:35 -0700 (PDT) Message-ID: <8e4a3842-4fc2-4a05-9142-6fd8f23751ed@oss.qualcomm.com> Date: Mon, 20 Jul 2026 07:01:32 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] wifi: ath12k: fix survey indexing across bands To: Matthew Leach , Jeff Johnson Cc: linux-wireless@vger.kernel.org, ath12k@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Rameshkumar Sundaram , Nicolas Escande , Rameshkumar Sundaram References: <20260703-ath12-survey-band-fix-v3-1-2fb050c2505a@collabora.com> From: Jeff Johnson Content-Language: en-US In-Reply-To: <20260703-ath12-survey-band-fix-v3-1-2fb050c2505a@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=HKLz0Itv c=1 sm=1 tr=0 ts=6a5e2a41 cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=QX4gbG5DAAAA:8 a=xhY4wr4glCW0yVQm5PkA:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC:22 a=AbAUZ8qAyYyZVLSsDulk:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIwMDE1NiBTYWx0ZWRfX2nn/cr0QhbOL 2+58FqRfo0/iW34JodNEYpXH6NMEFknk8Uzv9r8XSKSXSrCxIucT/FGi29ADRwXGOH9aRyzKq7B 4QWVQ293j8SXquLDSu9bBjI7e9a4m0o= X-Proofpoint-GUID: ZGRpVqz1idqWHexa7nU7KtQlFJkl7XJ2 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIwMDE1NiBTYWx0ZWRfX2L50/Mv14r/K 1UZiZpElVJRcY23W8W6yQbfKUXcc4knoqzozmq3eUlQMiKzgdyGroijehjRXQVIJbifOSG+/vTR +8NMt8fIWSnZanP2aeVpXLxtH55v9Y7BR2FrInX3o6t3DDX93zFzudmQmcCrKiHokcx8wpmqu+v +5dW/R+sHLQet5b5OanvyYHOKCbqKGFnhjx8KbyW+iQHhE8wY355KArWPvL3ELM70Z7LSGrZlh+ q9wKD+7EwC9Gr0U/YcFhyeWMN4EWMCiIJ/q/cY6ThoKA8VlzJt2CULBhZh7KygGpYne45ycHvYh qA7IIOhY2iagrs+hEusxl6ATv4vmIUJ8fZ6FwqbEVhxVXoIE7NuNPeBNLsj6kiLAK0RBTdFK8wD tBW3q3cVqap559ohJY79Leoxd8X5gdAGZFcKthAsMNqvb/hzeFIp8IO5z6IT+zIejalGhyW5eg7 NDwlGtLRgSfQvU1R7bg== X-Proofpoint-ORIG-GUID: ZGRpVqz1idqWHexa7nU7KtQlFJkl7XJ2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-20_03,2026-07-20_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 clxscore=1015 malwarescore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607200156 On 7/3/2026 8:56 AM, Matthew Leach wrote: > When running 'iw dev wlan0 survey dump' the values for the channel busy > time have the same sequence across bands. This is caused by indexing > into the ath12k survey array using a band-local index rather than the > global index passed by mac80211. This results in surveys for 5 GHz and 6 > GHz channels returning values from 2.4 GHz slots, making the survey > unusable on those bands. Further, there are redundant survey slots for > multi-radio/single-phy instances. > > Fix by moving the survey data into ath12k_hw so multiple radios under a > single wiphy share one table, and index into it using the global > mac80211 index. A new spinlock in ath12k_hw serialises access to the > survey array, which is now shared across all radios under a single hw. > > Band busy-times Before this fix: > > 2.4 GHz: 9, 2, 2, 2, 4, 2, 10, 16, 4, 12, 5 > 5 GHz: 9, 2, 2, 2, 4, 2, 10, 16, 4, 12, 5 > 6 GHz: 9, 2, 2, 2, 4, 2, 10, 16, 4, 12, 5 > > After this fix, times are independent: > > 2.4 GHz: 23, 5, 5, 12, 2, 12, 26, 5, 3, 1, 27 > 5 GHz: 30, 40, 29, 27, 118, 118, 112, 120, 11, 11, 11 > 6 GHz: 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 > > Tested-on: wcn7850 hw2.0 PCI WLAN.IOE_HMT.1.1-00018-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 > > Fixes: 4f242b1d6996 ("wifi: ath12k: support get_survey mac op for single wiphy") > Signed-off-by: Matthew Leach > --- my review agent flagged: "file": "drivers/net/wireless/ath/ath12k/core.h", "summary": "data_lock comment still lists 'survey info' as one of the fields it protects, but survey data is now protected by ah->survey_lock", "failure_scenario": "A developer adding survey-related code follows the comment and uses data_lock to protect ah->survey[], introducing an unprotected access (since the actual readers/writers use survey_lock, not data_lock)." I'll update the comment in my pending branch /jeff