aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 89d132d4af12..41da3d218c65 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1084,7 +1084,7 @@ static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
1084static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev, 1084static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
1085 enum dev_state state) 1085 enum dev_state state)
1086{ 1086{
1087 u32 reg; 1087 u32 reg, reg2;
1088 unsigned int i; 1088 unsigned int i;
1089 char put_to_sleep; 1089 char put_to_sleep;
1090 char bbp_state; 1090 char bbp_state;
@@ -1105,11 +1105,12 @@ static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
1105 * device has entered the correct state. 1105 * device has entered the correct state.
1106 */ 1106 */
1107 for (i = 0; i < REGISTER_BUSY_COUNT; i++) { 1107 for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
1108 rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg); 1108 rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg2);
1109 bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE); 1109 bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE);
1110 rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE); 1110 rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE);
1111 if (bbp_state == state && rf_state == state) 1111 if (bbp_state == state && rf_state == state)
1112 return 0; 1112 return 0;
1113 rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg);
1113 msleep(10); 1114 msleep(10);
1114 } 1115 }
1115 1116