the bison prereq check is no longer necessary
[openwrt.git] / package / mac80211 / patches / 304-rt2x00-Update-from-rt2860-driver-rt2800pci.patch
1 From 690559385626e98e2a91c280a8bca195f071756c Mon Sep 17 00:00:00 2001
2 From: Ivo van Doorn <IvDoorn@gmail.com>
3 Date: Tue, 28 Apr 2009 20:12:43 +0200
4 Subject: [PATCH 4/4] rt2x00: Update from rt2860 driver (rt2800pci)
5
6 Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
7 ---
8 drivers/net/wireless/rt2x00/rt2800pci.c | 10 +++++++---
9 drivers/net/wireless/rt2x00/rt2800pci.h | 2 ++
10 2 files changed, 9 insertions(+), 3 deletions(-)
11
12 --- a/drivers/net/wireless/rt2x00/rt2800pci.c
13 +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
14 @@ -2048,13 +2048,17 @@ static void rt2800pci_disable_radio(stru
15 static int rt2800pci_set_state(struct rt2x00_dev *rt2x00dev,
16 enum dev_state state)
17 {
18 - rt2x00pci_register_write(rt2x00dev, AUTOWAKEUP_CFG, 0);
19 + /*
20 + * Always put the device to sleep (even when we intend to wakup!)
21 + * if the device is booting and wasn't asleep it will return
22 + * failure when attempting to wakup.
23 + */
24 + rt2800pci_mcu_request(rt2x00dev, MCU_SLEEP, 0xff, 0, 2);
25
26 if (state == STATE_AWAKE) {
27 rt2800pci_mcu_request(rt2x00dev, MCU_WAKEUP, TOKEN_WAKUP, 0, 0);
28 rt2800pci_mcu_status(rt2x00dev, TOKEN_WAKUP);
29 - } else
30 - rt2800pci_mcu_request(rt2x00dev, MCU_SLEEP, 0xff, 0, 2);
31 + }
32
33 return 0;
34 }
35 --- a/drivers/net/wireless/rt2x00/rt2800pci.h
36 +++ b/drivers/net/wireless/rt2x00/rt2800pci.h
37 @@ -1714,6 +1714,7 @@ struct mac_iveiv_entry {
38 #define MCU_SLEEP 0x30
39 #define MCU_WAKEUP 0x31
40 #define MCU_RADIO_OFF 0x35
41 +#define MCU_CURRENT 0x36
42 #define MCU_LED 0x50
43 #define MCU_LED_STRENGTH 0x51
44 #define MCU_LED_1 0x52
45 @@ -1722,6 +1723,7 @@ struct mac_iveiv_entry {
46 #define MCU_RADAR 0x60
47 #define MCU_BOOT_SIGNAL 0x72
48 #define MCU_BBP_SIGNAL 0x80
49 +#define MCU_POWER_SAVE 0x83
50
51 /*
52 * MCU mailbox tokens
This page took 0.058055 seconds and 5 git commands to generate.