Return-path: Received: from mail-pg0-f42.google.com ([74.125.83.42]:35535 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754817AbdA0Mxf (ORCPT ); Fri, 27 Jan 2017 07:53:35 -0500 Received: by mail-pg0-f42.google.com with SMTP id 194so81236799pgd.2 for ; Fri, 27 Jan 2017 04:53:35 -0800 (PST) Subject: Re: [PATCH 2/6] wl1251: Use request_firmware_prefer_user() for loading NVS calibration data To: Kalle Valo , =?UTF-8?Q?Pali_Roh=c3=a1r?= References: <1482598381-16513-1-git-send-email-pali.rohar@gmail.com> <1482598381-16513-3-git-send-email-pali.rohar@gmail.com> <87tw8lnei3.fsf@codeaurora.org> <20170127094342.GC24223@pali> <20170127101043.GD24223@pali> <20170127103408.GG24223@pali> <87bmus7mfk.fsf@kamboji.qca.qualcomm.com> <20170127115706.GH24223@pali> <8737g47kpd.fsf@kamboji.qca.qualcomm.com> Cc: Ming Lei , "Luis R. Rodriguez" , Greg Kroah-Hartman , David Gnedt , Michal Kazior , Daniel Wagner , Tony Lindgren , Sebastian Reichel , Pavel Machek , Ivaylo Dimitrov , Aaro Koskinen , Grazvydas Ignotas , linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org From: Arend Van Spriel Message-ID: (sfid-20170127_135441_933030_D80C0E5C) Date: Fri, 27 Jan 2017 13:53:28 +0100 MIME-Version: 1.0 In-Reply-To: <8737g47kpd.fsf@kamboji.qca.qualcomm.com> Content-Type: text/plain; charset=utf-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On 27-1-2017 13:26, Kalle Valo wrote: > Pali Rohár writes: > >> On Friday 27 January 2017 13:49:03 Kalle Valo wrote: >>> Pali Rohár writes: >>> >>>>> So >>>>> for those other platforms there will be a delay waiting for user-mode >>>>> helper to fail, before trying to get nvs file from /lib/firmware. >>>> >>>> Yes, there will be. But there is no easy way to fix this problem that >>>> kernel is trying to use default/example NVS data... >>> >>> Kernel is doing correctly and requesting NVS data as expected, the >>> problem here is that linux-firmware claims that the example NVS data is >>> real calibration data (which it is not). Distros should not use that, >>> only developers for testing purposes. We should not courage users using >>> example calibration data. >>> >>> The simple fix is to rename the NVS file in linux-firmware to something >>> like wl1251-nvs.bin.example, no need to workaround this in kernel. If >>> you send a patch to linux-firmware I'm happy to ack that. >> >> I agree with rename and fact that default/example data should not be >> used. >> >> But... >> >> 1) Kernel should not read device/model specific data from VFS where >> are stored not-device-specific files preinstalled by linux >> distributions. >> >> And linux distributions are already putting files into VFS and kernel >> cannot enforce userspace to not do that (as they are already doing it). > > I'm having problems to understand what you are saying here. This is a personal opinion. I read it as: /lib/firmware can only contain files for from linux-firmware. At least the device-specific vs. non-device-specific does not seem to hold. The firmware files that we have in the linux-firmware repository are very device-specific. Unless you mean the 'platform' when talking about 'device'. Regards, Arend