[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201612201806.30109@pali>
Date: Tue, 20 Dec 2016 18:06:30 +0100
From: Pali Rohár <pali.rohar@...il.com>
To: Tony Lindgren <tony@...mide.com>
Cc: Kalle Valo <kvalo@...eaurora.org>,
Arend Van Spriel <arend.vanspriel@...adcom.com>,
Daniel Wagner <wagi@...om.org>,
"Luis R. Rodriguez" <mcgrof@...nel.org>,
Tom Gundersen <teg@...m.no>,
Johannes Berg <johannes@...solutions.net>,
Ming Lei <ming.lei@...onical.com>,
Mimi Zohar <zohar@...ux.vnet.ibm.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Rafał Miłecki <zajec5@...il.com>,
Sebastian Reichel <sre@...nel.org>,
Pavel Machek <pavel@....cz>,
Michal Kazior <michal.kazior@...to.com>,
Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>,
Aaro Koskinen <aaro.koskinen@....fi>,
"linux-wireless" <linux-wireless@...r.kernel.org>,
Network Development <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
David Woodhouse <dwmw2@...radead.org>,
Takashi Iwai <tiwai@...e.de>,
Josh Boyer <jwboyer@...oraproject.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>
Subject: Re: wl1251 & mac address & calibration data
On Tuesday 20 December 2016 17:56:58 Tony Lindgren wrote:
> * Kalle Valo <kvalo@...eaurora.org> [161220 03:47]:
> > Arend Van Spriel <arend.vanspriel@...adcom.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).
>
> Makes sense to me. Note that with the recent changes to wlcore, we
> can now easily provide board specific calibration firmware simply by
> adding a new compatible value. So for n900, we could have something
> like compatible = "ti,wl1251-n900" and have it point to n900
> specific calibration file wl1251-nvs-n900.bin. Of course this won't
> help with the mac address, or any of the device specific data..
>
> That is assuming the calibration values are the same for each similar
> device and don't have to be generated for each device. And naturally
> wl1251 needs simlar changes done to make use of devices specific
> calibration files.
>
> Regards,
>
> Tony
As wrote in another thread "wl1251 NVS calibration data format"
calibration data for wl1251 (wl1251-nvs.bin) contains also MAC address,
which kernel sends to wl1251 chip. Kernel just do not use it.
So... my idea now is:
1) extend request_firmware function family with ability to use userspace
helper first and fallback to VFS
2) teach wl1251.ko to parse MAC address from wl1251-nvs.bin and use it
(in case it is not empty or 00:00:20:07:03:09 which is in that example
linux-firmware package)
3) write Nokia n900 specific userspace helper for providing data when
kernel requests wl1251-nvs.bin. So userspace helper reads MAC address
and calibration data from CAL, place MAC address into calibration data
and send put it into kernel.
Are you OK with this idea?
--
Pali Rohár
pali.rohar@...il.com
Download attachment "signature.asc " of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists