diff options
author | Daniel Drake <dsd@gentoo.org> | 2006-11-21 19:05:30 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-02 00:12:05 -0500 |
commit | 84bc715c465f76584fc5127955fca0c61592e04b (patch) | |
tree | 85205c39f49e3e62c72f3d2d98a1d87e56ad5095 /drivers/net/wireless/zd1211rw/zd_mac.c | |
parent | 571d6eee9b5bce28fcbeb7588890ad5ca3f8c718 (diff) |
[PATCH] zd1211rw: Remove IW_FREQ_AUTO support
http://bugzilla.kernel.org/show_bug.cgi?id=7399
zd1211rw's support for IW_FREQ_AUTO is broken: when specified, the driver
tries to change to a channel specified in an uninitialized integer. As
IW_FREQ_AUTO is hard to implement properly, the solution (at least for now)
is to drop support for it and start ignoring the flags like all other wireless
drivers do.
This has the added advantage that kismet also starts working with zd1211rw,
even though kismet requesting IW_FREQ_AUTO is also a bug (fixed in their svn)
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_mac.c')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index e5fedf968c19..7845b6dac832 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -317,21 +317,12 @@ int zd_mac_request_channel(struct zd_mac *mac, u8 channel) | |||
317 | return 0; | 317 | return 0; |
318 | } | 318 | } |
319 | 319 | ||
320 | int zd_mac_get_channel(struct zd_mac *mac, u8 *channel, u8 *flags) | 320 | u8 zd_mac_get_channel(struct zd_mac *mac) |
321 | { | 321 | { |
322 | struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); | 322 | u8 channel = zd_chip_get_channel(&mac->chip); |
323 | 323 | ||
324 | *channel = zd_chip_get_channel(&mac->chip); | 324 | dev_dbg_f(zd_mac_dev(mac), "channel %u\n", channel); |
325 | if (ieee->iw_mode != IW_MODE_INFRA) { | 325 | return channel; |
326 | spin_lock_irq(&mac->lock); | ||
327 | *flags = *channel == mac->requested_channel ? | ||
328 | MAC_FIXED_CHANNEL : 0; | ||
329 | spin_unlock(&mac->lock); | ||
330 | } else { | ||
331 | *flags = 0; | ||
332 | } | ||
333 | dev_dbg_f(zd_mac_dev(mac), "channel %u flags %u\n", *channel, *flags); | ||
334 | return 0; | ||
335 | } | 326 | } |
336 | 327 | ||
337 | /* If wrong rate is given, we are falling back to the slowest rate: 1MBit/s */ | 328 | /* If wrong rate is given, we are falling back to the slowest rate: 1MBit/s */ |