Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1228001rwl; Fri, 24 Mar 2023 07:53:22 -0700 (PDT) X-Google-Smtp-Source: AKy350bSyeIQ1zE961X1rWkEGf0T8F+l8mRKiqxFL4iTGOrm7/wVo1MeKhRH0LQ+3vsxq7mqLE1V X-Received: by 2002:a17:907:6e17:b0:92f:c6b5:de08 with SMTP id sd23-20020a1709076e1700b0092fc6b5de08mr3208857ejc.76.1679669602296; Fri, 24 Mar 2023 07:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679669602; cv=none; d=google.com; s=arc-20160816; b=nJC96SWisGFVPMpDi9Wbl1RkzAMKI6hUedP5aL6xA6uL459xmhanYFS6lhb9hSeZfz CXyJTkXW3V5cmnm/ZQJjexIUX25aLYi46tFdhZ5aLf8Lmvo2iPmTeF9Yg+nsY2qaCiPh +vjrDJfHgWTD3z0GUAmf7zCcgE35Ydl2aHvsNLSyn4O8oDk3CK0rxC1mhNYh4WJ4OHzK VHINqlOj1JTtrODzoGVsnHt1f/rY0B4eR8o9M25vTe7wHUfKb4CZCLnuuKOwq+hOy42z GBfnysLw4KXv92WxkCTb5A6gTPQ+s3HDwVqhQoa08NPyAoy22aSWaaaw4YT5PJVG/qv1 Bgvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=RhNZaR1CCEUWxZHILNpEkcpry5zyURbaJ6BZ+wc49Lk=; b=UQRlAFN/c9V6NGtv6/MSvjgP4hd3d/iMu87Zd6olggRp8KLEDvFClzTG0Fcr3JB0Rl 5LHL5tIIKRDhugmdUpCprX3A/aLohg6NxJIRP12S3TxHNnGu0PfdWnt2Z/1VJabjtO/r z4G3roSEny6KsWwcu/aGHgWgbtCORHCWq5XNL+PCHY7qKtmmBIaRYJCmleqQCUwACPEF Ery8Ndi0CnbFjGIhav8aI751xFVmmanK/5Iitjq+AcNz5+U3CXCzGzlQKD2pVRMqS1uM HczwsO8zzLcH2LBdb9JJv1YfcujbieEMJoXfWW1StES8O5gCIxdlhGmIGrM3jGNUOtRK ipxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oy16oRUH; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j20-20020a170906255400b008cd6f50c059si21342486ejb.669.2023.03.24.07.53.07; Fri, 24 Mar 2023 07:53:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oy16oRUH; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231912AbjCXOt7 (ORCPT + 59 others); Fri, 24 Mar 2023 10:49:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232222AbjCXOtq (ORCPT ); Fri, 24 Mar 2023 10:49:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B74820579 for ; Fri, 24 Mar 2023 07:49:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3168262972 for ; Fri, 24 Mar 2023 14:49:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A613EC433D2; Fri, 24 Mar 2023 14:49:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679669378; bh=Hl8W0w9BtHpICBcGok2UYwa+8acwZYFJHjOzIeFWJDM=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=oy16oRUHxjuk07I4+78mpaFTIk4K7ilRS5IJOxNDrxMrVMIetRP48/DA7ONRsdtIN YP2IjkX4yZKJQ3PbPSuLElkNnwF2+yy0HT8qkLJnrxmwwPpTNJWGLC4MwBEFerov6T IqZTauETTw8gH1lWX+bylV0xovpJH+99oCmFfKGDIvu9RKfotulbvQD1sNqfUvJPMn QAAK7GOcj2z8Flt3N3RmJrzO6g1st/Ux1zI9Pm/7vW2RqYetLhfGcwonw9xVI75Kxu DwtI0UzoH/Km4CWz9S2obL6SCU65VxX73liVx+5Q6wKy1IWkSDYL6Dqd2hQ8mR+w43 rIGmQWGSRxYvg== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] wifi: ath12k: incorrect channel survey dump From: Kalle Valo In-Reply-To: <20230320091208.25535-1-quic_hprem@quicinc.com> References: <20230320091208.25535-1-quic_hprem@quicinc.com> To: Harshitha Prem Cc: ath12k@lists.infradead.org, linux-wireless@vger.kernel.org, Harshitha Prem User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <167966937560.27260.15117945912260469719.kvalo@kernel.org> Date: Fri, 24 Mar 2023 14:49:37 +0000 (UTC) X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Harshitha Prem wrote: > When underlying hardware supports more than one band, then wiphy > is aware of all the frequency bands present. Example, say > wiphy0 is aware of 2 GHz, 5 GHz and 6 GHz band information. > Hence, when an virtual AP interface is brought up in auto channel > selection on each band. Survey is initiated from the userspace application > for all the virtual AP interfaces simultaneously. > > For survey dump collection, freq_to_idx() api is used to map the index of > particular frequency to populate its survey. When the dump was collected, > the index fetched was incorrect. Example, in case of multi-hardware, > the index of channel 36 was reported as 14, because wiphy0 had index 0-13 > for 2 GHz channels, instead of 0 for that ar which resulted in invalid > survey sent to userspace application. > > The incorrect index was because of the mapping did not consider whether > the freq band is present in its radio structure (ar) or not. > > To handle this, the freq_to_idx() api should map index for the > particular band in the ar structure. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Harshitha Prem > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 25d165c49802 wifi: ath12k: incorrect channel survey dump -- https://patchwork.kernel.org/project/linux-wireless/patch/20230320091208.25535-1-quic_hprem@quicinc.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches