udev: Set all wireless interfaces to master mode before adding to bridge

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>
This commit is contained in:
Daniel Weismüller
2021-04-07 16:24:28 +02:00
committed by Michael Tremer
parent 087a20011b
commit fa4905addf

View 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