diff options
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 9d299bd18850..87ee3ee020fe 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; |