From: Johannes Berg <johannes@sipsolutions.net>
To: Mahesh Palivela <maheshp@posedge.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC v2 4/8] nl80211/cfg80211: support VHT channel configuration
Date: Tue, 20 Nov 2012 10:39:58 +0100 [thread overview]
Message-ID: <1353404398.9399.9.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1353400890.9399.3.camel@jlt4.sipsolutions.net> (sfid-20121120_094103_819884_8535CF9F)
On Tue, 2012-11-20 at 09:41 +0100, Johannes Berg wrote:
> On Tue, 2012-11-20 at 13:57 +0530, Mahesh Palivela wrote:
>
> > > + for (freq = center_freq - bw/2 + 10;
> > > + freq <= center_freq + bw/2 - 10;
> > > + freq += 20) {
> > > + c = ieee80211_get_channel(wiphy, freq);
> > > + if (!c || c->flags & (IEEE80211_CHAN_DISABLED |
> > > + IEEE80211_CHAN_PASSIVE_SCAN |
> > > + IEEE80211_CHAN_NO_IBSS |
> > > + IEEE80211_CHAN_RADAR))
> > > + return false;
>
>
> > > + for (freq = center_freq - bw/2 + 10;
> > > + freq <= center_freq + bw/2 - 10;
> > > + freq += 20) {
> > > + c = ieee80211_get_channel(&rdev->wiphy, freq);
> > > + if (!c || c->flags & IEEE80211_CHAN_DISABLED)
> > > + return -EINVAL;
>
>
> > For loops in both functions seems to be similar. One return false, other
> > return -EINVAL. Can we remove duplication?
>
> True, but they check different flags. I suppose we could have a common
> function where the checked flags are passed in, I can try that.
I'll add this to the patch:
http://p.sipsolutions.net/24eb25fb98ef2d0b.txt
next prev parent reply other threads:[~2012-11-20 9:39 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-09 20:17 VHT support, take 2 Johannes Berg
2012-11-09 20:17 ` [RFC v2 1/8] cfg80211: remove remain-on-channel channel type Johannes Berg
2012-11-09 20:17 ` [RFC v2 2/8] nl80211: add documentation for " Johannes Berg
2012-11-15 11:00 ` Mahesh Palivela
2012-11-15 12:09 ` Johannes Berg
2012-11-09 20:17 ` [RFC v2 3/8] cfg80211: pass a channel definition struct Johannes Berg
2012-11-09 20:17 ` [RFC v2 4/8] nl80211/cfg80211: support VHT channel configuration Johannes Berg
2012-11-12 10:55 ` Johannes Berg
2012-11-16 12:21 ` Mahesh Palivela
2012-11-16 12:37 ` Johannes Berg
2012-11-19 4:18 ` Mahesh Palivela
2012-11-19 8:33 ` Johannes Berg
2012-11-19 12:18 ` Mahesh Palivela
2012-11-19 14:11 ` Johannes Berg
2012-11-20 6:03 ` Mahesh Palivela
2012-11-20 7:27 ` Johannes Berg
2012-11-20 8:27 ` Mahesh Palivela
2012-11-20 8:41 ` Johannes Berg
2012-11-20 9:39 ` Johannes Berg [this message]
2012-11-20 11:59 ` Mahesh Palivela
2012-11-20 12:21 ` Johannes Berg
2012-11-20 12:56 ` Mahesh Palivela
2012-11-09 20:17 ` [RFC v2 5/8] mac80211: convert to channel definition struct Johannes Berg
2012-11-09 20:17 ` [RFC v2 6/8] nl80211/cfg80211: add VHT MCS support Johannes Berg
2012-11-09 20:17 ` [RFC v2 7/8] mac80211: support drivers reporting VHT RX Johannes Berg
2012-11-09 20:17 ` [RFC v2 8/8] mac80211: support VHT rates in TX info Johannes Berg
2012-11-09 20:21 ` VHT support, take 2 Johannes Berg
2012-11-15 12:09 ` Mahesh Palivela
2012-11-16 13:28 ` Johannes Berg
2012-11-16 14:57 ` Arend van Spriel
2012-11-17 0:10 ` Luis R. Rodriguez
2012-11-17 8:48 ` Johannes Berg
2012-11-17 23:34 ` Luis R. Rodriguez
2012-11-18 11:03 ` Johannes Berg
2012-11-18 11:05 ` 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=1353404398.9399.9.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=maheshp@posedge.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.