aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/files/etc/init.d/boot8
-rwxr-xr-xpackage/base-files/files/sbin/wifi5
-rw-r--r--package/kernel/broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect5
-rw-r--r--package/kernel/mac80211/Makefile2
-rw-r--r--package/kernel/mac80211/files/mac80211.hotplug5
5 files changed, 19 insertions, 6 deletions
diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot
index 03b0fa0419..31f245ffc7 100755
--- a/package/base-files/files/etc/init.d/boot
+++ b/package/base-files/files/etc/init.d/boot
@@ -38,10 +38,10 @@ boot() {
/sbin/kmodloader
- # allow wifi modules time to settle
- sleep 1
-
- /sbin/wifi detect
+ [ ! -f /etc/config/wireless ] && {
+ # compat for brcm47xx and mvebu
+ sleep 1
+ }
/bin/config_generate
uci_apply_defaults
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
index 2ef333a782..f2845c82f6 100755
--- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi
@@ -145,7 +145,7 @@ wifi_reload() {
wifi_reload_legacy
}
-wifi_detect() {
+wifi_config() {
[ ! -f /etc/config/wireless ] && touch /etc/config/wireless
for driver in $DRIVERS; do (
@@ -229,7 +229,8 @@ scan_wifi
case "$1" in
down) wifi_updown "disable" "$2";;
- detect) wifi_detect ;;
+ detect) ;;
+ config) wifi_config ;;
status) ubus_wifi_cmd "status" "$2";;
reload) wifi_reload "$2";;
reload_legacy) wifi_reload_legacy "$2";;
diff --git a/package/kernel/broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect b/package/kernel/broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect
new file mode 100644
index 0000000000..a63d6bce60
--- /dev/null
+++ b/package/kernel/broadcom-wl/files/etc/hotplug.d/net/00-broadcom-wifi-detect
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ "${ACTION}" = "add" ] && [ "${INTERFACE%%[0-9]}" = "wl" ] && {
+ /sbin/wifi config
+}
diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index f9f50932e3..25adbfbb90 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -1732,6 +1732,8 @@ define KernelPackage/cfg80211/install
$(INSTALL_DIR) $(1)/lib/wifi $(1)/lib/netifd/wireless
$(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
$(INSTALL_BIN) ./files/lib/netifd/wireless/mac80211.sh $(1)/lib/netifd/wireless
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/ieee80211
+ $(INSTALL_DATA) ./files/mac80211.hotplug $(1)/etc/hotplug.d/ieee80211/00-wifi-detect
endef
define KernelPackage/ipw2100/install
diff --git a/package/kernel/mac80211/files/mac80211.hotplug b/package/kernel/mac80211/files/mac80211.hotplug
new file mode 100644
index 0000000000..b865552661
--- /dev/null
+++ b/package/kernel/mac80211/files/mac80211.hotplug
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ "${ACTION}" = "add" ] && {
+ /sbin/wifi config
+}