]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
udev: Set all wireless interfaces to master mode before adding to bridge
authorDaniel Weismüller <daniel.weismueller@ipfire.org>
Wed, 7 Apr 2021 14:24:28 +0000 (16:24 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 8 Apr 2021 10:17:57 +0000 (10:17 +0000)
This patch changes that instead of only the wireless interface that is
used to run a wireless access point, all wireless interfaces will be set
to master mode.

This allows that attaching the interface won't fail if hostapd isn't
started, yet.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/udev/network-hotplug-bridges

index 4fc11fb33530491a56351839b9913f912174cbdf..a2ee56b8365d356b4b4c4c2ee565979485c10a76 100644 (file)
@@ -101,7 +101,8 @@ case "${MODE}" in
                        #ip link set "${BRIDGE}" up
                fi
 
-               if grep -q "INTERFACE=${INTERFACE}" "/var/ipfire/wlanap/settings" 2>/dev/null; then
+               # Try setting wireless interfaces into master mode
+               if [ -d "/sys/class/net/${INTERFACE}/phy80211" ]; then
                        iw dev "${INTERFACE}" set type __ap
                fi