Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935029AbcLTRME (ORCPT ); Tue, 20 Dec 2016 12:12:04 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:36170 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754641AbcLTRL6 (ORCPT ); Tue, 20 Dec 2016 12:11:58 -0500 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 6D581612E8 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: Tony Lindgren Cc: Arend Van Spriel , Pali =?utf-8?Q?Roh?= =?utf-8?Q?=C3=A1r?= , Daniel Wagner , "Luis R. Rodriguez" , Tom Gundersen , Johannes Berg , Ming Lei , Mimi Zohar , Bjorn Andersson , =?utf-8?Q?Rafa=C5=82_Mi=C5=82eck?= =?utf-8?Q?i?= , Sebastian Reichel , Pavel Machek , Michal Kazior , Ivaylo Dimitrov , Aaro Koskinen , linux-wireless , Network Development , "linux-kernel\@vger.kernel.org" , David Woodhouse , Takashi Iwai , Josh Boyer , Dmitry Torokhov Subject: Re: wl1251 & mac address & calibration data References: <201611111820.52072@pali> <201612181204.52928@pali> <83b2e9a4-f990-68a8-241e-375e46448d47@broadcom.com> <201612181309.01298@pali> <87shpiu8j8.fsf@kamboji.qca.qualcomm.com> <20161220165658.GI4920@atomide.com> Date: Tue, 20 Dec 2016 19:11:45 +0200 In-Reply-To: <20161220165658.GI4920@atomide.com> (Tony Lindgren's message of "Tue, 20 Dec 2016 08:56:58 -0800") Message-ID: <87bmw6ttim.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (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 uBKHC9K5032498 Content-Length: 1726 Lines: 38 Tony Lindgren writes: > * Kalle Valo [161220 03:47]: >> Arend Van Spriel 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. No, these are unique per each sold device. Every N900 was calibrated at the factory and they all have different calibration data which is stored to the flash. So when N900 boots (and in _every_ boot) it has to load the calibration data from the flash and provide it to the wl1251 driver somehow. -- Kalle Valo