1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-28 10:29:51 +02:00
openwrt-xburst/package/mac80211/patches/304-rt2x00-Update-from-rt2860-driver-rt2800pci.patch

53 lines
1.7 KiB
Diff
Raw Normal View History

From 690559385626e98e2a91c280a8bca195f071756c Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Tue, 28 Apr 2009 20:12:43 +0200
Subject: [PATCH 4/4] rt2x00: Update from rt2860 driver (rt2800pci)
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2800pci.c | 10 +++++++---
drivers/net/wireless/rt2x00/rt2800pci.h | 2 ++
2 files changed, 9 insertions(+), 3 deletions(-)
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -2048,13 +2048,17 @@ static void rt2800pci_disable_radio(stru
static int rt2800pci_set_state(struct rt2x00_dev *rt2x00dev,
enum dev_state state)
{
- rt2x00pci_register_write(rt2x00dev, AUTOWAKEUP_CFG, 0);
+ /*
+ * Always put the device to sleep (even when we intend to wakup!)
+ * if the device is booting and wasn't asleep it will return
+ * failure when attempting to wakup.
+ */
+ rt2800pci_mcu_request(rt2x00dev, MCU_SLEEP, 0xff, 0, 2);
if (state == STATE_AWAKE) {
rt2800pci_mcu_request(rt2x00dev, MCU_WAKEUP, TOKEN_WAKUP, 0, 0);
rt2800pci_mcu_status(rt2x00dev, TOKEN_WAKUP);
- } else
- rt2800pci_mcu_request(rt2x00dev, MCU_SLEEP, 0xff, 0, 2);
+ }
return 0;
}
--- a/drivers/net/wireless/rt2x00/rt2800pci.h
+++ b/drivers/net/wireless/rt2x00/rt2800pci.h
@@ -1714,6 +1714,7 @@ struct mac_iveiv_entry {
#define MCU_SLEEP 0x30
#define MCU_WAKEUP 0x31
#define MCU_RADIO_OFF 0x35
+#define MCU_CURRENT 0x36
#define MCU_LED 0x50
#define MCU_LED_STRENGTH 0x51
#define MCU_LED_1 0x52
@@ -1722,6 +1723,7 @@ struct mac_iveiv_entry {
#define MCU_RADAR 0x60
#define MCU_BOOT_SIGNAL 0x72
#define MCU_BBP_SIGNAL 0x80
+#define MCU_POWER_SAVE 0x83
/*
* MCU mailbox tokens