From: Gertjan van Wingerde <gwingerde@gmail.com>
To: Ivo Van Doorn <ivdoorn@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
Helmut Schaa <helmut.schaa@googlemail.com>,
linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
Subject: Re: [PATCH 7/7] rt2x00: Fix HT40 operation in rt2800.
Date: Wed, 19 May 2010 21:08:50 +0200 [thread overview]
Message-ID: <4BF43742.8080204@gmail.com> (raw)
In-Reply-To: <AANLkTikIaVSC6ZXjRUKD7J1rbGdf-JWCO7H4TGU5KZnx@mail.gmail.com>
On 05/19/10 20:14, Ivo Van Doorn wrote:
>> +u16 rt2x00ht_center_channel(struct rt2x00_dev *rt2x00dev,
>> + struct ieee80211_conf *conf)
>> +{
>> + struct hw_mode_spec *spec = &rt2x00dev->spec;
>> + int center_channel;
>> + u16 i;
>> +
>> + /*
>> + * Initialize center channel to current channel.
>> + */
>> + center_channel = spec->channels[conf->channel->hw_value].channel;
>> +
>> + /*
>> + * Adjust center channel to HT40+ and HT40- operation.
>> + */
>> + if (conf_is_ht40_plus(conf))
>> + center_channel += 2;
>> + else if (conf_is_ht40_minus(conf))
>> + center_channel -= (center_channel == 14) ? 1 : 2;
>> +
>> + for (i = 0; i < spec->num_channels; i++)
>> + if (spec->channels[i].channel == center_channel)
>> + return i;
>> +
>> + BUG();
>> +}
>
> This isn't worth a BUG(), perhaps a debug message or WARN(),
> I would say a debug message and retuning the hw_value.
>
Oops, yes. BUG() is a bit too much here. This is simply left-over from testing.
Personally I think WARN() should be more appropriate, as it signifies an error situation
that really should not happen, and we want to atract a bit more attention to it than a
simple debug message.
v2 is on its way.
---
Gertjan.
prev parent reply other threads:[~2010-05-19 19:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 15:26 [PATCH 0/7] rt2x00: Further cleanups and fixes Gertjan van Wingerde
2010-05-19 15:26 ` [PATCH 1/7] rt2x00: Remove RT2870 chipset identification Gertjan van Wingerde
2010-05-19 18:09 ` Ivo Van Doorn
2010-05-19 15:26 ` [PATCH 2/7] rt2x00: Move all register definitions for rt2800 to rt2800.h Gertjan van Wingerde
2010-05-19 18:10 ` Ivo Van Doorn
2010-05-19 15:26 ` [PATCH 3/7] rt2x00: Introduce separate interface type for PCI-express Gertjan van Wingerde
2010-05-19 18:10 ` Ivo Van Doorn
2010-05-19 15:26 ` [PATCH 4/7] rt2x00: Simplify check for external LNA in rt2800_init_rfcsr Gertjan van Wingerde
2010-05-19 18:11 ` Ivo Van Doorn
2010-05-19 15:26 ` [PATCH 5/7] rt2x00: Move PCI/USB specific register initializations to rt2800{pci,usb} Gertjan van Wingerde
2010-05-19 18:12 ` Ivo Van Doorn
2010-05-19 18:26 ` Ivo van Doorn
2010-05-19 18:33 ` Gertjan van Wingerde
2010-05-19 15:26 ` [PATCH 6/7] rt2x00: Sync rt2800 MCU boot signal with Ralink driver Gertjan van Wingerde
2010-05-19 18:12 ` Ivo Van Doorn
2010-05-19 15:26 ` [PATCH 7/7] rt2x00: Fix HT40 operation in rt2800 Gertjan van Wingerde
2010-05-19 15:51 ` Helmut Schaa
2010-05-19 18:14 ` Ivo Van Doorn
2010-05-19 19:08 ` Gertjan van Wingerde [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=4BF43742.8080204@gmail.com \
--to=gwingerde@gmail.com \
--cc=helmut.schaa@googlemail.com \
--cc=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=users@rt2x00.serialmonkey.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.