[LEDE-DEV] [PATCH] mac80211: Fix race condition leading to wifi interfaces not coming up at boot sometimes.

Bastian Bittorf bb at npl.de
Tue Mar 14 00:08:30 PDT 2017


* Vittorio Gambaletta (VittGam) <openwrt at vittgam.net> [14.03.2017 07:55]:
> +mac80211_iw_interface_add() {
> +	local phy="$1"
> +	local ifname="$2"
> +	local type="$3"
> +	local wdsflag="$4"

please add a 'local ret' here, or better use the common 'local rc=0'
and later always "return $rc"

> +
> +	iw phy "$phy" interface add "$ifname" type "$type" $wdsflag
> +	ret="$?"
> +
> +	[ "$ret" = 233 ] && {
> +		# Device might have just been deleted, give the kernel some time to finish cleaning it up
> +		sleep 1
> +
> +		iw phy "$phy" interface add "$ifname" type "$type" $wdsflag
> +		ret="$?"
> +	}
> +
> +	[ "$ret" != 0 ] && {
> +		wireless_setup_failed INTERFACE_CREATION_FAILED
> +		return 1
> +	}
> +
> +	return 0
> +}

thank you for debugging this! bye, bastian



More information about the Lede-dev mailing list