CC: broadcom-wl: add interface after bridge is up
authorHauke Mehrtens <hauke@openwrt.org>
Sat, 29 Aug 2015 20:05:41 +0000 (20:05 +0000)
committerHauke Mehrtens <hauke@openwrt.org>
Sat, 29 Aug 2015 20:05:41 +0000 (20:05 +0000)
backport of r46749

Without this patch adding the wifi device to the bridge may fail
because the bridge is not already configured when the wifi device gets
configured. This patch makes broadcom-wl wait till the bridge is ready.

This fixes #17262

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@46750 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh

index 271fc45a62dcb122b380a9c19503490f5b6029c7..859fca1bb1d3e63e8a22e93d47cd6c042f3ece8c 100644 (file)
@@ -377,6 +377,7 @@ enable_broadcom() {
 
                local net_cfg="$(find_net_config "$vif")"
                [ -z "$net_cfg" ] || {
+                       ubus -t 30 wait_for network.interface."$net_cfg"
                        append if_up "set_wifi_up '$vif' '$ifname'" ";$N"
                        append if_up "start_net '$ifname' '$net_cfg'" ";$N"
                }