1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #ifndef __RSI_PS_H__
18 #define __RSI_PS_H__
19
20 #define PS_CONFIRM_INDEX 12
21 #define RSI_DEF_DS_WAKEUP_PERIOD 200
22 #define RSI_DEF_LISTEN_INTERVAL 200
23 #define RSI_SLEEP_TYPE_LP 1
24
25 enum ps_state {
26 PS_NONE = 0,
27 PS_ENABLE_REQ_SENT = 1,
28 PS_DISABLE_REQ_SENT = 2,
29 PS_ENABLED = 3
30 };
31
32 struct ps_sleep_params {
33 u8 enable;
34 u8 sleep_type;
35 u8 connected_sleep;
36 u8 reserved1;
37 __le16 num_bcns_per_lis_int;
38 __le16 wakeup_type;
39 __le32 sleep_duration;
40 } __packed;
41
42 struct rsi_ps_info {
43 u8 enabled;
44 u8 sleep_type;
45 u8 tx_threshold;
46 u8 rx_threshold;
47 u8 tx_hysterisis;
48 u8 rx_hysterisis;
49 u16 monitor_interval;
50 u32 listen_interval;
51 u16 num_bcns_per_lis_int;
52 u32 dtim_interval_duration;
53 u16 num_dtims_per_sleep;
54 u32 deep_sleep_wakeup_period;
55 } __packed;
56
57 char *str_psstate(enum ps_state state);
58 void rsi_enable_ps(struct rsi_hw *adapter, struct ieee80211_vif *vif);
59 void rsi_disable_ps(struct rsi_hw *adapter, struct ieee80211_vif *vif);
60 int rsi_handle_ps_confirm(struct rsi_hw *adapter, u8 *msg);
61 void rsi_default_ps_params(struct rsi_hw *hw);
62 void rsi_conf_uapsd(struct rsi_hw *adapter, struct ieee80211_vif *vif);
63 #endif