linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benoit Papillault <benoit.papillault@free.fr>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211: Check for channel HT capabilities in an IBSS
Date: Wed, 05 May 2010 08:28:44 +0200	[thread overview]
Message-ID: <4BE1101C.4010708@free.fr> (raw)
In-Reply-To: <o2h43e72e891005041114sb04fbfcbl7e1f144826a02479@mail.gmail.com>

Le 04/05/2010 20:14, Luis R. Rodriguez a écrit :
> On Mon, May 3, 2010 at 11:47 PM, Benoit Papillault
> <benoit.papillault@free.fr>  wrote:
>> When configuring an HT IBSS, we need to check if the specified channel
>> is capable of ht40+, ht40- or ht20.
>>
>> Signed-off-by: Benoit Papillault<benoit.papillault@free.fr>
>> ---
>>   net/wireless/nl80211.c |    8 ++++----
>>   1 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
>> index 8da9823..0a82623 100644
>> --- a/net/wireless/nl80211.c
>> +++ b/net/wireless/nl80211.c
>> @@ -3858,11 +3858,11 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info)
>>                 ibss.ie_len = nla_len(info->attrs[NL80211_ATTR_IE]);
>>         }
>>
>> -       ibss.channel = ieee80211_get_channel(wiphy,
>> -               nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]));
>> +       ibss.channel = rdev_freq_to_chan(rdev,
>> +               nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]),
>> +               channel_type);
>>         if (!ibss.channel ||
>> -           ibss.channel->flags&  IEEE80211_CHAN_NO_IBSS ||
>> -           ibss.channel->flags&  IEEE80211_CHAN_DISABLED) {
>> +           ibss.channel->flags&  IEEE80211_CHAN_NO_IBSS) {
>>                 err = -EINVAL;
>
> Why is the disabled channel check being removed here?
>
>    Luis
>

Hi Luis,

It's because the check is already done in rdev_freq_to_chan.

Regards,
Benoit

      reply	other threads:[~2010-05-05  6:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-04  6:47 [PATCH] cfg80211: Parse channel_type in NL80211_CMD_JOIN_IBSS Benoit Papillault
2010-05-04  6:47 ` [PATCH] cfg80211: Check for channel HT capabilities in an IBSS Benoit Papillault
2010-05-04  6:47   ` [PATCH] mac80211: Add HT IE to IBSS beacons and probe responses Benoit Papillault
2010-05-04  8:26     ` Johannes Berg
2010-05-05  6:37       ` Benoit Papillault
2010-05-05 11:46     ` Johannes Berg
2010-05-05 21:37       ` Benoit Papillault
2010-05-04  8:23   ` [PATCH] cfg80211: Check for channel HT capabilities in an IBSS Johannes Berg
2010-05-05  6:29     ` Benoit Papillault
2010-05-04 18:14   ` Luis R. Rodriguez
2010-05-05  6:28     ` Benoit Papillault [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=4BE1101C.4010708@free.fr \
    --to=benoit.papillault@free.fr \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@gmail.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;
as well as URLs for NNTP newsgroup(s).