On 2014-10-09 11:25, Bastian Bittorf wrote:
> * Michel Stam <[email protected]> [09.10.2014 11:16]:
>> Signed-off-by: Michel Stam <[email protected]>
>> ---
>>  package/kernel/mac80211/files/lib/wifi/mac80211.sh | 15 +++++++++++----
>>  1 file changed, 11 insertions(+), 4 deletions(-)
>> 
>> diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh 
>> b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
>> index a3b2199..0b662eb 100644
>> --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
>> +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
>> @@ -65,7 +67,12 @@ detect_mac80211() {
>>              [ -n "$type" ] || break
>>              devidx=$(($devidx + 1))
>>      done
>> -    for dev in $(ls /sys/class/ieee80211); do
>> +
>> +    for _dev in /sys/class/ieee80211/*; do
>> +            [ -e "$_dev" ] || continue
>> +
>> +            dev="${_dev##*/}"
>> +
>>              found=0
>>              config_foreach check_mac80211_device wifi-device
>>              [ "$found" -gt 0 ] && continue
> 
> while you are at it:
> please rename 'dev' to 'phy' because this is what you are searching for.
Bad idea. That would make it conflict with the other code that was
touched in this patch.

> also make the var 'local'.
Who cares? This is legacy code used only by '/sbin/wifi detect'
At some point this will be replaced anyway...

- Felix
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to