You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Christian Lamparter 5f8f8a3661 base-files, mac80211, broadcom-wl: wifi detection and configuration
Currently, the wifi detection script is executed as part of
the (early) boot process. Pluggable wifi USB devices, which
are inserted at a later time are not automatically
detected and therefore they don't show up in LuCI.

A user has to deal with wifi detection manually, or restart
the router.

However, the current "sleep 1" window - which the boot
process waits for wifi devices to "settle down" - is too
short to detect wifi devices for some routers anyway.

For example, this can happen with USB WLAN devices on the
WNDR4700. This is because the usb controller needs to load
its firmware from UBI and initialize, before it can operate.

The issue can be seen on a BT HomeHub 5A as well as soon as
the caldata are on an ubi volume. This is because the ath9k
card has to be initialized by owl-loader first. Which has to
wait for the firmware extraction script to retrieve the pci
initialization values inside the caldata.

This patch moves the wifi configuration to hotplug scripts.
For mac80211, the wifi configuration will now automatically
run any time a "ieee80211" device is added. Likewise
broadcom-wl's script checks for new "net" devices which
have the "wl$NUMBER" moniker.

Issues with spawning multiple interface configuration - in
case the detection script is run concurrently - have been
resolved by using a named section for the initial
configuration. Concurrent configuration scripts will now
simply overwrite the same existing configuration.

A workaround which preserves the "sleep 1" window for just
the first boot has been added. This allows the existing
brcm47xx boot and mvebu uci-default scripts to correctly
setup the initial mac addresses and regulatory domain.

And finally, the patch renames the "wifi detect" into
"wifi config". As the script no longer produces any output
that has to be redirected or appended to the configuration
file.

Thanks to Martin Blumenstingl for helping with the implementation
and testing of the patch.

Acked-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
..
board.d base-files: remove default /etc/config/network, generate it via board.d instead 8 years ago
hotplug.d/net sysctl: read settings from /etc/sysctl.d/*.conf 9 years ago
init.d base-files, mac80211, broadcom-wl: wifi detection and configuration 8 years ago
iproute2 base-files: add netifd's default prelocal table to /etc/iproute2/rt_tables 8 years ago
rc.button base-files: Ensure reset only works if an overlay exists 8 years ago
sysctl.d sysctl: read settings from /etc/sysctl.d/*.conf 9 years ago
uci-defaults treewide: remove bad local shell variable declarations 8 years ago
banner Centralize setting of all version info to include/version.mk 8 years ago
banner.failsafe failsafe-mode: print short help on commandline 10 years ago
device_info base-files: add URL option for OEM manufacturer info 9 years ago
diag.sh base-files: make diag.sh stub working in bash 15 years ago
fstab base-files: remove fstab symlink 8 years ago
group base-files: add an ftp group as well 13 years ago
hosts base-files: add /etc/hosts entries for ::1, ff02::1 and ff02::2 9 years ago
inittab image / basefiles: make console password configurable 8 years ago
openwrt_release base-files: properly escape strings for version info 10 years ago
openwrt_version include, base-files, opkg: introduce version configuration to override the embedded version info of generated images - Introduce new Kconfig symbols VERSION_DIST, VERSION_NICK, VERSION_NUMBER and VERSION_REPO to specify distribution, release name, version and repository for a given build - Introduce include/version.mk to provide common helpers for packages dealing with versions - Make opkg use version.mk to populate the opkg.conf template - Make base-files use version.mk to populate /etc/openwrt_version, /etc/openwrt_release and /etc/banner 12 years ago
os-release base-files: Add standard os-release file 8 years ago
passwd base-files: prime root password with "x" to notify programs that there is a shadow record, fix /bin/login.sh password detection accordingly. Solves broken key based dropbear login with empty password after r28935. 13 years ago
preinit preinit: use only the image config options 8 years ago
profile base-files: fix check for empty password warning 8 years ago
protocols base-files: add DCCP to /etc/protocols 9 years ago
rc.common procd: Allow initscripts to start one daemon instance at a time 8 years ago
rc.local base-files: introduce a ready-to-use /etc/rc.local to let users run custom commands on init without creating custom init scripts 15 years ago
services Add munin to /etc/services 12 years ago
shadow the root password should be empty for real, like before 10 years ago
shells rename default/ to files/ 18 years ago
sysctl.conf base-files: revert to default ECN settings 9 years ago
sysupgrade.conf base-files: - add sysupgrade support for keepfile hints * introduces /lib/upgrade/keep.d/ for per-package keepfile lists * introduces /etc/sysupgrade.conf for user defined keepfile hints - prime /lib/upgrade/keep.d/base-files-essential to keep sysupgrade usable for images without opkg - change sysupgrade to build the keepfile list from /lib/upgrade/keep.d/, /etc/sysupgrade.conf and opkg list-changed-conffiles 14 years ago