mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Arend Van Spriel <arend.vanspriel@broadcom.com>
Cc: "Pali Rohár" <pali.rohar@gmail.com>,
	"Daniel Wagner" <wagi@monom.org>,
	"Luis R. Rodriguez" <mcgrof@kernel.org>,
	"Tom Gundersen" <teg@jklm.no>,
	"Johannes Berg" <johannes@sipsolutions.net>,
	"Ming Lei" <ming.lei@canonical.com>,
	"Mimi Zohar" <zohar@linux.vnet.ibm.com>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Pavel Machek" <pavel@ucw.cz>,
	"Michal Kazior" <michal.kazior@tieto.com>,
	"Ivaylo Dimitrov" <ivo.g.dimitrov.75@gmail.com>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Tony Lindgren" <tony@atomide.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"Network Development" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"David Woodhouse" <dwmw2@infradead.org>,
	"Takashi Iwai" <tiwai@suse.de>,
	"Josh Boyer" <jwboyer@fedoraproject.org>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Subject: Re: wl1251 & mac address & calibration data
Date: Tue, 20 Dec 2016 13:47:23 +0200	[thread overview]
Message-ID: <87shpiu8j8.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <fd180271-1cd4-9891-e3d5-ae9cd0fb088b@broadcom.com> (Arend Van Spriel's message of "Sun, 18 Dec 2016 21:08:43 +0100")

Arend Van Spriel <arend.vanspriel@broadcom.com> writes:

> On 18-12-2016 13:09, Pali Rohár wrote:
>
>> File wl1251-nvs.bin is provided by linux-firmware package and contains 
>> default data which should be overriden by model specific calibrated 
>> data.
>
> Ah. Someone thought it was a good idea to provide the "one ring to rule
> them all". Nice.

Yes, that was a bad idea. wl1251-nvs.bin in linux-firmware.git should be
renamed to wl1251-nvs.bin.example, or something like that, as it should
be only installed to a real system only if there's no real calibration
data available (only for developers to use, not real users).

>> But overwriting that one file is not possible as it next update of 
>> linux-firmware package will overwrite it back. It break any normal usage 
>> of package management.
>> 
>> Also it is ridiculously broken by design if some "boot" files needs to 
>> be overwritten to initialize hardware properly. To not break booting you 
>> need to overwrite that file before first boot. But without booting 
>> device you cannot read calibration data. So some hack with autoreboot 
>> after boot is needed.

Providing the calibration data via Device Tree is the proper way to
solve this. Yes yes, I know N900 doesn't support it but that's a
deficiency in N900, not Linux.

>> And how to detect that we have real overwritten calibration data and
>> not default one from linux-firmware? Any heuristic or checks will be
>> broken here. And no, nothing like you need to reboot your device now
>> (and similar concept) from windows world is not accepted.
>
> Well. After reading and creating calibration data you could just rebind
> the driver to the device to have it probed again.

Or load wl1251 as a module and make sure calibration data is installed
before the module is loaded. LEDE does that with ath10k:

https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata;h=97875bd79a579a0010da3f60324b6ec966fe9c6a;hb=HEAD

> But yeah, the default one from linux-firmware should never have been
> there in the first place.

Agreed.

-- 
Kalle Valo

  reply	other threads:[~2016-12-20 11:47 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11 17:20 Pali Rohár
2016-11-21 15:51 ` Pali Rohár
2016-11-22 15:22   ` Michal Kazior
2016-11-22 15:31     ` Pali Rohár
2016-11-22 16:14       ` Michal Kazior
2016-11-22 17:05         ` Pali Rohár
2016-11-23  8:24           ` Arend Van Spriel
2016-11-23 22:23           ` Pavel Machek
2016-11-23 22:39             ` Pali Rohár
2016-11-24  7:51               ` Pavel Machek
2016-11-24  8:33                 ` Pali Rohár
2016-11-24 15:13                   ` Sebastian Reichel
2016-11-24 15:20                     ` Pali Rohár
2016-11-24 15:31                       ` Ivaylo Dimitrov
2016-11-24 16:08                       ` Sebastian Reichel
2016-11-24 16:49                         ` Pali Rohár
2016-11-24 18:11                           ` Sebastian Reichel
2016-11-24 18:35                             ` Pali Rohár
2016-12-15  8:18                               ` Kalle Valo
2016-12-15 15:33                                 ` Pali Rohár
2016-12-15 20:12                                   ` Arend Van Spriel
2016-12-16  2:03                                     ` Luis R. Rodriguez
2016-12-16  7:25                                       ` Daniel Wagner
2016-12-16 10:40                                         ` Pali Rohár
2016-12-18 10:49                                           ` Arend Van Spriel
2016-12-18 11:04                                             ` Pali Rohár
2016-12-18 11:54                                               ` Arend Van Spriel
2016-12-18 12:09                                                 ` Pali Rohár
2016-12-18 20:08                                                   ` Arend Van Spriel
2016-12-20 11:47                                                     ` Kalle Valo [this message]
2016-12-20 16:56                                                       ` Tony Lindgren
2016-12-20 17:06                                                         ` Pali Rohár
2016-12-20 17:11                                                         ` Kalle Valo
2016-12-20 17:21                                                           ` Tony Lindgren
2017-01-12  8:50                                                       ` Pavel Machek
2016-12-16 10:35                                       ` Pali Rohár
2016-12-16 10:26                                     ` Pali Rohár
2016-11-24 18:46                       ` Aaro Koskinen
2016-11-26 17:17                         ` Pavel Machek
2016-11-26 17:20                         ` Pali Rohár
2016-12-05 23:51                           ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87shpiu8j8.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@codeaurora.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=arend.vanspriel@broadcom.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=jwboyer@fedoraproject.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=michal.kazior@tieto.com \
    --cc=ming.lei@canonical.com \
    --cc=netdev@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=sre@kernel.org \
    --cc=teg@jklm.no \
    --cc=tiwai@suse.de \
    --cc=tony@atomide.com \
    --cc=wagi@monom.org \
    --cc=zajec5@gmail.com \
    --cc=zohar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome