0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef __RSI_PS_H__
0018 #define __RSI_PS_H__
0019
0020 #define PS_CONFIRM_INDEX 12
0021 #define RSI_DEF_DS_WAKEUP_PERIOD 200
0022 #define RSI_DEF_LISTEN_INTERVAL 200
0023 #define RSI_SLEEP_TYPE_LP 1
0024
0025 enum ps_state {
0026 PS_NONE = 0,
0027 PS_ENABLE_REQ_SENT = 1,
0028 PS_DISABLE_REQ_SENT = 2,
0029 PS_ENABLED = 3
0030 };
0031
0032 struct ps_sleep_params {
0033 u8 enable;
0034 u8 sleep_type;
0035 u8 connected_sleep;
0036 u8 reserved1;
0037 __le16 num_bcns_per_lis_int;
0038 __le16 wakeup_type;
0039 __le32 sleep_duration;
0040 } __packed;
0041
0042 struct rsi_ps_info {
0043 u8 enabled;
0044 u8 sleep_type;
0045 u8 tx_threshold;
0046 u8 rx_threshold;
0047 u8 tx_hysterisis;
0048 u8 rx_hysterisis;
0049 u16 monitor_interval;
0050 u32 listen_interval;
0051 u16 num_bcns_per_lis_int;
0052 u32 dtim_interval_duration;
0053 u16 num_dtims_per_sleep;
0054 u32 deep_sleep_wakeup_period;
0055 } __packed;
0056
0057 char *str_psstate(enum ps_state state);
0058 void rsi_enable_ps(struct rsi_hw *adapter, struct ieee80211_vif *vif);
0059 void rsi_disable_ps(struct rsi_hw *adapter, struct ieee80211_vif *vif);
0060 int rsi_handle_ps_confirm(struct rsi_hw *adapter, u8 *msg);
0061 void rsi_default_ps_params(struct rsi_hw *hw);
0062 void rsi_conf_uapsd(struct rsi_hw *adapter, struct ieee80211_vif *vif);
0063 #endif