[OpenWrt-Devel] [LEDE-DEV] [PATCH] netifd: remove wireless device when device fails to setup

Felix Fietkau nbd at nbd.name
Sat Jul 2 04:25:36 EDT 2016


On 2016-07-01 11:50, Eduardo Abinader wrote:
> Hi Felix,
> 
> 1) Just set a non-allowed DFS channel for DE, for instance.
> 2) Enable wireless; it fails
> 3) Change to a valid channel; the wdev is not set up.  
> 
> There is also a leftover on /etc/init.d/network reload. 
> I think it should call /sbin/wifi instead of /sbin/wifi reload.
No, it should not. /sbin/wifi restarts wireless unconditionally, whereas
wifi reload only restarts if the configuration changed.

I understand the issue now, but in my opinion this fix is not correct.
It eliminates the state of the wireless device entirely, thus not giving
the user the chance to see that netifd failed to bring it up.

I think the main issue is the handling of the autostart flag and its
multiple uses. It gets used to prevent auto-restart after error, but it
is also used to indicate that the user wanted to shut down the wireless
interface. I think for the error case we need to leave autostart alone
and use a separate flag (which gets cleared if the configuration gets
updated).

That way the state would be preserved and a restart would be triggered
on actual config changes.

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list