base-files, mac80211, broadcom-wl: use uci to populate wireless config
authorChristian Lamparter <chunkeey@googlemail.com>
Mon, 17 Oct 2016 13:59:13 +0000 (15:59 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 3 Nov 2016 10:08:01 +0000 (11:08 +0100)
commit5e35b4562fb73aaa1c75a3404fed2efb6afe03f8
tree6158914891186bf0015814228d513d7693da2c61
parentba3540db6223a0107fd78decafea702a0537af7a
base-files, mac80211, broadcom-wl: use uci to populate wireless config

Previously, wifi detect simply dumped its generated wireless
configuration to STDOUT. A second step was needed to append
the configuration to /etc/config/wireless (or create it, if
it didn't exist).

With this patch, The wifi detection script will now use uci
to update the wireless configuration directly.

This patch also makes the initially created wifi-iface a
named section ('default_radio$X' for mac80211 and
'default_wl$X' for broadcom). With this change, uci will
not print the cfgHASH to STDOUT (which would now corrupt
the wireless configuration). It will also prevent adding
duplicated wifi interface configurations, if the wifi
configuration is run concurrently.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
package/base-files/files/etc/init.d/boot
package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
package/kernel/mac80211/files/lib/wifi/mac80211.sh