Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1419306lqd; Thu, 25 Apr 2024 15:21:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWlfeH8PK3c5DtolxDxhr7xMUlrUzsjk0Dcalda/gNyMECvdDQB5mjeEEuX5m/f6BKFmcCTN2f86eSSgn2nv5Bb+NxHDeSqgRjHzJapaw== X-Google-Smtp-Source: AGHT+IHK16alUpEXxeC/HVcsqe1Eq2EJ6YEIdTNhPAhfaRX7g6KWgfQ4FOcPQmmKuSZxp6wcZst6 X-Received: by 2002:a05:6a20:9692:b0:1a3:b187:f261 with SMTP id hp18-20020a056a20969200b001a3b187f261mr5411473pzc.29.1714083670028; Thu, 25 Apr 2024 15:21:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714083670; cv=pass; d=google.com; s=arc-20160816; b=LVl/dcXumeuEtSVnEBQLvhx9kXsQfDBfLE9somIjv9CzdMNL4uM/XZXig4ZdDsyy2X WMA2TPJU85LeMA3P5/3/vt6ottn2Lh8rHGNJ1ptxJZOxSxccumUwSj5KaEN4w/vvcFRg rhAuUB58jGeYXoaAR9CmRAzEi5+8uRRXAf6zWXjrnbgbD0wkxohcfxZpiUWcmc10iQqX 4NEc/70EAs+Srq8MyKAU5cd7na01eILhuVJxL0OjCQywcissMMDJSnuAXgSjI9KbruKh psiyXt3SoB7L5qiCUEYAAC/9rWYv0WTXLoG3svnW/qdn9UVzaG5H7EkHplfaKIZaF1nu OTjg== 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=w81Ht6qfme7mz+e7Wskc8IBgSUlr3EghXKJA67UjhDE=; fh=sG9jhBHEsNc76hLve58zfxxmeh0GUKp4yFB8ltJHOnE=; b=cu2FzRw52xwQ72sinI5CpqWJemAjsfguwoO6o2zn8/sMNYmI+hxYnKlmp57CDHoj3Y Pu+ts3TjPkIn90M8nGHiUB3IO3NCpnLI9FIGITm4JMvQGTJJEOo6kzdBijvC7mTQ+R6j cn5sHiInyLEyRethBKc1E/eEBvW0yhhDs/Nf+Qzd3VwV+tapABYOQDsmKIEoap4agPDL wcBi/vMZ75eshVFLqwtFjVodmRPYlLjlZhe5jLm7MlYsWbbSRQxK8ynaDBQuJvdQf3+T lC4bO3MlKVBQ3zcXZhDTI1yIyJBxeCFl58J9PhFQF+q+KBNjt11Fdb5Q3e0whaeDpa4l sWRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=UGlr1VRc; 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-6892-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q31-20020a635c1f000000b005dc493c9496si13728825pgb.507.2024.04.25.15.21.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 15:21:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6892-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=UGlr1VRc; 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-6892-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6892-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0D43628157C for ; Thu, 25 Apr 2024 22:19:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1302614A0A7; Thu, 25 Apr 2024 22:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="UGlr1VRc" X-Original-To: linux-wireless@vger.kernel.org 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 C1E7B2135A for ; Thu, 25 Apr 2024 22:19:17 +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=1714083559; cv=none; b=ItYUjcYky5Xos4mh9bEtRdIL12NLWZVR94gcyfX3CyRLi/Y7Qf4TYxFBnhtLtLfc4RlSApRgbBYagKNkaXWKTc1pk6OiWKIdVRG7oTAAjOXOVqQCeiQcSxYrPE3ZnMqYGCDnW2Nb/PjUpnb6ZrqOUL1oEzYLaI37hI+Ez3KfTeY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714083559; c=relaxed/simple; bh=hWkUwo01SqEYDam9Ui9lsrvM6pYLUgSRsc26K/lnaMg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=O+G+pO6kcug+lvt4s+gEPZHnhDRTEpej9CzFlxyFUbPHirWg/lAJlLA9/5ikQWgqC5k9MkM7E2D6VpsGrqtLZq300Im/Ry8ePxBC7XHX9z2EsaYOf9Pgrt5ulEYM6wlmmEr1SaXYzjC845A5KS+uTaEDLxiS9nrLh5G899HNZnQ= 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=UGlr1VRc; arc=none smtp.client-ip=205.220.168.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 (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43PKRK6Y032711; Thu, 25 Apr 2024 22:19:14 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=w81Ht6qfme7mz+e7Wskc 8IBgSUlr3EghXKJA67UjhDE=; b=UGlr1VRcf7jTq34gFZo83Ke0pGSTEHJ9AGBt IgO447Hy6UMoWRZPLkg0MKeLq4znAEKIS7RFkqpN+l4z+/l/ArA2ZHZ4hh/EGL74 mBGAC70jy+zB9Fc/SdeicQJz78GCr69QJlC4/ZMJjIr4H+i9wH1554XYoKY4h7H8 zwic/gMenwdsr5eqyWHDHhfDQT1q72sFU2N4HG/xJ/8bmTgkWj9Wg62ORpQSPMog tXqurZLn7F1iOQ8+xHtdQuwR9N+7J0Y90ZU6V3hVoYTf/eRcWNfd1XYca8W6p4sD iiPY32996CJ5g7sjewFSQWHchSAabZcf/SQqHiAxkO2On1E5aA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xqenhkufq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Apr 2024 22:19:14 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43PMJDdC011688 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Apr 2024 22:19:13 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; Thu, 25 Apr 2024 15:19:13 -0700 From: Pradeep Kumar Chitrapu To: CC: , Pradeep Kumar Chitrapu Subject: [PATCH V4 3/6] wifi: ath12k: fix survey dump collection in 6 GHz Date: Thu, 25 Apr 2024 15:18:59 -0700 Message-ID: <20240425221902.11553-4-quic_pradeepc@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240425221902.11553-1-quic_pradeepc@quicinc.com> References: <20240425221902.11553-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: D4kqVlioSCph-0DmNJQunKir04usk-ln X-Proofpoint-GUID: D4kqVlioSCph-0DmNJQunKir04usk-ln X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-25_21,2024-04-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 clxscore=1015 phishscore=0 spamscore=0 adultscore=0 mlxlogscore=859 priorityscore=1501 suspectscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404250163 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 b471b27d6594..830f35fb89fe 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -8020,6 +8020,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