Changeset 17825


Ignore:
Timestamp:
2009-10-02T21:41:04+02:00 (7 years ago)
Author:
nbd
Message:

mac80211: autodetect the default phy mode based on 11n and freq capabilities

File:
1 edited

Legend:

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

    r17824 r17825  
    273273                        devidx=$(($devidx + 1)) 
    274274                done 
     275                mode_11n="" 
     276                mode_band="g" 
     277                iw phy "$dev" info | grep -q 'HT cap' && mode_11n="n" 
     278                iw phy "$dev" info | grep -q '2412 MHz' || mode_band="a" 
    275279 
    276280                cat <<EOF 
     
    279283        option channel  5 
    280284        option macaddr  $(cat /sys/class/ieee80211/${dev}/macaddress) 
     285        option hwmode   11${mode_11n}${mode_band} 
    281286        # REMOVE THIS LINE TO ENABLE WIFI: 
    282287        option disabled 1 
Note: See TracChangeset for help on using the changeset viewer.