From: Mahesh Palivela <maheshp@posedge.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [RFC v2 4/8] nl80211/cfg80211: support VHT channel configuration
Date: Tue, 20 Nov 2012 17:29:53 +0530 [thread overview]
Message-ID: <50AB70B9.1010505@posedge.com> (raw)
In-Reply-To: <1353404398.9399.9.camel@jlt4.sipsolutions.net>
On 11/20/2012 03:09 PM, Johannes Berg wrote:
> 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
>
Looks good to me Johannes. Overall your VHT channel config
implementation done so well.
Partial regulatory check in nl80211_parse_chandef() has to be modified
to include BW check. I see your TODO comment there.
Thanks,
Mahesh
next prev parent reply other threads:[~2012-11-20 11:59 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
2012-11-20 11:59 ` Mahesh Palivela [this message]
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=50AB70B9.1010505@posedge.com \
--to=maheshp@posedge.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).