2 * Copyright (c) 2017 Redpine Signals Inc.
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
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
27 PS_ENABLE_REQ_SENT
= 1,
28 PS_DISABLE_REQ_SENT
= 2,
32 struct ps_sleep_params
{
37 __le16 num_bcns_per_lis_int
;
39 __le32 sleep_duration
;
51 u16 num_bcns_per_lis_int
;
52 u32 dtim_interval_duration
;
53 u16 num_dtims_per_sleep
;
54 u32 deep_sleep_wakeup_period
;
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
);