[PATCH] rt2500usb: improve powersaving reliability

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ondrej Zary
Date: Wednesday, March 24, 2010 - 3:07 pm

According to my debugging, retrying 5 times (REGISTER_BUSY_COUNT) does not
provide enough time for the device to enter the required state. Sometimes,
the device needs 12 to 15 retries. Increase it to 20 to be sure.

This improves powersaving reliability but one problem still remains: power
state change sometimes fails completely - the bpp_state and rf_state get
stuck and cannot be changed anymore.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

--- linux-2.6.34-rc2-orig/drivers/net/wireless/rt2x00/rt2500usb.c	2010-03-20 02:17:57.000000000 +0100
+++ linux-2.6.34-rc2/drivers/net/wireless/rt2x00/rt2500usb.c	2010-03-24 22:55:53.000000000 +0100
@@ -968,7 +968,7 @@ static int rt2500usb_set_state(struct rt
 	 * We must wait until the register indicates that the
 	 * device has entered the correct state.
 	 */
-	for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
+	for (i = 0; i < 20; i++) {
 		rt2500usb_register_read(rt2x00dev, MAC_CSR17, &reg2);
 		bbp_state = rt2x00_get_field16(reg2, MAC_CSR17_BBP_CURR_STATE);
 		rf_state = rt2x00_get_field16(reg2, MAC_CSR17_RF_CURR_STATE);


-- 
Ondrej Zary
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [rt2x00-users] [PATCH RFC] rt2500usb: disable broken H ..., Gertjan van Wingerde, (Tue Mar 23, 8:41 am)
[PATCH] rt2500usb: improve powersaving reliability, Ondrej Zary, (Wed Mar 24, 3:07 pm)
Re: [PATCH] rt2500usb: improve powersaving reliability, Ivo van Doorn, (Wed Mar 24, 3:15 pm)