Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp659408lqo; Wed, 8 May 2024 10:41:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXVRMqiUpTH0Oc9sVr68FFAcnJtJ/MzaWf4rEwhC0bhN6ltpp1KzqR+2eyTXpul3GZS7pB2hTR9g/SdwdUc2onLlqaVmmnixN+32YA2hA== X-Google-Smtp-Source: AGHT+IH52irsmDurNnqkFUx6ahuXVqCmR5hVsBuV5zc1ghJ2BaR9PGu3fMpfvUJ3yZbe+IUJZyVP X-Received: by 2002:a05:6a20:1014:b0:1a7:a3ee:5e4a with SMTP id adf61e73a8af0-1afc8d5e2f4mr3289522637.33.1715190108200; Wed, 08 May 2024 10:41:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715190108; cv=pass; d=google.com; s=arc-20160816; b=AXMtrpD4yMQlOziG9lCih1hiGm+MTEqBz3OIS56eeGPjLEokMfOMSPWokyN+71r65W oXeLRIM4cL5Cg8Hw9ex/uML3X4ngwxma2EPhUjRndw2eWrF272eUCh2UyvMmPlB29+FD VPhF85cWI4qltch8dEHbF0YRgUSgztTUPTrpvNt7iGMkPu79M/NuyubWKsEGW6zoWYZD 8MiE77SA8Tq7gk+YmYJTJi56Uf3wKbeR9XIr8Nc7hmHL/9G2n1E9imDERfOcDiKJEmcl a+VFnWqCA3UCz2EoSyg3ynWIzojJuNs6O1+NbbrkptD9CxtjnHRdzhoI8wA/o0uSTqj7 DlPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E3c53SqdpR1lOcT0yY53zdAupC35L2GxI4kPsbhaqm8=; fh=sG9jhBHEsNc76hLve58zfxxmeh0GUKp4yFB8ltJHOnE=; b=UM1f34bsuLojfUgRVQkenlFshz6obD4YH9rhxHzszLcLOlbRgJGlIDLb7rSQqDMihb 9HumjG7tANgB3Mk8li0FJTU3tJOdlCp4j688XNiNVOABhSVab0vCmy76QvTsOOL6r/Aw 3XjuzET3bgNGEvPoRbe/YYPLIG5MS/uloxihtNdCeqWziIQiBZqp1NfBeqhHGEA/7iXm J5cblQe4R0Opi3/I2yb/VpO3CZDgJaNl7B+14ghhCD5RqBI/xCJXy2SSMe4FahwiwRjp 0vHR3sDCcchM+955kmLj0Km+0X3Vi9JF4OytvZ7sl0CNjZyUPOXTX+BDQx3lU461w14L hefQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mnOWfSzq; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-7347-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7347-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l190-20020a6391c7000000b005f401cc97c8si12911680pge.529.2024.05.08.10.41.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 10:41:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7347-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mnOWfSzq; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-7347-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7347-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3B761B20632 for ; Wed, 8 May 2024 17:37:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0610320309; Wed, 8 May 2024 17:37:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="mnOWfSzq" X-Original-To: linux-wireless@vger.kernel.org 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 6065F1C6AD for ; Wed, 8 May 2024 17:37:16 +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=1715189837; cv=none; b=atwYaGPC59heiVwCOEjJXigQ/CoHOByku+eZoWFBwUa44FFhvC3EOGwItPFvnNKlNJichHmAPCsbhiF+57Fp8coK+UG1sDsoCjB2Q9USi7YQgBVG9nJ8GR+Nnfjt8ETe/9Gsk+TT8g9ZXFjBYdOXcWQDisuMGHluXbrWcvP5BYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189837; c=relaxed/simple; bh=Q/baIEKT8LTnl52M8SqBfe87rK+CzijWKIdfPJ1kTXc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=s/bVDb1M1skVO24ymZ9ZwjMX10C4e453kJM9wCfe7xtaNkX3ZYTl9P1mTs1Fgz9iuXT+Ubf5Jvara2zhqBn3MdOyPeCq0w6yyIZAkGmREEEj6Qww1gqWUgPsxxZEK6xJ1GJQjR6M3xK5tku604CF+/gARu3aquoYUWQsDdz8ypY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=mnOWfSzq; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com 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 448CieT7011319; Wed, 8 May 2024 17:37:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=E3c53SqdpR1lOcT0yY53 zdAupC35L2GxI4kPsbhaqm8=; b=mnOWfSzqxxtZmO46ZMdpxW4G/8pTejOAncQD aK/+OFoiBFMmJYFCswHwsOfH3PLxLTYvpKPsmhQPGQg590GRE0Vy1OX1xaQBP7zT X7JgWOJf+EspyIJuvIxw69Qy5IKZqqrS0yTonstJ9oFi7jPXs+r+xqtG+Vmtecza 6LaPYZcwCGrfyXG3TI8Go3sYrFnxV71jxK+4csj3ty978X+AWwHqslnoouV1VeKq j16QAEZk814dZcI1Joz6WZEQQd1EwbCI5wip6SZ1FztKYDg0a2tuplSvK9FvMoNQ uORUGh0akxf29r5MooJFKDZz26LrpFV/HeIQr1e9kLjLZx/+gQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y09nqgqn7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 May 2024 17:37:09 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 448Hb76T001886 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 8 May 2024 17:37:07 GMT Received: from pradeepc2-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 8 May 2024 10:37:07 -0700 From: Pradeep Kumar Chitrapu To: CC: , Pradeep Kumar Chitrapu Subject: [PATCH V5 3/6] wifi: ath12k: fix survey dump collection in 6 GHz Date: Wed, 8 May 2024 10:36:52 -0700 Message-ID: <20240508173655.22191-4-quic_pradeepc@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240508173655.22191-1-quic_pradeepc@quicinc.com> References: <20240508173655.22191-1-quic_pradeepc@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: SLsdDYRM_1EForw15Ay7qsgFMKhVelAu X-Proofpoint-GUID: SLsdDYRM_1EForw15Ay7qsgFMKhVelAu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-08_09,2024-05-08_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=853 priorityscore=1501 bulkscore=0 suspectscore=0 mlxscore=0 impostorscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 adultscore=0 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405080128 When ath12k receives survey request, choose the 6 GHz band when enabled. Without this, survey requests do not include any 6 GHz band results, leading to failures in auto channel selection. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Pradeep Kumar Chitrapu Acked-by: Jeff Johnson --- drivers/net/wireless/ath/ath12k/mac.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index ae9f41a17b4f..8af450cdace6 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -8031,6 +8031,17 @@ static int ath12k_mac_op_get_survey(struct ieee80211_hw *hw, int idx, if (!sband) sband = hw->wiphy->bands[NL80211_BAND_5GHZ]; + if (sband && idx >= sband->n_channels) { + idx -= sband->n_channels; + sband = NULL; + } + + if (!sband) + sband = hw->wiphy->bands[NL80211_BAND_6GHZ]; + if (!sband || idx >= sband->n_channels) { + idx -= sband->n_channels; + sband = NULL; + } if (!sband || idx >= sband->n_channels) return -ENOENT; -- 2.17.1