Changeset 22078


Ignore:
Timestamp:
2010-07-06T20:53:48+02:00 (8 years ago)
Author:
nbd
Message:

mac80211: fix interface teardown for kernels >= 2.6.33

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/mac80211/files/lib/wifi/mac80211.sh

    r21321 r22078  
    166166} 
    167167 
     168list_phy_interfaces() { 
     169        local phy="$1" 
     170        if [ -d "/sys/class/ieee80211/${phy}/device/net" ]; then 
     171                ls "/sys/class/ieee80211/${phy}/device/net" 2>/dev/null; 
     172        else 
     173                ls "/sys/class/ieee80211/${phy}/device" 2>/dev/null | grep net: | sed -e 's,net:,,g' 
     174        fi 
     175} 
    168176 
    169177disable_mac80211() ( 
     
    182190 
    183191        include /lib/network 
    184         for wdev in $(ls /sys/class/ieee80211/${phy}/device/net 2>/dev/null); do 
     192        for wdev in $(list_phy_interfaces "$phy"); do 
    185193                [ -f "/var/run/$wdev.pid" ] && kill $(cat /var/run/$wdev.pid) >&/dev/null 2>&1 
    186194                for pid in `pidof wpa_supplicant`; do 
Note: See TracChangeset for help on using the changeset viewer.