From: Ivo van Doorn <ivdoorn@gmail.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, rt2400-devel@lists.sourceforge.net
Subject: [PATCH 09/11] Fix hw mode registration with mac80211.
Date: Sun, 17 Feb 2008 17:35:55 +0100 [thread overview]
Message-ID: <200802171735.56101.IvDoorn@gmail.com> (raw)
In-Reply-To: <200802171730.44353.IvDoorn@gmail.com>
From: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
The supported_bands field of struct hw_mode_spec now represents a bitfield,
so bitfield operators need to be tested with when setting the band data.
The current code generates the following warning:
[176624.986244] WARNING: at /usr/local/src/incoming/compat-wireless-2.6/net/wireless/core.c:269 wiphy_register()
[176624.986249] Pid: 12548, comm: modprobe Tainted: P 2.6.24.2#4
[176624.986251]
[176624.986251] Call Trace:
[176624.986277] [<ffffffff881c56bf>] :cfg80211:wiphy_register+0x17f/0x1a0
[176624.986282] [<ffffffff881ddf80>] :rt61pci:rt61pci_eepromregister_write+0x0/0x80
[176624.986302] [<ffffffff88b7e4bc>] :mac80211:ieee80211_register_hw+0x2c/0x2b0
[176624.986310] [<ffffffff881cdc80>] :rt2x00lib:rt2x00lib_probe_dev+0x350/0x3f0
[176624.986318] [<ffffffff881d74b9>] :rt2x00pci:rt2x00pci_probe+0x149/0x200
[176624.986325] [<ffffffff8030c858>] pci_device_probe+0xf8/0x170
[176624.986331] [<ffffffff803594fc>] driver_probe_device+0x9c/0x1c0
[176624.986335] [<ffffffff80359700>] __driver_attach+0x0/0xb0
[176624.986337] [<ffffffff803597a5>] __driver_attach+0xa5/0xb0
[176624.986341] [<ffffffff8035877d>] bus_for_each_dev+0x4d/0x80
[176624.986347] [<ffffffff80358b8c>] bus_add_driver+0xac/0x210
[176624.986351] [<ffffffff8030cad3>] __pci_register_driver+0x73/0xc0
[176624.986357] [<ffffffff8025689e>] sys_init_module+0x18e/0x1a20
[176624.986374] [<ffffffff8020c42e>] system_call+0x7e/0x83
Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2x00dev.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 6103175..015738a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -916,7 +916,7 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev,
* Rates: CCK, OFDM.
* Channels: 2.4 GHz
*/
- if (spec->supported_bands > SUPPORT_BAND_2GHZ) {
+ if (spec->supported_bands & SUPPORT_BAND_2GHZ) {
rt2x00dev->bands[IEEE80211_BAND_2GHZ].n_channels = 14;
rt2x00dev->bands[IEEE80211_BAND_2GHZ].n_bitrates = num_rates;
rt2x00dev->bands[IEEE80211_BAND_2GHZ].channels = channels;
@@ -930,7 +930,7 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev,
* Rates: OFDM.
* Channels: OFDM, UNII, HiperLAN2.
*/
- if (spec->supported_bands > SUPPORT_BAND_5GHZ) {
+ if (spec->supported_bands & SUPPORT_BAND_5GHZ) {
rt2x00dev->bands[IEEE80211_BAND_5GHZ].n_channels =
spec->num_channels - 14;
rt2x00dev->bands[IEEE80211_BAND_5GHZ].n_bitrates =
--
1.5.4
next prev parent reply other threads:[~2008-02-17 16:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-17 16:30 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
2008-02-17 16:31 ` [PATCH 01/11] rt2x00: Send frames out with configured TX power Ivo van Doorn
2008-02-17 16:32 ` [PATCH 02/11] rt2x00: Don't report driver generated frames to tx_status() Ivo van Doorn
2008-02-17 16:33 ` [PATCH 04/11] rt2x00: Filter ACK_CTS based on FIF_CONTROL Ivo van Doorn
2008-02-17 16:33 ` [PATCH 03/11] rt2x00: Fix Descriptor DMA initialization Ivo van Doorn
2008-02-17 16:33 ` [PATCH 05/11] rt2x00: Remove reset_tsf() Ivo van Doorn
2008-02-17 16:34 ` [PATCH 06/11] rt2x00: Rename dscape -> mac80211 Ivo van Doorn
2008-02-17 16:35 ` [PATCH 07/11] rt2x00: Cleanup mode registration Ivo van Doorn
2008-02-17 16:35 ` [PATCH 08/11] rt2x00: Remove async vendor request calls from rt2x00usb Ivo van Doorn
2008-02-17 16:35 ` Ivo van Doorn [this message]
2008-02-17 16:36 ` [PATCH 10/11] rt2x00: Fix MAC address defines in rt61pci Ivo van Doorn
2008-02-17 16:36 ` [PATCH 11/11] rt2x00: Release rt2x00 2.1.2 Ivo van Doorn
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=200802171735.56101.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=rt2400-devel@lists.sourceforge.net \
/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.