[OpenWrt-Devel] [PATCH 2/2] base-files: rename SSID with EUI of mac address

Jonas Gorski jonas.gorski at gmail.com
Sat Nov 9 07:57:17 EST 2019


On Sat, 9 Nov 2019 at 12:04, <mail at adrianschmutzler.de> wrote:
>
> Hi,
>
> > -----Original Message-----
> > From: Jonas Gorski [mailto:jonas.gorski at gmail.com]
> > Sent: Samstag, 9. November 2019 10:37
> > To: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> > Cc: OpenWrt Development List <openwrt-devel at lists.openwrt.org>; Rosy
> > Song <rosysong at rosinson.com>
> > Subject: Re: [OpenWrt-Devel] [PATCH 2/2] base-files: rename SSID with EUI
> > of mac address
> >
> > On Fri, 8 Nov 2019 at 12:49, Adrian Schmutzler
> > <freifunk at adrianschmutzler.de> wrote:
> > >
> > > If the label MAC address is provided for a device, the default SSID
> > > will be set to contain the EUI of this address, e.g. OpenWrt-ddeeff.
> > >
> > > With multiple routers, this will help the user to identify his device
> > > based on the MAC address printed on the device.
> > >
> > > If no label MAC address is specified, this will use "OpenWrt" as done
> > > before.
> > >
> > > Using a uci-defaults script for this is necessary as mac80211.sh is
> > > executed before /etc/board.json is created, so label MAC addresses set
> > > in 02_network would not be available there.
> >
> > Unfortunately since we detect wifi async these days this is quite racy, and
> > there is no guarantee /etc/config/wireless is fully populated by the time the
> > uci defaults are run. E.g. mwl8k takes quite a while since it uses different
> > firmwares for STA and AP modes, and it needs to re-initialize to switch
> > between them (triggered by by mac80211.sh trying to detect the supporte
> > features).
>
> So, in the end, it might be like Manuel Giganto suggested in GitHub and one might
> either have to wait in mac80211.sh until /etc/board.json is available (ugly) or
> just put the same code (the few lines of SSID change) in both locations (uci_defaults AND mac80211.sh).

How about just generating the board.json at an earlier time before
loading the wifi drivers, so it's always there once mac80211.sh runs?

We already generate it in preinit (unless failsafe is disabled) to
configure the switch and find the proper lan if, we might as well make
it unconditional and then rely on it for mac80211.sh.


Regards
Jonas

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list