Skip to contentSkip to conversation

Two small fixes for rt2x00.

PATCH In review Gertjan van Wingerde 3 participants 6 messages Mar 24, 2010 – Apr 6, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

cover Two small fixes for rt2x00.

John,

These are two small fixes for rt2x00 that accumulated in my tree. Both are generated against wireless-2.6, but should apply to wireless-next-2.6, so apply to the tree you feel most appropriate for this.

The patches can also be pulled from:

	git://git.gwingerde.nl/rt2x00-2.6

Gertjan van Wingerde (2):
rt2x00: Fix typo in RF register programming of rt2800.
rt2x00: Disable powersaving by default in rt2500usb.

 drivers/net/wireless/rt2x00/rt2500usb.c |    5 +++++
 drivers/net/wireless/rt2x00/rt2800lib.c |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
#1 lore raw

PATCH 1/2 rt2x00: Fix typo in RF register programming of rt2800.

---
 drivers/net/wireless/rt2x00/rt2800lib.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/rt2x00/rt2800lib.c +2 -2
index 18d4d8e..326fce7 100644
@@ -812,9 +812,9 @@ static void rt2800_config_channel_rt3x(struct rt2x00_dev *rt2x00dev,
 	rt2800_rfcsr_write(rt2x00dev, 24,
 			      rt2x00dev->calibration[conf_is_ht40(conf)]);
 
-	rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr);
+	rt2800_rfcsr_read(rt2x00dev, 7, &rfcsr);
 	rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1);
-	rt2800_rfcsr_write(rt2x00dev, 23, rfcsr);
+	rt2800_rfcsr_write(rt2x00dev, 7, rfcsr);
 }
 
 static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
Signature · 1 line
1.7.0.1
Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] rt2x00: Fix typo in RF register programming of rt2800.

Quoted 1 line · Gertjan van Wingerde
Quoted 20 lines
---
 drivers/net/wireless/rt2x00/rt2800lib.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/rt2x00/rt2800lib.c +2 -2
index 18d4d8e..326fce7 100644
@@ -812,9 +812,9 @@ static void rt2800_config_channel_rt3x(struct rt2x00_dev *rt2x00dev,
 	rt2800_rfcsr_write(rt2x00dev, 24,
 			      rt2x00dev->calibration[conf_is_ht40(conf)]);
 
-	rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr);
+	rt2800_rfcsr_read(rt2x00dev, 7, &rfcsr);
 	rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1);
-	rt2800_rfcsr_write(rt2x00dev, 23, rfcsr);
+	rt2800_rfcsr_write(rt2x00dev, 7, rfcsr);
 }
 
 static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
#3 lore raw

Re: [PATCH 1/2] rt2x00: Fix typo in RF register programming of rt2800.

In reply to Gertjan van Wingerde

Thanks Gertjan. I just stumbled over the same issue. This allows scanning on all channel on the SoC platform.

Helmut

Am Mittwoch 24 März 2010 schrieb Gertjan van Wingerde:

Quoted 22 lines
---
 drivers/net/wireless/rt2x00/rt2800lib.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/rt2x00/rt2800lib.c +2 -2
index 18d4d8e..326fce7 100644
@@ -812,9 +812,9 @@ static void rt2800_config_channel_rt3x(struct rt2x00_dev *rt2x00dev,
 	rt2800_rfcsr_write(rt2x00dev, 24,
 			      rt2x00dev->calibration[conf_is_ht40(conf)]);
 
-	rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr);
+	rt2800_rfcsr_read(rt2x00dev, 7, &rfcsr);
 	rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1);
-	rt2800_rfcsr_write(rt2x00dev, 23, rfcsr);
+	rt2800_rfcsr_write(rt2x00dev, 7, rfcsr);
 }
 
 static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
#4 lore raw

PATCH 2/2 rt2x00: Disable powersaving by default in rt2500usb.

In reply to Gertjan van Wingerde

Recent bug reports have shown that rt2500usb also suffers from the powersave problems that the PCI rt2x00 drivers suffer from. So disable powersaving by default for rt2500usb as well.

---
 drivers/net/wireless/rt2x00/rt2500usb.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/wireless/rt2x00/rt2500usb.c +5 -0
index ee34c13..dbaa781 100644
@@ -1643,6 +1643,11 @@ static int rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	unsigned int i;
 
 	/*
+	 * Disable powersaving as default.
+	 */
+	rt2x00dev->hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
+
+	/*
 	 * Initialize all hw fields.
 	 */
 	rt2x00dev->hw->flags =
Signature · 1 line
1.7.0.1
Acked-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] rt2x00: Disable powersaving by default in rt2500usb.

Quoted 5 lines · Gertjan van Wingerde

Recent bug reports have shown that rt2500usb also suffers from the powersave problems that the PCI rt2x00 drivers suffer from. So disable powersaving by default for rt2500usb as well.

Quoted 20 lines
---
 drivers/net/wireless/rt2x00/rt2500usb.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/wireless/rt2x00/rt2500usb.c +5 -0
index ee34c13..dbaa781 100644
@@ -1643,6 +1643,11 @@ static int rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	unsigned int i;
 
 	/*
+	 * Disable powersaving as default.
+	 */
+	rt2x00dev->hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
+
+	/*
 	 * Initialize all hw fields.
 	 */
 	rt2x00dev->hw->flags =