Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4436926pxb; Thu, 14 Oct 2021 05:17:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyc7LhjUe2kTdeterJvm5hrmyuX3Yo90Nq+IwORkCQnTm8c65fHYEkGrB6ynml+k1xT8aI X-Received: by 2002:a05:6402:2748:: with SMTP id z8mr8370459edd.25.1634213820092; Thu, 14 Oct 2021 05:17:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634213820; cv=none; d=google.com; s=arc-20160816; b=lewBly7mFCjoGgd7y7B/5U3vypynyPovyU8IZwuf5g/crQTCnuJc7Esz9cMgleTyES ec/yetagNidtySZE7XeGuTaDOhRFbrVyZ5DUvGIFii3uPUCBn62P2lmBbjWxAKMpzcmb 1eEfrCJM4WvKbfsnEM7jPfJ3je13wLa2b05vLt57dOaIa9WpRMn/V6AT6FENQi2MMCJ1 eGv5u7JvTT/ubkuNGqpkNM0fFLCmFLF4M38AUx7FzCaT2lnOIwOz5wD6p9nGbgLH0aCf 4rChofwuOAYNCYJMamkY/eio2I/dzJZubLzy/nfryv+5b1pKDPxKumDsA8CpKtAhU9Pb XSdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=Qh70ZouKZ85gIbpuXKWewmPLqOEF6lltY7MRU3dhsLQ=; b=vNDby0X4x8LYuxI1SAMGSwBVCy+Xp28En//us/8fsGidj9S4Htj93P2vPhlgPQmZ7m oZb7HYEj79hVHiCibblhsySNHUheWbxSebXpTbpSc1dwXHst6AcvAUY6QgUftqAVoYdd NdfqrxZZtHbI3/Xc3pDgmyp78zIxMh0aLZMylvWju/5h7XERGSJZwJZ1NqpqU2uP3sp3 zlStvRnvwe2+c7rnEwlfQDnQx2y259kbKA2zhU0JPIcWZAQU1cQDucqMzBzfFnKAZ6CG btKQFZ8fnW2AeKsO/OJqaqk35T4eBl9Of07eWuU8ckUOZRoHFqMo4EuQfPhDp2/Gz2nZ 5WGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cn8xR7ii; 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 cc12si3601564edb.194.2021.10.14.05.16.38; Thu, 14 Oct 2021 05:17:00 -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=cn8xR7ii; 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 S231210AbhJNL4j (ORCPT + 63 others); Thu, 14 Oct 2021 07:56:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229994AbhJNL4j (ORCPT ); Thu, 14 Oct 2021 07:56:39 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A243C061570; Thu, 14 Oct 2021 04:54:34 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id e12so18623540wra.4; Thu, 14 Oct 2021 04:54:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=Qh70ZouKZ85gIbpuXKWewmPLqOEF6lltY7MRU3dhsLQ=; b=cn8xR7iiAw7tWLtSnmilwd0CLe4cIYuLcWV6O7XQ5LHFnC/wOFIWN4l3qyN6BY/cdh AS/BEtzOkPPJ5YvO0DQPfmbY7qhU9fI/9imeranMOICUU0X4q8sP2J4qAmieeoLD+nhK HCTGk05ojGTmiqhKPYB+q8hH1ptSggXPQDx0d06jXoCevxZe4/+UAgsJ7aD4/ClHjIDM Uq5d3+wzLafXiIO/rGCntLEJUnvzl5Grh6fujZ9n6G/AzHdjs/mNvee7wuGUcKCbGqZN hhAIlxxxWuVoWMEk21U4XseZsNKCBloH6AeNxzN0KJ4c23+pyL9kgi+FRKa4kRWi4HUZ 5DaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Qh70ZouKZ85gIbpuXKWewmPLqOEF6lltY7MRU3dhsLQ=; b=T1pACr/10OguqapE/VHYbt/2yLHVbCkyctoSoYkWZkuIOdou4XQGtopkm30+Rh+hk6 E1QYCN35a7FQWjdWdmlPSoFBU1zbwL3o+Wh9LLxa427aiPuvf0BZtEqhxJe2d9FBsId4 t2JEwL/mUFgOhA8dP3mGb7F6BZTOM1tb6HQzT+RbJXUyijhQgC0fkzdKk0lVUYEC7txC 03O8p/S0YKu9JwExR7w4cZVTL35XrRrBlJjHXD1mkUyZZcdZ6/bm3LWL2ZCCY0v/SEIS 12D9tdqu0NeBRzF9t7iNmAUBGi4ch94M9bDGenwXyy65cA2ly/BMdP2SFzpT4rdCiHdK s4Ug== X-Gm-Message-State: AOAM532K5dh/ir8JIQiz5jYxBMjCYoYIiLnBBiyp5z+NT4dmj05L7RMG RiaRwYQubrJoL9bvTKNTUrJcunk9F4g= X-Received: by 2002:adf:8bca:: with SMTP id w10mr6144612wra.43.1634212472296; Thu, 14 Oct 2021 04:54:32 -0700 (PDT) Received: from debian64.daheim (p200300d5ff0f7400d63d7efffebde96e.dip0.t-ipconnect.de. [2003:d5:ff0f:7400:d63d:7eff:febd:e96e]) by smtp.gmail.com with ESMTPSA id c17sm2194410wmk.23.2021.10.14.04.54.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Oct 2021 04:54:31 -0700 (PDT) Received: from localhost.daheim ([127.0.0.1]) by debian64.daheim with esmtp (Exim 4.95) (envelope-from ) id 1mazJe-0008WG-Sw; Thu, 14 Oct 2021 13:54:30 +0200 Subject: Re: [PATCH] ath10k: support bus and device specific API 1 BDF selection To: Robert Marko , kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20211009221711.2315352-1-robimarko@gmail.com> From: Christian Lamparter Message-ID: Date: Thu, 14 Oct 2021 13:54:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211009221711.2315352-1-robimarko@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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) 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. What do you think? Cheers, Christian