diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2011-04-30 11:18:18 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-02 14:49:19 -0400 |
commit | 1c0bcf89d85cc97a0d9ce4cd909351a81fa4fdde (patch) | |
tree | 909f63418c495c925d53eb66ebe4bae7cddbe95d /drivers/net/wireless/rt2x00/rt2x00.h | |
parent | fdbc7b0a262e24a3ee00f1f9acb5a97309a173d5 (diff) |
rt2x00: Add autowake support for USB hardware
The USB drivers don't support automatically waking up when in powersaving mode,
add a work object which will wakeup the device in time to receive the next beacon.
Based on that beacon, we either go back into powersaving mode, or we remain awake
to receive the buffered frames for our station.
Some part of the code, especially rt2x00lib_find_ie and rt2x00lib_rxdone_check_ps
are inspired on the code from carl9170.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 86e141000156..73d3332be614 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -662,6 +662,7 @@ enum rt2x00_state_flags { | |||
662 | * Driver configuration | 662 | * Driver configuration |
663 | */ | 663 | */ |
664 | CONFIG_CHANNEL_HT40, | 664 | CONFIG_CHANNEL_HT40, |
665 | CONFIG_POWERSAVING, | ||
665 | }; | 666 | }; |
666 | 667 | ||
667 | /* | 668 | /* |
@@ -681,6 +682,7 @@ enum rt2x00_capability_flags { | |||
681 | REQUIRE_TASKLET_CONTEXT, | 682 | REQUIRE_TASKLET_CONTEXT, |
682 | REQUIRE_SW_SEQNO, | 683 | REQUIRE_SW_SEQNO, |
683 | REQUIRE_HT_TX_DESC, | 684 | REQUIRE_HT_TX_DESC, |
685 | REQUIRE_PS_AUTOWAKE, | ||
684 | 686 | ||
685 | /* | 687 | /* |
686 | * Capabilities | 688 | * Capabilities |
@@ -875,10 +877,20 @@ struct rt2x00_dev { | |||
875 | u8 calibration[2]; | 877 | u8 calibration[2]; |
876 | 878 | ||
877 | /* | 879 | /* |
880 | * Association id. | ||
881 | */ | ||
882 | u16 aid; | ||
883 | |||
884 | /* | ||
878 | * Beacon interval. | 885 | * Beacon interval. |
879 | */ | 886 | */ |
880 | u16 beacon_int; | 887 | u16 beacon_int; |
881 | 888 | ||
889 | /** | ||
890 | * Timestamp of last received beacon | ||
891 | */ | ||
892 | unsigned long last_beacon; | ||
893 | |||
882 | /* | 894 | /* |
883 | * Low level statistics which will have | 895 | * Low level statistics which will have |
884 | * to be kept up to date while device is running. | 896 | * to be kept up to date while device is running. |
@@ -907,6 +919,11 @@ struct rt2x00_dev { | |||
907 | struct work_struct txdone_work; | 919 | struct work_struct txdone_work; |
908 | 920 | ||
909 | /* | 921 | /* |
922 | * Powersaving work | ||
923 | */ | ||
924 | struct delayed_work autowakeup_work; | ||
925 | |||
926 | /* | ||
910 | * Data queue arrays for RX, TX, Beacon and ATIM. | 927 | * Data queue arrays for RX, TX, Beacon and ATIM. |
911 | */ | 928 | */ |
912 | unsigned int data_queues; | 929 | unsigned int data_queues; |