diff options
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_chip.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_chip.h | 2 |
2 files changed, 4 insertions, 9 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; |
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.h b/drivers/net/wireless/zd1211rw/zd_chip.h index ae39c225bc9e..e57ed75d9425 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.h +++ b/drivers/net/wireless/zd1211rw/zd_chip.h | |||
@@ -641,8 +641,8 @@ enum { | |||
641 | * also only 11 channels. */ | 641 | * also only 11 channels. */ |
642 | #define E2P_ALLOWED_CHANNEL E2P_DATA(0x18) | 642 | #define E2P_ALLOWED_CHANNEL E2P_DATA(0x18) |
643 | 643 | ||
644 | #define E2P_PHY_REG E2P_DATA(0x1a) | ||
645 | #define E2P_DEVICE_VER E2P_DATA(0x20) | 644 | #define E2P_DEVICE_VER E2P_DATA(0x20) |
645 | #define E2P_PHY_REG E2P_DATA(0x25) | ||
646 | #define E2P_36M_CAL_VALUE1 E2P_DATA(0x28) | 646 | #define E2P_36M_CAL_VALUE1 E2P_DATA(0x28) |
647 | #define E2P_36M_CAL_VALUE2 E2P_DATA(0x2a) | 647 | #define E2P_36M_CAL_VALUE2 E2P_DATA(0x2a) |
648 | #define E2P_36M_CAL_VALUE3 E2P_DATA(0x2c) | 648 | #define E2P_36M_CAL_VALUE3 E2P_DATA(0x2c) |