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

Felix Fietkau nbd at nbd.name
Thu Jun 30 15:14:22 PDT 2016


On 2016-06-30 16:18, Eduardo Abinader wrote:
> Ensure wireless device struct is removed, when it fails to be set up,
> due to a invalid configuration, hence enabling the wireless dev
> to be set up again, when a new valid configuration is set.
> 
> Signed-off-by: Eduardo Abinader <eduardo.abinader at riverbed.com>
> ---
>  wireless.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/wireless.c b/wireless.c
> index 34dd328..bc31d4a 100644
> --- a/wireless.c
> +++ b/wireless.c
> @@ -336,6 +336,10 @@ wireless_device_mark_down(struct wireless_device *wdev)
>  
>  	wireless_process_kill_all(wdev, SIGTERM, true);
>  
> +	if (wdev->state == IFS_SETUP && !wdev->autostart) {
> +		wdev->config_state = IFC_REMOVE;
> +	}
This doesn't make sense to me. Could you please provide a test case that
reproduces the problem you're trying to fix?

- Felix




More information about the Lede-dev mailing list