From: Johannes Berg <johannes@sipsolutions.net>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: John W Linville <linville@tuxdriver.com>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211: allow scanning on specified frequencies when using wext-compatibility
Date: Sat, 12 Sep 2009 08:56:46 -0600 [thread overview]
Message-ID: <1252767406.23427.25.camel@johannes.local> (raw)
In-Reply-To: <200909110952.14644.hs4233@mail.mn-solutions.de>
[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]
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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
prev parent reply other threads:[~2009-09-12 14:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-09 11:09 [PATCH] cfg80211: allow scanning on specified frequencies when using wext-compatibility Holger Schurig
2009-09-11 0:41 ` Johannes Berg
2009-09-11 7:35 ` Holger Schurig
2009-09-11 7:52 ` Holger Schurig
2009-09-12 14:56 ` Johannes Berg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1252767406.23427.25.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=hs4233@mail.mn-solutions.de \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox