diff options
author | Daniel Drake <dsd@gentoo.org> | 2007-04-03 18:17:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-04-10 14:35:56 -0400 |
commit | 92b3e2e9253a9f4c9224071842fd263c334dece0 (patch) | |
tree | 460e99558feb77f65ef285774480f4fbdd75e09b /drivers/net/wireless/zd1211rw/zd_chip.c | |
parent | ae6ead4623bfbc57f3945ff86f27e51811e2e91b (diff) |
[PATCH] zd1211rw: Fix E2P_PHY_REG patching
Due to conflicting/confusing defines in the vendor driver, we were
reading E2P_PHY_REG from the wrong location.
CR157 patching was slightly incorrect in that the vendor driver only
patches in an 8-bit value, whereas we were patching 24 bits.
Additionally, CR157 patching was happening on both zd1211 and zd1211b,
but this should only happen on zd1211.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_chip.c')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_chip.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c index 9d299bd1885..87ee3ee020f 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zd1211rw/zd_chip.c | |||
@@ -592,16 +592,16 @@ int zd_chip_unlock_phy_regs(struct zd_chip *chip) | |||
592 | return r; | 592 | return r; |
593 | } | 593 | } |
594 | 594 | ||
595 | /* CR157 can be optionally patched by the EEPROM */ | 595 | /* CR157 can be optionally patched by the EEPROM for original ZD1211 */ |
596 | static int patch_cr157(struct zd_chip *chip) | 596 | static int patch_cr157(struct zd_chip *chip) |
597 | { | 597 | { |
598 | int r; | 598 | int r; |
599 | u32 value; | 599 | u16 value; |
600 | 600 | ||
601 | if (!chip->patch_cr157) | 601 | if (!chip->patch_cr157) |
602 | return 0; | 602 | return 0; |
603 | 603 | ||
604 | r = zd_ioread32_locked(chip, &value, E2P_PHY_REG); | 604 | r = zd_ioread16_locked(chip, &value, E2P_PHY_REG); |
605 | if (r) | 605 | if (r) |
606 | return r; | 606 | return r; |
607 | 607 | ||
@@ -791,11 +791,6 @@ static int zd1211b_hw_reset_phy(struct zd_chip *chip) | |||
791 | goto out; | 791 | goto out; |
792 | 792 | ||
793 | r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); | 793 | r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); |
794 | if (r) | ||
795 | goto unlock; | ||
796 | |||
797 | r = patch_cr157(chip); | ||
798 | unlock: | ||
799 | t = zd_chip_unlock_phy_regs(chip); | 794 | t = zd_chip_unlock_phy_regs(chip); |
800 | if (t && !r) | 795 | if (t && !r) |
801 | r = t; | 796 | r = t; |