Search Linux Wireless

Re: [PATCH] cfg80211: allow scanning on specified frequencies when using wext-compatibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2009-09-11 at 09:52 +0200, Holger Schurig wrote:

> Now, if I want to report an -EINVAL for every possibly invalid 
> scan-request channel, I'd have to do this:
> 
> 
> If scan-request has freqs:
>    Loop over all scan-request freqs
>       Loop over all bands
>          Loop over all channels
>             search for freq
>    if found:
>        Stick channel to scan request
>    else:
>        err = -EINVAL
> else:
>    Loop over all bands
>       Loop over all channels
>          Stick channel to scan request
> 
> This is considerable code-bloat for such a seldom-used function.

Doesn't seem that bad considering that the inner loop is already in an
existing function.

> I'd rather do it like this:
> 
> 
> Loop over all bands
>    Loop over all channels
>       If scan-request hasn't this channel freq: continue
>       Stick channel to scan request
> if no channels:
>    err = -EINVAL
> 
> That's a compromise :-)

I guess. I'd still prefer the other way, but it's wext, so I don't
really care :)

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux