mac80211: work around a race condition on detecting a phy while bringing it up
When reloading modules and running wifi, a phy can sometimes be renamed while in the middle of a hotplug call that tries to detect new phys This can lead to bogus wifi-device sections being created Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
92acd9f3e8
commit
133a1e2f37
1 changed files with 4 additions and 0 deletions
|
@ -167,6 +167,10 @@ detect_mac80211() {
|
||||||
|
|
||||||
path="$(iwinfo nl80211 path "$dev")"
|
path="$(iwinfo nl80211 path "$dev")"
|
||||||
macaddr="$(cat /sys/class/ieee80211/${dev}/macaddress)"
|
macaddr="$(cat /sys/class/ieee80211/${dev}/macaddress)"
|
||||||
|
|
||||||
|
# work around phy rename related race condition
|
||||||
|
[ -n "$path" -o -n "$macaddr" ] || continue
|
||||||
|
|
||||||
board_dev=
|
board_dev=
|
||||||
fallback_board_dev=
|
fallback_board_dev=
|
||||||
json_for_each_item check_board_phy wlan
|
json_for_each_item check_board_phy wlan
|
||||||
|
|
Loading…
Reference in a new issue