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 530963D891A for ; Mon, 20 Jul 2026 14:22:08 +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=1784557330; cv=none; b=EwSw9TRMoTFG2qUv3mCF/ezyXHNxvqTfgZbveh/8lzs9bFxBv8AbENmn1DLOXspnduJCCOoa5Pkz4yaqk+dL0IsSZOt+dbrGytqIzpYvLAcH3QtcuSJkBL6l5xORff4OODdgkS3xJ8Gd5ignNFG8V/ft+CGi7iW4zZR7v3STiHk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784557330; c=relaxed/simple; bh=jJcksr9WENtV3N32Ym7RIbYwKolG6tWkXcJTQtSaLxw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=H47ekYPEBW8Cf+myY7NlJlJAhB2V2OVJ+1zQvIIFX601jSDgFeaK0YEBjaIgANgjBxekP2C4uXwfcpTxc/q/i2w/qZ8YvHyAk4t8tEf1jj1Q5ceNOwGUWoPttz0S5N8GMQGUTtsF4n6UH9kMAmoC5O0ED4KYkDZK/i+oMl6Fmgw= 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=cUEQGchJ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=e9JVwJMJ; 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="cUEQGchJ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="e9JVwJMJ" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66KDqeGo2962879 for ; Mon, 20 Jul 2026 14:22:07 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= 5XCGOX7fJC/o6dy33m46UWinQkqK0SLbXzlqRYjxrpg=; b=cUEQGchJXLDNPKkp YMl+DEERW59+QoQouT/GUjclYrztuabB8ZI29zgBHGrR3uDcvTtAv5a8EUMVxqSg 7jNFZif8PFcGoW7vr7jPoTDKe6iQduOFMCT19UHLm4jXXcKUyAS+TYKsAwk+bjmk RYuPldXDzDUCduOHLGVlcPTv4BanhUTUqjn5bR/CzyVkzqjT8Qi8bzwpmFk/PWRg rv3ByFVJyeZ5a2xYwYutEpQAqwQ8U42U5OZRReIfGaET8B5EskyxYUEtkTf3e2AD 3KI4+IbLNf5+A/u/3Yf8ITtBmZnR0QEhNi6Q2mAvCSBMXOJznyivzHztidJ1ItfJ i5bvHA== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fhfdchrfs-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 20 Jul 2026 14:22:07 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-38e6d253330so1504930a91.1 for ; Mon, 20 Jul 2026 07:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784557327; x=1785162127; 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=5XCGOX7fJC/o6dy33m46UWinQkqK0SLbXzlqRYjxrpg=; b=e9JVwJMJ5MXs3EeVaqAGd/Zeu3mArW+FlYt36l80zC35zXkvx6BSCsg8DxGgUlFhXg f558wh4wuDjZFC+YrGHZpV2GTpNEGPX96oz+oMjYy0sAJsaonzB3ELLicAKg6SW4loQv veaqUoQkfWFvddBLPIgnVW9JA1usiu1JGTXmTHKTflXFFatIekffOVZM7tmVeFzZRAdY QAoGUov7A5EFz7Oio4q8pHTR2z+8toQYEsEsuDh/ltjnkMoJ2FE4g2BXSJzlpO41CqWx EGevjq8sos+1g0RGuXVf4tYv6DiDpAdA43EOPmBg6kdnoqib0HDu8nKiBBTuwLz1SJBT /q5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784557327; x=1785162127; 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=5XCGOX7fJC/o6dy33m46UWinQkqK0SLbXzlqRYjxrpg=; b=TwblE5EIgIuVSmDA8GhQdh8LcbQFmZC2B2Kkir2itChPfNn2mdVDjmw2gV4uuZtMwt XCxv8Y/Fu34i0/tldum5tx0yYKKgXuIze4WbGT8wXG3PFDiSCk6clb0bG/X5YScHEVnT qsQhU1mziGxBqoQ2OQGfJ51KVi06O/0HhYCdywmeTFYv9ALjaZ4tp8QbwfBQ2hZ616cn TPJfPb+FuqCZT/u/YJ7uxJu00x2WreMFjehu35/4YKct4v4hHEUSIks6U3+zgNUs16Ow NC14JENe7Wa7gUzK+s6sicJp39fOZzQaNBoNxb3V2rTkMOiGLRLSiNMkXyLe7eU8buSJ vLKw== X-Forwarded-Encrypted: i=1; AHgh+RqCmLxUqsyZYUNkLN/jjS2BBu4lb56ONnb8usi3lT0GcXd4DiPddsFxZw2cecqt0ys2lR9mKdMDafOaKpI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy9Cl+Dw6zXO8XhnBl9AvbSAc7P6JT3D4dPXoxVFf/zEi4WQi9p MkHrHiSPeYgG7nakyoyY12W2VM6Zmq5QYNuHbNmPhd8g/pPQCVGFtS4oMPu/ccJ+1dSELctjAE7 EnOz9sR+EbCZtu4/2JOymtz5TUOrOxOE7YfZyEfhj9blZKY16l5epKb+MyY2UdAeJo7E= X-Gm-Gg: AR+sD13Xr3QiHe+KMMMba+myM8scL7xl3iNbv8m/falTBASLkv7o58JajBAYPbwLN9V 5KbiWHVSeV92ONzyLJ76zfMNmFybwgAUy5EhmkkNDNbb5gFH7bhSxDvZU2gxupZHq+RSgV3gn6B N1wFOb4uevE3CKSsAaiM3qvUcobtk0NxGnLFC7cHEOL5tjQlcp8euJp+974ZtOjEg6hWYAtms9S XqOU3V41KucHjklOw3Y7j9N9i55RpII5kHrv+gnwMtj824cVyfbdYx/L6HzFT5D+FPPoiVll182 CQwBXFi6A9mjes3NX4FoFcVeLLj5vdhpMo+ZQA9DRp+eqe5V+fuUfzB7cYpBTMVdqQqlovX0tVZ i+RIcmo+Nk8AaUHvcZ+InTNCg6ox6T2gyIUwM1G2WswdC0rvKovEjZDWBdBv4 X-Received: by 2002:a17:90b:1345:b0:37e:1620:dabc with SMTP id 98e67ed59e1d1-38e3cfd30a6mr19437472a91.0.1784557326660; Mon, 20 Jul 2026 07:22:06 -0700 (PDT) X-Received: by 2002:a17:90b:1345:b0:37e:1620:dabc with SMTP id 98e67ed59e1d1-38e3cfd30a6mr19437440a91.0.1784557326220; Mon, 20 Jul 2026 07:22:06 -0700 (PDT) Received: from [10.227.110.203] (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13ce29c2a48sm27471571c88.2.2026.07.20.07.22.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jul 2026 07:22:05 -0700 (PDT) Message-ID: Date: Mon, 20 Jul 2026 07:22:04 -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> <8e4a3842-4fc2-4a05-9142-6fd8f23751ed@oss.qualcomm.com> From: Jeff Johnson Content-Language: en-US In-Reply-To: <8e4a3842-4fc2-4a05-9142-6fd8f23751ed@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: _qqG3XFe7nJ8kZ3f-l_5k8f8kDGH4Uo7 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIwMDE2MCBTYWx0ZWRfX1ZgDyurNzXQ5 4u9EgotAzNbXtwqRACGKSAm/bFGsfEcvTVO7l3p+N699tzWKfTu0Y1KHCwqCsixM7Jb802kskr6 cZK4VvBvzXFcAn5oHs3n+KYj3vOo4dsfGIIlX7eYC/psR0jXO14Cuk9eLYOpSgz83DncukTmZ0X Wwh5DUX5pqlTNxTIvBGQJjoRdEchW3OCZearn668B9YbUj/VykMkeQ+RJLOdJvnwzSNrWrrlhAd uljWGM3eJxdMtFYL6UmA0Z1P9y/fqylO3IvjoK54HAYoFQFDzF4HEf/z+awQpWQDAZyAEu1pzWE y3hfTG7qeOFuVP3ydOW2bCxqTZrqN5YZdulPGol+QIrK3nMnyYjpkdS1LpXGbiJ/UYUg27IlH95 ZL3U3bhpttiWO+Aw2hayqcXHbUGlQSDAPLD7XWlDcVObhpcTnCK+lsijJ2gY3R1rqtPUG9vCjX8 y2ldfAnxE37BMaBJHUw== X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIwMDE2MCBTYWx0ZWRfX2KI8L0wRVEDw qlDfgORCWST8dOLfMVXuHYcN/QBst+c4Ns4Govy8h6cdEHZiwsMB+8hBtuN5Sukh5Tp0/aRVNE2 mn8XiWCH3a7yAdf6Yu6huj/1F7I0zXM= X-Proofpoint-GUID: _qqG3XFe7nJ8kZ3f-l_5k8f8kDGH4Uo7 X-Authority-Analysis: v=2.4 cv=bv58wkai c=1 sm=1 tr=0 ts=6a5e2f0f cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=VwQbUJbxAAAA:8 a=QX4gbG5DAAAA:8 a=MbpG7XlEKC8dfAHvq1UA:9 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw:22 a=AbAUZ8qAyYyZVLSsDulk:22 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 impostorscore=0 bulkscore=0 priorityscore=1501 spamscore=0 malwarescore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607200160 On 7/20/2026 7:01 AM, Jeff Johnson wrote: > 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 https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git/commit/?h=pending&id=9ff6ef3b7b33d9c4afa898581a99ca86dc8b5004