linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Bruno Randolf <br1@einfach.org>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH RFC] mac80211: Extend channel to frequency mapping for 802.11j
Date: Mon, 27 Dec 2010 11:57:39 +0100	[thread overview]
Message-ID: <1293447459.3544.1.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <20101224074410.16337.90008.stgit@localhost6.localdomain6>

On Fri, 2010-12-24 at 16:44 +0900, Bruno Randolf wrote:

>  static bool freq_is_chan_12_13_14(u16 freq)
>  {
> -	if (freq == ieee80211_channel_to_frequency(12) ||
> -	    freq == ieee80211_channel_to_frequency(13) ||
> -	    freq == ieee80211_channel_to_frequency(14))
> +	if (freq == ieee80211_channel_to_frequency(12, IEEE80211_BAND_2GHZ) ||
> +	    freq == ieee80211_channel_to_frequency(13, IEEE80211_BAND_2GHZ) ||
> +	    freq == ieee80211_channel_to_frequency(14, IEEE80211_BAND_2GHZ))
>  		return true;

This seems strange ... why not just hardcode the values??

>  	if (freq->e == 0) {
> +		int band = IEEE80211_BAND_2GHZ;

enum?

johannes


  parent reply	other threads:[~2010-12-27 10:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-24  7:44 [PATCH RFC] mac80211: Extend channel to frequency mapping for 802.11j Bruno Randolf
2010-12-24 16:46 ` Dave Kilroy
2010-12-28  9:43   ` Bruno Randolf
2010-12-28  9:51     ` Johannes Berg
2010-12-28  9:53       ` Johannes Berg
2010-12-29 13:55         ` Dave Kilroy
2010-12-27 10:57 ` Johannes Berg [this message]
2010-12-28  5:31   ` Bruno Randolf
2010-12-28  8:38     ` Johannes Berg
2010-12-28  9:01       ` Jouni Malinen
2010-12-28  9:08         ` Johannes Berg
2010-12-28  9:25           ` Jouni Malinen
2010-12-28  9:39             ` Bruno Randolf

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=1293447459.3544.1.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=br1@einfach.org \
    --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;
as well as URLs for NNTP newsgroup(s).