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

Eduardo Abinader Eduardo.Abinader at riverbed.com
Sun Jul 3 23:52:12 PDT 2016


Thanks for the feedback, Felix.

I will submit another patch(es) with the changes you commented. Ok?


Eduardo 
________________________________________
From: Felix Fietkau [nbd at nbd.name]
Sent: Saturday, July 02, 2016 10:25 AM
To: Eduardo Abinader; openwrt-devel at lists.openwrt.org; lede-dev at lists.infradead.org
Subject: Re: [LEDE-DEV] [PATCH] netifd: remove wireless device when device fails to setup

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



More information about the Lede-dev mailing list