Changeset 162 for trunk

Show
Ignore:
Timestamp:
06/30/08 14:01:44 (6 months ago)
Author:
dragorn
Message:

Allow channels in MHz

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/iwcontrol.c

    r115 r162  
    705705        wrq.u.freq.flags = IW_FREQ_FIXED; 
    706706#endif 
    707         iwfloat2freq(in_ch, &wrq.u.freq); 
     707        /* Treat channels > 1024 as frequencies in mhz not channels and  
     708         * multiply by the mhz constant accordingly */ 
     709        if (in_ch > 1024)  
     710                iwfloat2freq(in_ch * 1e6, &wrq.u.freq); 
     711        else 
     712                iwfloat2freq(in_ch, &wrq.u.freq); 
    708713 
    709714        /* Try twice with a tiny delay, some cards (madwifi) need a second