Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright (c) 2017 Redpine Signals Inc.
0003  *
0004  * Permission to use, copy, modify, and/or distribute this software for any
0005  * purpose with or without fee is hereby granted, provided that the above
0006  * copyright notice and this permission notice appear in all copies.
0007  *
0008  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
0009  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
0010  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
0011  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
0012  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
0013  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
0014  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
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