mac80211: work around a race condition on detecting a phy while bringing it up
[openwrt/openwrt.git] / package / kernel / mac80211 / files / lib / wifi / mac80211.sh
index 3ecd932228fb856232d5b14ff1b717e9e1b807b8..e24a2a634ea6065295bdc780cdb519c2f1eb113c 100644 (file)
@@ -167,6 +167,10 @@ detect_mac80211() {
 
                path="$(iwinfo nl80211 path "$dev")"
                macaddr="$(cat /sys/class/ieee80211/${dev}/macaddress)"
+
+               # work around phy rename related race condition
+               [ -n "$path" -o -n "$macaddr" ] || continue
+
                board_dev=
                fallback_board_dev=
                json_for_each_item check_board_phy wlan