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

Eduardo Abinader eduardo.abinader at riverbed.com
Fri Jul 1 05:50:37 EDT 2016


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.

Eduardo

On 01.07.2016 00:14, Felix Fietkau wrote:
> 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
> 
_______________________________________________
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