Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1526848

Re: wl1251 & mac address & calibration data

From Pali Rohár <pali.rohar@gmail.com>
Newsgroups linux.kernel
Subject Re: wl1251 & mac address & calibration data
Date 2016-11-21 17:00 +0100
Message-ID <sFZaG-333-47@gated-at.bofh.it> (permalink)
References <sCnOh-7dZ-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Friday 11 November 2016 18:20:50 Pali Rohár wrote:
> Hi! I will open discussion about mac address and calibration data for 
> wl1251 wireless chip again...
> 
> Problem: Mac address & calibration data for wl1251 chip on Nokia N900 
> are stored on second nand partition (mtd1) in special proprietary format 
> which is used only for Nokia N900 (probably on N8x0 and N9 too). 
> Wireless driver wl1251.ko cannot work without mac address and 
> calibration data.
> 
> Absence of mac address cause that driver generates random mac address at 
> every kernel boot which has couple of problems (unstable identifier of 
> wireless device due to udev permanent storage rules; unpredictable 
> behaviour for dhcp mac address assignment, mac address filtering, ...).
> 
> Currently there is no way to set (permanent) mac address for network 
> interface from userspace. And it does not make sense to implement in 
> linux kernel large parser for proprietary format of second nand 
> partition where is mac address stored only for one device -- Nokia N900.
> 
> Driver wl1251.ko loads calibration data via request_firmware() for file 
> wl1251-nvs.bin. There are some "example" calibration file in linux-
> firmware repository, but it is not suitable for normal usage as real 
> calibration data are per-device specific.
> 
> So questions are:
> 
> 1) How to set mac address from userspace for that wl1251 interface? In 
> userspace I can write parser for that proprietary format of nand 
> partition and extract mac address from it

Proposed solutions for 1)

* Introduce new IOCL for setting that permanent mac address from
  userspace. Currently we have IOCL for get request

* Use request_firmware() (with flag from 2)) to ask for mac address from
  userspace. This is already used by wl12xx driver (as mac address is
  part of calibration data firmware file)

* Allow to set mac address via sysfs file, e.g.
  /sys/class/ieee80211/phy0/macaddress

> 2) How to send calibration data to wl1251 driver? Those are again stored 
> in proprietary format and I can write userspace parser for it.

Proposed solution for 2)

Introduce new flag for request_firmware(), so it first try to use
userspace helper for loading firmware file with possibility to fallback
to direct VFS access.


So... what do you think about it?

-- 
Pali Rohár
pali.rohar@gmail.com

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-11-21 17:00 +0100
  Re: wl1251 & mac address & calibration data Michal Kazior <michal.kazior@tieto.com> - 2016-11-22 16:30 +0100
    Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-11-22 16:40 +0100
      Re: wl1251 & mac address & calibration data Michal Kazior <michal.kazior@tieto.com> - 2016-11-22 17:30 +0100
        Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-11-22 19:10 +0100
          Re: wl1251 & mac address & calibration data Arend Van Spriel <arend.vanspriel@broadcom.com> - 2016-11-23 09:30 +0100
          Re: wl1251 & mac address & calibration data Pavel Machek <pavel@ucw.cz> - 2016-11-23 23:30 +0100
            Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-11-23 23:50 +0100
              Re: wl1251 & mac address & calibration data Pavel Machek <pavel@ucw.cz> - 2016-11-24 09:00 +0100
                Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-11-24 09:40 +0100
                Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-11-24 16:30 +0100
                Re: wl1251 & mac address & calibration data Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-11-24 16:40 +0100
                Re: wl1251 & mac address & calibration data Sebastian Reichel <sre@kernel.org> - 2016-11-24 17:10 +0100
                Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-11-24 17:50 +0100
                Re: wl1251 & mac address & calibration data Sebastian Reichel <sre@kernel.org> - 2016-11-24 19:20 +0100
                Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-11-24 19:40 +0100
                Re: wl1251 & mac address & calibration data Aaro Koskinen <aaro.koskinen@iki.fi> - 2016-11-24 20:10 +0100
                Re: wl1251 & mac address & calibration data Sebastian Reichel <sre@kernel.org> - 2016-11-24 16:30 +0100

csiph-web