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: Fri, 11 Sep 2009 02:41:04 +0200 [thread overview]
Message-ID: <1252629664.23427.4.camel@johannes.local> (raw)
In-Reply-To: <200909091309.55068.hs4233@mail.mn-solutions.de>
[-- Attachment #1: Type: text/plain, Size: 900 bytes --]
On Wed, 2009-09-09 at 13:09 +0200, Holger Schurig wrote:
> Handles the case when SIOCSIWSCAN specified iw_scan_req.num_channels and
> iw_scan_req.channels[].
> +
> + /* If we have a wireless request structure and the
> + * wireless request specifies frequencies, then search
> + * for the matching hardware channel.
> + */
> + if (wreq && wreq->num_channels) {
> + int k;
> + int wiphy_freq = wiphy->bands[band]->channels[j].center_freq;
> + for (k = 0; k < wreq->num_channels; k++) {
> + int wext_freq = wreq->channel_list[k].m / 100000;
> + if (wext_freq == wiphy_freq)
> + goto wext_freq_found;
> + }
> + goto wext_freq_not_found;
This is a bit weird -- this way you don't report errors if the user
specified frequencies that don't exist. Also, are you sure that it has
to be a frequency as opposed to a channel number?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2009-09-11 0:50 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 [this message]
2009-09-11 7:35 ` Holger Schurig
2009-09-11 7:52 ` Holger Schurig
2009-09-12 14:56 ` Johannes Berg
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=1252629664.23427.4.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