Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933225AbcKWWXl (ORCPT ); Wed, 23 Nov 2016 17:23:41 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:33033 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932909AbcKWWXj (ORCPT ); Wed, 23 Nov 2016 17:23:39 -0500 Date: Wed, 23 Nov 2016 23:23:35 +0100 From: Pavel Machek To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Michal Kazior , Kalle Valo , Ivaylo Dimitrov , Sebastian Reichel , Aaro Koskinen , Tony Lindgren , linux-wireless , Network Development , linux-kernel@vger.kernel.org Subject: Re: wl1251 & mac address & calibration data Message-ID: <20161123222335.GA4788@amd> References: <201611111820.52072@pali> <20161122153141.GT13735@pali> <201611221805.13606@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline In-Reply-To: <201611221805.13606@pali> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2047 Lines: 64 --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > As wl1251.ko does not accept mac_address as module parameter, such > > > modprobe hook does not help -- as there is absolutely no way from > > > userspace to set or change (permanent) mac address. > >=20 > > Quoting modprobe.d manual: > > > install modulename command... > > > =20 > > > This command instructs modprobe to run your > > > command instead of inserting the module in the > > > kernel as normal. The command can be any shell > > > command: this allows you to do any kind of > > > complex processing you might wish. [...] >=20 > I know. But this do not allow me to send mac address to kernel -- as=20 > kernel does not support such command yet (reason for my first > question). Plus, this does not really work for cases where wl1251 is not a module. > > You can hook up a script that cooks up wl1251-nvs.bin (caldata, > > macaddr) and then insmod the actual wl1251.ko module. Or you can just > > cook up the nvs on first device boot and store it in /lib/firmware > > (possibly overwriting the "generic" wl1251 from linux-firmware). >=20 > This is what I would like to prevent -- overwriting (possible readonly)= =20 > system files with some device specific. It is really bad idea! Agreed. "ifconfig hw ether XX" normally sets the address. I guess that's ioctl? And I guess we should use similar mechanism for permanent address. Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlg2FucACgkQMOfwapXb+vIcGACgjENv4xLN8EJGdCGycJou4Gzd U6QAn0XrkW6/p2NecQtidQwEX5Rs0lYL =o1Xt -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv--