From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 D77BF14A084 for ; Thu, 23 Jan 2025 17:12:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737652366; cv=none; b=soRTE6vTwXF8uUSqXrpmrGZHQZMwYFHjwBOuXvZal4tc8zSqaPmvqz6hlqZ7t+82TfTzG0xQUWiLiLnsbalsRnyY1A3rapAnQcE5+8c5qXnJJzlj9aVIOA/uyzT2AdoeMoW3vUq5ljBqFOmBB1PJ4ng5t3xE/7Jg0qBmjcmxnVM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737652366; c=relaxed/simple; bh=HGU5iSG9x/njAM7pSpVd92El321Yvqs8b6IOX4KPrM0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DmGn4p/sZFmALH3X4vye8JyIa9OH0XCeD1M4Tvrxc759n/VHu2SZI66yYkHyMtiv4/5/+ZDqIkLxu+FTwhhk6BSseWpzpZLL6YhMZrfty8FqYF/6uQjJaWjXL6GCVHl2wK9L8mhV2jye5d/oIPW8sDuMB2cpGG7O/T2ePj0Vl0g= 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=aPbocEG4; arc=none smtp.client-ip=205.220.180.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="aPbocEG4" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50NG3gah011130 for ; Thu, 23 Jan 2025 17:12:43 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= d3az1RKU17qwjiOPGrZkVior54Yx4OI9sSB4ahewp44=; b=aPbocEG43Lzi6hRy Q1EjDsZ88n7tVcr24oKDA9eMzFoXg7r0VR7p+mZeXyZN11RGK7ujRv9v3txHA/v2 yESOe/bnDYHPxn6OtoJExcWktW+ZAS8cgul1ubpfLVi9gRI4CkuOl62dtLH0MSA+ eWfj/sE7yoDObSHVVrZ7zInev/5bCPhDXEbaWALczfsEc5sEsgz072VLWoCuuOEL v30QNAeAfvYz6472+9CFGCxOoFeA2U2wgxW1liwVY3i7a9xppLlEWQbTVjwr8IV5 hg8jJyWjR0hMKq0CxyYAWCzMtAODDJCRWfCLNRVeouYhslbBoZK0BAo8pA6fZHbX pm/fXw== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44bry6r5jq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 23 Jan 2025 17:12:41 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-218cf85639eso32170575ad.3 for ; Thu, 23 Jan 2025 09:12:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737652360; x=1738257160; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=d3az1RKU17qwjiOPGrZkVior54Yx4OI9sSB4ahewp44=; b=r01R86VXvnR91Bh9kdH+x+WJirOvNt5xUlC25PG0rbC9hEulb4yo02WdInzJtGOG+U V5HqmhDeLIMxkgexLw4ToDOgDZUjX6FiXwV58RZG5gBZDywl+nldJ++PUI2Bn2K7OG+V bRVD8R8MHC/gk/t3yFuing88LZy0SnVgVPUyeYzWwlZD75Lc4cEtEuwcCYvPs3Zk6xFb lrshsuT0JOqUbzy+R7CjJWWtIl02jvBqquSLGVG1lECoZjGnDtIJLo+G/yOVyUMShPDK anyaTMttoC7pnJ9NyHGifmX8yA0685mInRf8oSRAV2YhCdzjibWnmNqoxa+pJarwN6Xz jbuQ== X-Forwarded-Encrypted: i=1; AJvYcCUFRfktZMGUg09JSeeQy2DdHjciZ0le59UemC4NbTibmP94Gqc6da8bDCAwdmdbBJXN7FvP5qJMyPzhEFs=@vger.kernel.org X-Gm-Message-State: AOJu0YwIIEJXXhY9sr6XN2yQfmy/Hnk+Rv5mCDR3oD8ezDwKCvfp5fQT kUWV6PGUqEBl/eg1i4Vxlqu/HHKk3wuVFbjnFLv5X6R/0apPXqvU97WDXai6YqVm/TEW0tqmblk A8DW5esWUQtXJPhNTfjbJMPkNHnZP5MdtZ5/BnPTzbkdoX3x/i1rvPBUGD3HzDT0= X-Gm-Gg: ASbGncuQF3Y80aO82t9nMK1HZrSzyPvrYNYSIIzHYudt69x7ADZkHgfVyKd7JU/36ym dvhxlKi6P1N0oGYb51wudX6gJHrpyp4fR4IrsYZgrysCwoFVR1gkkxeju8yDeMRx3kKmrS5EjMA 6FQ42YNKxSLx13pih/pnDfLV5dIslZvEvIeCNCT6XALYDsjfYyvYX/RvmDy/FE7sRzGZP8Hr8Qo 0RMdlNWzTXhDAH/7W07NgHnFXEMzZdYaazwGPhBhhsPn8YyiElnxLnQFLe97Ho5oiKtUGMb4PUe euYrrJnSN/2NGXnvGXx9eJGuPhW64Pz9WDa03lFWwrnjClJGAqHNbcab2RZa1Jk= X-Received: by 2002:a17:903:2290:b0:216:5e6e:68cb with SMTP id d9443c01a7336-21c3540d18cmr423745065ad.16.1737652360408; Thu, 23 Jan 2025 09:12:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2Q1Ks0mnL3M2R9V9Lg+xPeJhjuHsVJ1yl2ugFUokMhKI673ryaHT2sM/t/6MrSM2ggR2uuQ== X-Received: by 2002:a17:903:2290:b0:216:5e6e:68cb with SMTP id d9443c01a7336-21c3540d18cmr423744625ad.16.1737652360030; Thu, 23 Jan 2025 09:12:40 -0800 (PST) Received: from [192.168.1.111] (c-73-202-227-126.hsd1.ca.comcast.net. [73.202.227.126]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21da414e2f6sm1294225ad.197.2025.01.23.09.12.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jan 2025 09:12:39 -0800 (PST) Message-ID: Date: Thu, 23 Jan 2025 09:12:37 -0800 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 for-current] wifi: ath12k: fix handling of 6 GHz rules To: Aditya Kumar Singh , Kalle Valo , Jeff Johnson , Vasanthakumar Thiagarajan , Baochen Qiang , Wen Gong , Karthikeyan Periyasamy , Pradeep Kumar Chitrapu Cc: Balamurugan Selvarajan , Ramya Gnanasekar , P Praneesh , Bhagavathi Perumal S , linux-wireless@vger.kernel.org, ath12k@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20250123-fix_6ghz_rules_handling-v1-1-d734bfa58ff4@oss.qualcomm.com> From: Jeff Johnson Content-Language: en-US In-Reply-To: <20250123-fix_6ghz_rules_handling-v1-1-d734bfa58ff4@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: 0f5HkpVA_XeoqlsJJ-6ilnJfzcV8RxeW X-Proofpoint-GUID: 0f5HkpVA_XeoqlsJJ-6ilnJfzcV8RxeW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-23_07,2025-01-23_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 priorityscore=1501 adultscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 impostorscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501230126 On 1/23/2025 8:21 AM, Aditya Kumar Singh wrote: > In the US country code, to avoid including 6 GHz rules in the 5 GHz rules > list, the number of 5 GHz rules is set to a default constant value of 4 > (REG_US_5G_NUM_REG_RULES). However, if there are more than 4 valid 5 GHz > rules, the current logic will bypass the legitimate 6 GHz rules. > > For example, if there are 5 valid 5 GHz rules and 1 valid 6 GHz rule, the > current logic will only consider 4 of the 5 GHz rules, treating the last > valid rule as a 6 GHz rule. Consequently, the actual 6 GHz rule is never > processed, leading to the eventual disabling of 6 GHz channels. > > To fix this issue, instead of hardcoding the value to 4, use a helper > function to determine the number of 6 GHz rules present in the 5 GHz rules > list and ignore only those rules. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 > > Cc: stable@vger.kernel.org Note that an upcoming linux-firmware PR will bring in firmware that triggers this issue, so want to get all affected versions of the driver patched before issuing that PR. /jeff