Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4445211pxb; Thu, 14 Oct 2021 05:26:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2COoV/b7Ecb/tP+Xi1a3mRIcug92zSFdowL2IkIU4l3qT/YlIBkP2InHaRs2Y3u4IBeZP X-Received: by 2002:aa7:c78f:: with SMTP id n15mr8441474eds.338.1634214408920; Thu, 14 Oct 2021 05:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634214408; cv=none; d=google.com; s=arc-20160816; b=Y+eE1UhLHsKgLFY2U4gjgHTt1UothrMbokQh2Di0IQZXlA6JaY3abrbO9VQ5uZkGsO 5CU75jkRCA1D1KoO0C5XnAEjpHPZv8fxPHV53fPSoyiXjCazfOClPHNws1rKph1YJv86 kIn2dXOs4dRKEAfe7R0BoFTdwQh1uVIjN2UVNmi/VG/aMmGTHDem8dFfcde5PukLEsD/ 2gPXNwmQLE9t5pffNkfvdstUltlO9mi8UcZ2YFoKgoFj8rw1h0eUhp71WTM/V5T+B2oW 3AeTe9v6O4maEg70HqebbDDK1TFHjj9359isn7lvzmNcYmeP9PYDTBYph5CyG9VPwvc2 bX4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=LCGYTM8PrlK3nTDqb32h7V9GbZN6iE4UEGwF+ksTF7g=; b=V26Hk+4b74U1/cJASAfkHpXITRYKBx0qntZlZFJGvqqJ+qkjK7FlSrEA6lTNKywMiR VRwISgNBfFLBfkaed16pO2fvnxN+3TWvVPlb/H5G55SFkLuiovkd7KSEs7b1LFn8Re+9 OSfkjliUe+maf8pFgMxxRJhx029rqvFOKgDTR8NWKLEjIaRKQzuGjjrJF+C7C7Be5H/I KakfjIDboNVIXI2XJ7a2Hfl8OBXdRqLTUA/SiEkpjo4MF1m8Fmj0DpAx4hnm5swdluz0 DTmx4yS1DYW3ovVK8piF2X151ik4YWgYYB4WWAxrklagFRGO+kyTqG5MGlPnthcINaj9 oqpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LHxfpUO5; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l25si3315284ejr.445.2021.10.14.05.26.32; Thu, 14 Oct 2021 05:26:48 -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=@gmail.com header.s=20210112 header.b=LHxfpUO5; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231373AbhJNMEQ (ORCPT + 63 others); Thu, 14 Oct 2021 08:04:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231195AbhJNMEP (ORCPT ); Thu, 14 Oct 2021 08:04:15 -0400 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1F5DC061570; Thu, 14 Oct 2021 05:02:10 -0700 (PDT) Received: by mail-qv1-xf2e.google.com with SMTP id k29so3556101qve.6; Thu, 14 Oct 2021 05:02:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LCGYTM8PrlK3nTDqb32h7V9GbZN6iE4UEGwF+ksTF7g=; b=LHxfpUO5m1fZ68k4WTsL3KrR/mn3qL0AwvVMvG+QVzQt1YyGm+dA2VgCHpPiJy3JWB OTGTrR8pegPXPLXT8M71FeDuvPUMnX/zhbJoztwC/akn4KGWzVyZC1gjM4yg5XbqHdkc 3aGT7wfBhacqBakv9JsOjVTpSQUzv4bkaQrojCaY+eHH8zKYB3EPtI+LMNxhPU8Cg1yM Ua2SL+0hMsOF1ItVfZtoq+ZdNGJQgJAAborNSCO0zLGgpcPQDuWEDnoB6Jwpu2a3nK8B 3W6yxM++UPDX8rLA2qyVJvdDoFLPbqHh8GKM4bDAmW6RyiJ+3U2cr6z8rm4O6/qmjDig /PlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LCGYTM8PrlK3nTDqb32h7V9GbZN6iE4UEGwF+ksTF7g=; b=EE2/QZEA3l/PQHvrruP5vkpCCgcWZNXbJshXO5eHy36R2lDnFPzBUg66y5GgXNPska uQJrKnvShjLTvlHEdZ34PhAF7jpzRRHBKjdE9sdkb9KgZnGxZGDxWJiZqhQCEC+I/h8u fpKPUsI5RJok3Lq0dXNArb9Ds0iO7FXPPjfNH0tQRbtYFR2bLv7M3fY1vOP5bMhDPMOK Sz+WLbPBOhhcD/88sWm/OTMjpRLlM23FaXJwuGIFEKi8HH8ob/s/bfjsffVNpxAjf2wv SpjCVUovZMTfJ2Px6kgPUxhR8VTMn0aEDcBlaxDv3Doz1ynAjYymSJIubPVNhUNFMDwW 2sYA== X-Gm-Message-State: AOAM5300jGE0NY8GBHva7qImozT6gyX3Pdd3SsPX+ayRpCMiI/5vhn7q RlGjBbe/gCJelaO8ZpsS5zgPoofxw9RlA1fTj5Qxgdi3dJsr2g== X-Received: by 2002:a0c:c24c:: with SMTP id w12mr4849547qvh.48.1634212929738; Thu, 14 Oct 2021 05:02:09 -0700 (PDT) MIME-Version: 1.0 References: <20211009221711.2315352-1-robimarko@gmail.com> In-Reply-To: From: Robert Marko Date: Thu, 14 Oct 2021 14:01:58 +0200 Message-ID: Subject: Re: [PATCH] ath10k: support bus and device specific API 1 BDF selection To: Christian Lamparter Cc: kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, 14 Oct 2021 at 13:54, Christian Lamparter wrote: > > On 10/10/2021 00:17, Robert Marko wrote: > > Some ath10k IPQ40xx devices like the MikroTik hAP ac2 and ac3 require the > > BDF-s to be extracted from the device storage instead of shipping packaged > > API 2 BDF-s. > > > > This is required as MikroTik has started shipping boards that require BDF-s > > to be updated, as otherwise their WLAN performance really suffers. > > This is however impossible as the devices that require this are release > > under the same revision and its not possible to differentiate them from > > devices using the older BDF-s. > > > > In OpenWrt we are extracting the calibration data during runtime and we are > > able to extract the BDF-s in the same manner, however we cannot package the > > BDF-s to API 2 format on the fly and can only use API 1 to provide BDF-s on > > the fly. > > This is an issue as the ath10k driver explicitly looks only for the > > board.bin file and not for something like board-bus-device.bin like it does > > for pre-cal data. > > Due to this we have no way of providing correct BDF-s on the fly, so lets > > extend the ath10k driver to first look for BDF-s in the > > board-bus-device.bin format, for example: board-ahb-a800000.wifi.bin > > If that fails, look for the default board file name as defined previously. > > > > Signed-off-by: Robert Marko > > --- > > As mentioned in Robert's OpenWrt Pull request: > https://github.com/openwrt/openwrt/pull/4679 > > It looks like the data comes from an mtd-partition parser. > So the board data takes an extra detour through userspace > for this. > > Maybe it would be great, if that BDF (and likewise pre-cal) > files could be fetched via an nvmem-consumer there? > (Kalle: like the ath9k-nvmem patches) Christian, in this case, NVMEM wont work as this is not just read from an MTD device, it first needs to be parsed from the MikroTik TLV, and then decompressed as they use LZO with RLE to compress the caldata and BDF-s. > > This would help with many other devices as well, since currently > in OpenWrt all pre-cal data has to be extracted by userspace > helpers, while it could be easily accessible through nvmem. Yeah, for non-MikroTik stuff pre-cal data via NVMEM would be great. Regards, Robert > > What do you think? > > Cheers, > Christian