Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751285AbaK0OG0 (ORCPT ); Thu, 27 Nov 2014 09:06:26 -0500 Received: from mail-wi0-f181.google.com ([209.85.212.181]:55634 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780AbaK0OGY (ORCPT ); Thu, 27 Nov 2014 09:06:24 -0500 From: Pali =?utf-8?q?Roh=C3=A1r?= To: "John W. Linville" , Grazvydas Ignotas , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ming Lei , "Greg Kroah-Hartman" Subject: wl1251: NVS firmware data Date: Thu, 27 Nov 2014 15:06:20 +0100 User-Agent: KMail/1.13.7 (Linux/3.18.0-031800rc5-generic; KDE/4.14.1; x86_64; ; ) Cc: Pavel Machek , Ivaylo Dimitrov , Aaro Koskinen , Kalle Valo , Sebastian Reichel , David Gnedt MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2511393.6NRFU7IPkM"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201411271506.20457@pali> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nextPart2511393.6NRFU7IPkM Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, wifi driver wl1251 needs NVS calibration data for working. These=20 data are loaded by driver via request_firmware from userspace=20 file: ti-connectivity/wl1251-nvs.bin. In linux-fimrware git tree=20 there is generic wl1251-nvs.bin file which is used by default. Driver wl1251 is used on Nokia N900 cellphone for its wifi chip.=20 This cellphone has one special MTD partition (called CAL) where=20 are stored some configuration data in special binary (key-value)=20 format. And there is also stored correct calibration data for=20 specific device (each device has different data). It is preferred=20 to use those data instead generic one (provided by linux-firmware=20 git tree). Now my question is: How to correctly load calibration data from=20 special Nokia N900 CAL partition into wl1251 kernel driver? By default kernel reads ti-connectivity/wl1251-nvs.bin file from=20 VFS if exists without any userspace support. If it fails then it=20 fallback to loading via udev. Reading correct data from CAL partition is not easy (structure is=20 difficult), but there is open source program which can parse CAL=20 partition and write NVS data to stdout. So adding this CAL parser=20 into kernel is not good idea (program is GPLv3+ code --=20 incompatible with kernel). So how to solve this problem? How to load correct NVS data from=20 CAL partition into wl1251 driver? It is possible to tell kernel to use some helper userspace=20 program for loading data and if it fails then fallback to direct=20 loading? E.g first try to use model specific data and if it fails=20 for some reasons then fallback to reading genetic data. =2D-=20 Pali Roh=C3=A1r pali.rohar@gmail.com --nextPart2511393.6NRFU7IPkM Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAlR3L9wACgkQi/DJPQPkQ1L/qQCgukIuGXsBlSf52W0+ktfjS83g kTMAnj1l7WkgutGJdPl3Y7VFRpRDm74t =DV3s -----END PGP SIGNATURE----- --nextPart2511393.6NRFU7IPkM-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/