rt2x00: Fix rt2800usb detection in rt2800lib.
PATCH 1/1 rt2x00: Fix rt2800usb detection in rt2800lib.
rt2800lib incorrectly detected whether RT2800USB was enabled because it didn't account for a modularized RT2800USB driver.
---
John, this one is a fix for 2.6.33.
--- drivers/net/wireless/rt2x00/rt2800lib.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/net/wireless/rt2x00/rt2800lib.c +4 -0
@@ -33,6 +33,10 @@Abstract: rt2800 generic device routines. */ +#ifdef CONFIG_RT2800USB_MODULE +#define CONFIG_RT2800USB +#endif +#include <linux/kernel.h> #include <linux/module.h>
Signature · 1 line
1.6.5.5
PATCH 1/1 rt2x00: Disable powersaving for rt61pci.
We've had many reports of rt61pci failures with powersaving enabled. Therefore, as a stop-gap measure, disable powersaving of the rt61pci until we have found a proper solution.
---
John, this is an urgent fix for 2.6.33 (and stable).
--- drivers/net/wireless/rt2x00/rt61pci.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/net/wireless/rt2x00/rt61pci.c +1 -3
@@ -2543,9 +2543,7 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)*/ rt2x00dev->hw->flags =IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | -IEEE80211_HW_SIGNAL_DBM | -IEEE80211_HW_SUPPORTS_PS | -IEEE80211_HW_PS_NULLFUNC_STACK ; +IEEE80211_HW_SIGNAL_DBM ;SET_IEEE80211_DEV (rt2x00dev->hw, rt2x00dev->dev); SET_IEEE80211_PERM_ADDR(rt2x00dev->hw,
Signature · 1 line
1.6.5.5
Re: [PATCH 2.6.33] rt2x00: Disable powersaving for rt61pci.
Quoted 3 lines · Gertjan van Wingerde
We've had many reports of rt61pci failures with powersaving enabled. Therefore, as a stop-gap measure, disable powersaving of the rt61pci until we have found a proper solution.
This disables powersaving completely, can't we set the default powersaving to disabled? That way for people for who it does work, it can still be enabled.
Ivo
Quoted 25 lines
Signed-off-by Gertjan van Wingerde <[email protected]>---
John, this is an urgent fix for 2.6.33 (and stable).
--- drivers/net/wireless/rt2x00/rt61pci.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)drivers/net/wireless/rt2x00/rt61pci.c +1
-3@@ -2543,9 +2543,7 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)*/ rt2x00dev->hw->flags =IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | -IEEE80211_HW_SIGNAL_DBM | -IEEE80211_HW_SUPPORTS_PS | -IEEE80211_HW_PS_NULLFUNC_STACK ; +IEEE80211_HW_SIGNAL_DBM ;SET_IEEE80211_DEV (rt2x00dev->hw, rt2x00dev->dev); SET_IEEE80211_PERM_ADDR(rt2x00dev->hw,
Re: [PATCH 2.6.33] rt2x00: Disable powersaving for rt61pci.
Quoted 8 lines · Ivo van Doorn
Quoted 3 lines · Gertjan van Wingerde
We've had many reports of rt61pci failures with powersaving enabled. Therefore, as a stop-gap measure, disable powersaving of the rt61pci until we have found a proper solution.
This disables powersaving completely, can't we set the default powersaving to disabled? That way for people for who it does work, it can still be enabled.
Well, when I was looking into this I came up with a number of issues in the code which makes me believe that it simply isn't working at all.
One example is that the rt61pci devices rely on handling the wakeup interrupt by the driver to wake up the devices. As far as I can tell there is no handling of the wakeup interrupt in the rt61pci driver.
That's why I decided to disable it all together, as I don't think it works properly for anyone (although some people may not really notice it).
---
Gertjan.
Re: [PATCH 2.6.33] rt2x00: Disable powersaving for rt61pci.
Quoted 10 lines · Gertjan van Wingerde
Quoted 8 lines · Ivo van Doorn
Quoted 3 lines · Gertjan van Wingerde
We've had many reports of rt61pci failures with powersaving enabled. Therefore, as a stop-gap measure, disable powersaving of the rt61pci until we have found a proper solution.
This disables powersaving completely, can't we set the default powersaving to disabled? That way for people for who it does work, it can still be enabled.
Quoted 7 lines
Well, when I was looking into this I came up with a number of issues in the code which makes me believe that it simply isn't working at all.
One example is that the rt61pci devices rely on handling the wakeup interrupt by the driver to wake up the devices. As far as I can tell there is no handling of the wakeup interrupt in the rt61pci driver.
That's why I decided to disable it all together, as I don't think it works properly for anyone (although some people may not really notice it).
Ok, but then please disable it for _all_ rt2x00 drivers, or at least all PCI rt2x00 drivers since they would have the same wakeup interrupt requirement.
Ivo
Re: [PATCH 2.6.33] rt2x00: Disable powersaving for rt61pci.
Quoted 19 lines · Ivo van Doorn
Quoted 10 lines · Gertjan van Wingerde
Quoted 8 lines · Ivo van Doorn
Quoted 3 lines · Gertjan van Wingerde
We've had many reports of rt61pci failures with powersaving enabled. Therefore, as a stop-gap measure, disable powersaving of the rt61pci until we have found a proper solution.
This disables powersaving completely, can't we set the default powersaving to disabled? That way for people for who it does work, it can still be enabled.
Quoted 7 lines
Well, when I was looking into this I came up with a number of issues in the code which makes me believe that it simply isn't working at all.
One example is that the rt61pci devices rely on handling the wakeup interrupt by the driver to wake up the devices. As far as I can tell there is no handling of the wakeup interrupt in the rt61pci driver.
That's why I decided to disable it all together, as I don't think it works properly for anyone (although some people may not really notice it).
Quoted 3 lines
Ok, but then please disable it for _all_ rt2x00 drivers, or at least all PCI rt2x00 drivers since they would have the same wakeup interrupt requirement.
I'll see if this will be the case for all PCI rt2x00 devices and adapt for the ones that need it. I didn't look into the other devices yet, and ISTR that at least rt2500pci doesn't have this requirement.
---
Gertjan.
Re: [rt2x00-users] [PATCH 2.6.33] rt2x00: Disable powersaving for rt61pci.
Quoted 21 lines · Gertjan van Wingerde
Quoted 16 lines · Ivo van Doorn
Quoted 8 lines · Gertjan van Wingerde
Quoted 7 lines · Ivo van Doorn
Quoted 3 lines · Gertjan van Wingerde
We've had many reports of rt61pci failures with powersaving enabled. Therefore, as a stop-gap measure, disable powersaving of the rt61pci until we have found a proper solution.
This disables powersaving completely, can't we set the default powersaving to disabled? That way for people for who it does work, it can still be enabled.
Quoted 7 lines
Well, when I was looking into this I came up with a number of issues in the code which makes me believe that it simply isn't working at all.
One example is that the rt61pci devices rely on handling the wakeup interrupt by the driver to wake up the devices. As far as I can tell there is no handling of the wakeup interrupt in the rt61pci driver.
That's why I decided to disable it all together, as I don't think it works properly for anyone (although some people may not really notice it).Quoted 3 lines
Ok, but then please disable it for _all_ rt2x00 drivers, or at least all PCI rt2x00 drivers since they would have the same wakeup interrupt requirement.
Quoted 6 lines
I'll see if this will be the case for all PCI rt2x00 devices and adapt for the ones that need it. I didn't look into the other devices yet, and ISTR that at least rt2500pci doesn't have this requirement.
---
Gertjan.
If the same mecanism is used by rt2800usb, that would explain why power save is not working as well on my rt2870 USB device. Is there a way to start the device with power save disabled at startup (so it can be reenabled later to debug it).
Regards,
Benoit
Re: [PATCH 2.6.33] rt2x00: Disable powersaving for rt61pci.
In reply to Gertjan van WingerdeQuoted 20 lines · Gertjan van Wingerde
Quoted 19 lines · Ivo van Doorn
Quoted 17 lines · Gertjan van Wingerde
Quoted 8 lines · Ivo van Doorn
Quoted 3 lines · Gertjan van Wingerde
We've had many reports of rt61pci failures with powersaving enabled. Therefore, as a stop-gap measure, disable powersaving of the rt61pci until we have found a proper solution.
This disables powersaving completely, can't we set the default powersaving to disabled? That way for people for who it does work, it can still be enabled.
Well, when I was looking into this I came up with a number of issues in the code which makes me believe that it simply isn't working at all.
One example is that the rt61pci devices rely on handling the wakeup interrupt by the driver to wake up the devices. As far as I can tell there is no handling of the wakeup interrupt in the rt61pci driver.
That's why I decided to disable it all together, as I don't think it works properly for anyone (although some people may not really notice it).
Quoted 8 lines
Quoted 3 lines
Ok, but then please disable it for _all_ rt2x00 drivers, or at least all PCI rt2x00 drivers since they would have the same wakeup interrupt requirement.
I'll see if this will be the case for all PCI rt2x00 devices and adapt for the ones that need it. I didn't look into the other devices yet, and ISTR that at least rt2500pci doesn't have this requirement.
OK. I can see that this does not apply to rt2400pci and rt2500pci. I'll leave those alone. I'll add the disablement to rt2800pci as well, as it follows the same scheme as rt61pci.
Also, I will use the suggestion of you to just disable the default powersaving instead of making it completely unusable.
Expect a new version any minute.
---
Gertjan.
Quoted 17 lines · On Sun, 13 Dec 2009 00:39:39 +0100 Gertjan van Wingerde wrote:
rt2800lib incorrectly detected whether RT2800USB was enabled because it didn't account for a modularized RT2800USB driver.
Signed-off-by Gertjan van Wingerde <[email protected]>---
John, this one is a fix for 2.6.33.
--- drivers/net/wireless/rt2x00/rt2800lib.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)drivers/net/wireless/rt2x00/rt2800lib.c +0
-0
drivers/net/wireless/rt2x00/rt2800lib.c line 39
Quoted 7 lines
drivers/net/wireless/rt2x00/rt2800lib.c +4
-0@@ -33,6 +33,10 @@Abstract: rt2800 generic device routines. */ +#ifdef CONFIG_RT2800USB_MODULE +#define CONFIG_RT2800USB +#endif +
The idiom that I am familiar with (and is the common one afaik) is to use:
#if defined(CONFIG_RT2800USB) || defined(CONFIG_RT2800USB_MODULE)
Besides, it's not nice to muck with kconfig symbols outside of Kconfig files.
drivers/net/wireless/rt2x00/rt2800lib.c line 41
Quoted 2 lines
drivers/net/wireless/rt2x00/rt2800lib.c +0
-0#include <linux/kernel.h> #include <linux/module.h>
---
~Randy
Quoted 2 lines · Gertjan van Wingerde
rt2800lib incorrectly detected whether RT2800USB was enabled because it didn't account for a modularized RT2800USB driver.
This should be a temporary solution, since rt2800lib shouldn't use the rt2800usb defines at all (it should be independent of rt2800pci/usb.
Quoted 1 line
Signed-off-by Gertjan van Wingerde <[email protected]>
But for now:
Quoted 23 lines
---
John, this one is a fix for 2.6.33.
--- drivers/net/wireless/rt2x00/rt2800lib.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)drivers/net/wireless/rt2x00/rt2800lib.c +4
-0@@ -33,6 +33,10 @@Abstract: rt2800 generic device routines. */ +#ifdef CONFIG_RT2800USB_MODULE +#define CONFIG_RT2800USB +#endif +#include <linux/kernel.h> #include <linux/module.h>
PATCH 1/1 rt2x00: Fix rt2800usb detection in rt2800lib.
In reply to Gertjan van WingerdeFrom: Gertjan van Wingerde <[email protected]>
rt2800lib incorrectly detected whether RT2800USB was enabled because it didn't account for a modularized RT2800USB driver.
---
I'm merging this version based on Randy's feedback...
drivers/net/wireless/rt2x00/rt2800lib.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/rt2x00/rt2800lib.c +2 -2
@@ -37,7 +37,7 @@#include <linux/module.h> #include "rt2x00.h" -#ifdef CONFIG_RT2800USB +#if defined(CONFIG_RT2800USB ) || defined(CONFIG_RT2800USB_MODULE )#include "rt2x00usb.h" #endif #include "rt2800lib.h"
@@ -1121,7 +1121,7 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)if (rt2x00_intf_is_usb (rt2x00dev)) {rt2800_register_write (rt2x00dev,USB_DMA_CFG ,0x00000000 ); -#ifdef CONFIG_RT2800USB +#if defined(CONFIG_RT2800USB ) || defined(CONFIG_RT2800USB_MODULE )rt2x00usb_vendor_request_sw (rt2x00dev,USB_DEVICE_MODE ,0 ,USB_MODE_RESET ,REGISTER_TIMEOUT );#endif
Signature · 1 line
1.6.2.5
Quoted 27 lines · John W. Linville
From: Gertjan van Wingerde <[email protected]>
rt2800lib incorrectly detected whether RT2800USB was enabled because it didn't account for a modularized RT2800USB driver.
Signed-off-by Gertjan van Wingerde <[email protected]>Acked-by Ivo van Doorn <[email protected]>---
I'm merging this version based on Randy's feedback...drivers/net/wireless/rt2x00/rt2800lib.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/net/wireless/rt2x00/rt2800lib.c +1
-1@@ -37,7 +37,7 @@#include <linux/module.h> #include "rt2x00.h" -#ifdef CONFIG_RT2800USB +#if defined(CONFIG_RT2800USB ) || defined(CONFIG_RT2800USB_MODULE )#include "rt2x00usb.h" #endif #include "rt2800lib.h"
drivers/net/wireless/rt2x00/rt2800lib.c int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) · line 1127
Quoted 8 lines
drivers/net/wireless/rt2x00/rt2800lib.c +1
-1@@ -1121,7 +1121,7 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)if (rt2x00_intf_is_usb (rt2x00dev)) {rt2800_register_write (rt2x00dev,USB_DMA_CFG ,0x00000000 ); -#ifdef CONFIG_RT2800USB +#if defined(CONFIG_RT2800USB ) || defined(CONFIG_RT2800USB_MODULE )rt2x00usb_vendor_request_sw (rt2x00dev,USB_DEVICE_MODE ,0 ,USB_MODE_RESET ,REGISTER_TIMEOUT );#endif
Thanks, looks good to me.
---
Gertjan.