Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935519AbcLOISv (ORCPT ); Thu, 15 Dec 2016 03:18:51 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:57572 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932236AbcLOISt (ORCPT ); Thu, 15 Dec 2016 03:18:49 -0500 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org A57D36134D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Pali =?utf-8?Q?Roh=C3=A1r?= Cc: Sebastian Reichel , Pavel Machek , Michal Kazior , Ivaylo Dimitrov , Aaro Koskinen , Tony Lindgren , "linux-wireless" , Network Development , linux-kernel@vger.kernel.org, "Luis R. Rodriguez" Subject: Re: wl1251 & mac address & calibration data References: <201611111820.52072@pali> <201611241749.33681@pali> <20161124181138.4i6ehkpohjxfgpbn@earth> <201611241935.32796@pali> Date: Thu, 15 Dec 2016 10:18:44 +0200 In-Reply-To: <201611241935.32796@pali> ("Pali \=\?utf-8\?Q\?Roh\=C3\=A1r\=22's\?\= message of "Thu, 24 Nov 2016 19:35:32 +0100") Message-ID: <87d1gtli57.fsf@purkki.adurom.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uBF8Iu0Q011980 Content-Length: 1987 Lines: 48 (Adding Luis because he has been working on request_firmware() lately) Pali Rohár writes: >> > So no, there is no argument against... request_firmware() in >> > fallback mode with userspace helper is by design blocking and >> > waiting for userspace. But waiting for some change in DTS in >> > kernel is just nonsense. >> >> I would just mark the wlan device with status = "disabled" and >> enable it in the overlay together with adding the NVS & MAC info. > > So if you think that this solution make sense, we can wait what net > wireless maintainers say about it... > > For me it looks like that solution can be: > > extending request_firmware() to use only userspace helper I haven't followed the discussion very closely but this is my preference what drivers should do: 1) First the driver should do try to get the calibration data and mac address from the device tree. 2) If they are not in DT the driver should retrieve the calibration data with request_firmware(). BUT with an option for user space to implement that with a helper script so that the data can be created dynamically, which I believe openwrt does with ath10k calibration data right now. > and load mac address also via request_firmware() either by appending it > into NVS data or via separate call I'm not really fan of the idea providing permanent mac address through request_firmware(). For example, how to handle multiple devices on the same host, would there be a need for some kind of bus ids encoded to the filename? And what about devices with multiple mac addresses? I wish there would be a better way than request_firmware() to provide the permanent mac addresses from user space (if device tree is not available), I just don't know what that could be :) But if we would start to use request_firmware() for this at least there should be a wider concensus about that and it should be properly documented, just like the device tree bindings. -- Kalle Valo