aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2007-03-11 15:54:11 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-04-10 11:03:29 -0400
commitae6ead4623bfbc57f3945ff86f27e51811e2e91b (patch)
treea2ac8bbe117f91bad25dfc48c4e4824fcf672c75 /drivers/net
parenta21bd69e1509b43823c317c3bf3f7ffa99884356 (diff)
[PATCH] zd1211rw: Reject AL2230S devices
zd1211rw currently detects AL2230S-based devices as AL2230, and hence programs the RF incorrectly. Transmit silently fails on this misconfiguration. After this patch, AL2230S devices are rejected with an error message, to avoid any confusion with an apparent driver bug. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_chip.c1
-rw-r--r--drivers/net/wireless/zd1211rw/zd_chip.h2
-rw-r--r--drivers/net/wireless/zd1211rw/zd_rf_al2230.c6
3 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
index 9c64f894b71b..9d299bd18850 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -337,6 +337,7 @@ static int read_pod(struct zd_chip *chip, u8 *rf_type)
337 chip->patch_cr157 = (value >> 13) & 0x1; 337 chip->patch_cr157 = (value >> 13) & 0x1;
338 chip->patch_6m_band_edge = (value >> 21) & 0x1; 338 chip->patch_6m_band_edge = (value >> 21) & 0x1;
339 chip->new_phy_layout = (value >> 31) & 0x1; 339 chip->new_phy_layout = (value >> 31) & 0x1;
340 chip->al2230s_bit = (value >> 7) & 0x1;
340 chip->link_led = ((value >> 4) & 1) ? LED1 : LED2; 341 chip->link_led = ((value >> 4) & 1) ? LED1 : LED2;
341 chip->supports_tx_led = 1; 342 chip->supports_tx_led = 1;
342 if (value & (1 << 24)) { /* LED scenario */ 343 if (value & (1 << 24)) { /* LED scenario */
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.h b/drivers/net/wireless/zd1211rw/zd_chip.h
index b07569e391ee..ae39c225bc9e 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.h
+++ b/drivers/net/wireless/zd1211rw/zd_chip.h
@@ -711,7 +711,7 @@ struct zd_chip {
711 u16 link_led; 711 u16 link_led;
712 unsigned int pa_type:4, 712 unsigned int pa_type:4,
713 patch_cck_gain:1, patch_cr157:1, patch_6m_band_edge:1, 713 patch_cck_gain:1, patch_cr157:1, patch_6m_band_edge:1,
714 new_phy_layout:1, 714 new_phy_layout:1, al2230s_bit:1,
715 is_zd1211b:1, supports_tx_led:1; 715 is_zd1211b:1, supports_tx_led:1;
716}; 716};
717 717
diff --git a/drivers/net/wireless/zd1211rw/zd_rf_al2230.c b/drivers/net/wireless/zd1211rw/zd_rf_al2230.c
index 25323a13a3db..5235a7827ac5 100644
--- a/drivers/net/wireless/zd1211rw/zd_rf_al2230.c
+++ b/drivers/net/wireless/zd1211rw/zd_rf_al2230.c
@@ -358,6 +358,12 @@ int zd_rf_init_al2230(struct zd_rf *rf)
358{ 358{
359 struct zd_chip *chip = zd_rf_to_chip(rf); 359 struct zd_chip *chip = zd_rf_to_chip(rf);
360 360
361 if (chip->al2230s_bit) {
362 dev_err(zd_chip_dev(chip), "AL2230S devices are not yet "
363 "supported by this driver.\n");
364 return -ENODEV;
365 }
366
361 rf->switch_radio_off = al2230_switch_radio_off; 367 rf->switch_radio_off = al2230_switch_radio_off;
362 if (chip->is_zd1211b) { 368 if (chip->is_zd1211b) {
363 rf->init_hw = zd1211b_al2230_init_hw; 369 rf->init_hw = zd1211b_al2230_init_hw;