From: "Pali Rohár" <pali.rohar@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Michal Kazior <michal.kazior@tieto.com>,
Kalle Valo <kvalo@codeaurora.org>,
Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>,
Sebastian Reichel <sre@kernel.org>,
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
Subject: Re: wl1251 & mac address & calibration data
Date: Wed, 23 Nov 2016 23:39:59 +0100 [thread overview]
Message-ID: <201611232339.59411@pali> (raw)
In-Reply-To: <20161123222335.GA4788@amd>
[-- Attachment #1: Type: Text/Plain, Size: 2153 bytes --]
On Wednesday 23 November 2016 23:23:35 Pavel Machek wrote:
> 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.
> > >
> > > Quoting modprobe.d manual:
> > > > install modulename command...
> > > >
> > > > 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. [...]
> >
> > I know. But this do not allow me to send mac address to kernel --
> > as 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.
Yes, this is another problem.
> > > 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).
> >
> > This is what I would like to prevent -- overwriting (possible
> > readonly) 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?
This sets temporary address and it is ioctl. IIRC same as what ethtool
uses. (ifconfig is already deprecated).
> And I guess we should use similar mechanism for permanent
> address.
I'm not sure here... Above ioctl ↑↑↑ is for changing temporary mac
address. But here we do not want to change permanent mac address. We
want to tell kernel driver current permanent mac address which is stored
in permanent mac address storage (in N900 case in mtd). Just like
userspace helper as kernel driver do not have code which can read
permanent mac address.
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2016-11-23 22:39 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 17:20 wl1251 & mac address & calibration data 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 [this message]
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
[not found] ` <CAB=NE6VHF+U7DzapENvLMKtN4Dgi9J0qMoeUJ8o4vSwc2-rRFQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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
2016-12-20 16:56 ` Tony Lindgren
2016-12-20 17:06 ` Pali Rohár
2016-12-20 17:11 ` Kalle Valo
[not found] ` <87bmw6ttim.fsf-HodKDYzPHsUD5k0oWYwrnHL1okKdlPRT@public.gmane.org>
2016-12-20 17:21 ` Tony Lindgren
2017-01-12 8:50 ` Pavel Machek
2016-12-16 10:35 ` Pali Rohár
[not found] ` <76365770-f5ba-9565-3fca-710518f64d81-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-12-16 10:26 ` Pali Rohár
2016-11-24 18:46 ` Aaro Koskinen
[not found] ` <20161124184601.wo4al6nyzb6rmiqs-FnsA7b+Nu9XLHDo1XOr0g3XdqJI7FyRRX3B1VOXEql0@public.gmane.org>
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=201611232339.59411@pali \
--to=pali.rohar@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=ivo.g.dimitrov.75@gmail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.com \
--cc=netdev@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=sre@kernel.org \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).