Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp413958pxv; Thu, 22 Jul 2021 03:26:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBflySRwOSns43UE7aevSWdxFIPOFlJJNu7X6Au2BGabVIZOnq4Z9p1KBuZGcqvbIbIGP9 X-Received: by 2002:a17:907:724b:: with SMTP id ds11mr44063825ejc.192.1626949584465; Thu, 22 Jul 2021 03:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626949584; cv=none; d=google.com; s=arc-20160816; b=cWBxi90liQuUFfSImJcMjdJ6f/uld9K7HIi9YF6rlaXwXWpaSwZTKJr+qvL2ToLKce iOALytqt0WPS0AoMUP6hrJ1jJSIm+mwF73J7TrD5k4+n2mM7IFXSXzYdrUE7YSsx6e5q SWw0pVT4HqBqptXsjpbK0zrxH0F1Bg5BzrOqjJ5hheLg6GWlDBXKl47B1p2dyHuPsiqb 81JvC/3r5qU2iYB58rKuoVh05UMV95n+ACasI1T6ZCUT222jgebfqzotG9uhsQJmU/1d zEr7IIzsbTfklmnyfiiO5NxeIOC0LoKjvJpzLWw0jP1kzl2iL34iMQ+AlaLLbyL3xhk+ dcYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dmarc-filter:sender:dkim-signature; bh=sEI8O3MRZYX32rujGHdALGWFcR20l7QSJ0dWH7WlTls=; b=igDqqs/M67hEdnezRJ04/t/QusHAi+8Xt7Lx2qNAj0FhKN4FNl3hRIHPDWogcPZI2G Z5NrvcKUUxTzAJoiX0LlodlLwJHfHp0hkUbhBHAVRtsN940wUofAmoKhpv7ZLLorxNGV JWNGJ09SHcVHyvqmJE37JUbbIDNiWdBvJH2gOdDOCVtlHWEqsFj90+JSqCS0GxSYzVa1 11Qip0qFR0iM+jLRA9Fp8vaSQmkw+Nd6Kmkh6DgXEjNbmAujoXbiXwp8qduKVP6RDiNL QJpVtBtec1WDFOViu3RcPBjbZXPcDsDnLxV6TMy3mTp+9yscx6bV8/2pdDC+6VjaXj3W ydAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=FCVgh1Mr; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si36429118ejy.385.2021.07.22.03.25.59; Thu, 22 Jul 2021 03:26:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=FCVgh1Mr; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231582AbhGVJke (ORCPT + 99 others); Thu, 22 Jul 2021 05:40:34 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:20867 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231571AbhGVJkd (ORCPT ); Thu, 22 Jul 2021 05:40:33 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1626949268; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=sEI8O3MRZYX32rujGHdALGWFcR20l7QSJ0dWH7WlTls=; b=FCVgh1MrjdLdpFRHbZWeGg4/zPwiuoIsZYSjg8ppEmEOxbcSnyhTn8k9WQExwntYf1C3IerN 1MlntG7f+CXyDWMJJlEU3zBrh4ImXnNBstPeCdeOuKptdYQ/AlMbX2WG2v/H06jwaQWFB/MS W4R0dxx/tOKZ08epDCoqSkJz5xE= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-east-1.postgun.com with SMTP id 60f946934815712f3a2f8d9d (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 22 Jul 2021 10:21:07 GMT Sender: jouni=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 2A2B9C43460; Thu, 22 Jul 2021 10:21:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from jouni.codeaurora.org (85-76-67-217-nat.elisa-mobile.fi [85.76.67.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jouni) by smtp.codeaurora.org (Postfix) with ESMTPSA id 730A5C433D3; Thu, 22 Jul 2021 10:21:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 730A5C433D3 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=jouni@codeaurora.org From: Jouni Malinen To: Kalle Valo Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, Pradeep Kumar Chitrapu , Jouni Malinen Subject: [PATCH 3/3] ath11k: fix survey dump collection in 6 GHz Date: Thu, 22 Jul 2021 13:20:54 +0300 Message-Id: <20210722102054.43419-3-jouni@codeaurora.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210722102054.43419-1-jouni@codeaurora.org> References: <20210722102054.43419-1-jouni@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Pradeep Kumar Chitrapu When ath11k receives survey request, choose the 6 GHz band when enabled. Without this, survey request does not include any 6 GHz band results, thereby causing auto channel selection to fail. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01386-QCAHKSWPL_SILICONZ-1 Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Jouni Malinen --- drivers/net/wireless/ath/ath11k/mac.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 56120407bfdd..133ecb351365 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -7073,7 +7073,13 @@ static int ath11k_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) { ret = -ENOENT; goto exit; -- 2.25.1