Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2 | * Copyright (c) 2015-2016 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | #if !defined(__SME_POWER_SAVE_API_H) |
| 29 | #define __SME_POWER_SAVE_API_H |
| 30 | |
| 31 | #include "sme_power_save.h" |
| 32 | #include "ani_global.h" |
| 33 | #include "sme_inside.h" |
| 34 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 35 | QDF_STATUS sme_ps_enable_disable(tHalHandle hal_ctx, uint32_t session_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 36 | enum sme_ps_cmd command); |
| 37 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 38 | QDF_STATUS sme_ps_uapsd_enable(tHalHandle hal_ctx, uint32_t session_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 39 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 40 | QDF_STATUS sme_ps_uapsd_disable(tHalHandle hal_ctx, uint32_t session_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 41 | |
| 42 | /* Condition check if driver is ready to enter in PS */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 43 | QDF_STATUS sme_enable_sta_ps_check(tpAniSirGlobal mac_ctx, uint32_t session_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 44 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 45 | QDF_STATUS sme_ps_process_command(tpAniSirGlobal mac_ctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 46 | uint32_t session_id, |
| 47 | enum sme_ps_cmd command); |
| 48 | |
| 49 | void sme_set_tspec_uapsd_mask_per_session(tpAniSirGlobal mac_ctx, |
| 50 | tSirMacTSInfo *ts_info, |
| 51 | uint8_t session_id); |
| 52 | /* Full Power Req Callback */ |
| 53 | typedef void (*uapsd_start_indication_cb)(void *callback_context, |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 54 | uint32_t session_id, QDF_STATUS status); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 55 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 56 | QDF_STATUS sme_ps_start_uapsd(tHalHandle hal_ctx, uint32_t session_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 57 | uapsd_start_indication_cb uapsd_start_ind_cb, |
| 58 | void *callback_context); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 59 | QDF_STATUS sme_set_ps_host_offload(tHalHandle hal_ctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 60 | tpSirHostOffloadReq request, |
| 61 | uint8_t session_id); |
| 62 | |
| 63 | #ifdef WLAN_NS_OFFLOAD |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 64 | QDF_STATUS sme_set_ps_ns_offload(tHalHandle hal_ctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 65 | tpSirHostOffloadReq request, |
| 66 | uint8_t session_id); |
| 67 | |
| 68 | #endif /* WLAN_NS_OFFLOAD */ |
| 69 | /* / Post a message to PE module */ |
| 70 | tSirRetStatus sme_post_pe_message(tpAniSirGlobal mac_ctx, tpSirMsgQ pMsg); |
| 71 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 72 | QDF_STATUS sme_ps_enable_auto_ps_timer(tHalHandle hal_ctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 73 | uint32_t sessionId, |
Dustin Brown | f660fb4 | 2016-09-09 12:04:00 -0700 | [diff] [blame] | 74 | uint32_t timeout); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 75 | QDF_STATUS sme_ps_disable_auto_ps_timer(tHalHandle hal_ctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 76 | uint32_t sessionId); |
| 77 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 78 | QDF_STATUS sme_ps_open(tHalHandle hal_ctx); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 79 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 80 | QDF_STATUS sme_ps_open_per_session(tHalHandle hal_ctx, uint32_t session_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 81 | |
| 82 | void sme_auto_ps_entry_timer_expired(void *ps_param); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 83 | QDF_STATUS sme_ps_close(tHalHandle hal_ctx); |
| 84 | QDF_STATUS sme_ps_close_per_session(tHalHandle hal_ctx, uint32_t sessionId); |
Varun Reddy Yeturu | b43fda1 | 2015-09-10 18:16:21 -0700 | [diff] [blame] | 85 | #ifdef FEATURE_WLAN_SCAN_PNO |
| 86 | void sme_set_pno_channel_prediction(tpSirPNOScanReq request_buf, |
| 87 | tpAniSirGlobal mac_ctx); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 88 | QDF_STATUS sme_set_ps_preferred_network_list(tHalHandle hal_ctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 89 | tpSirPNOScanReq request, |
| 90 | uint8_t session_id, |
Varun Reddy Yeturu | b43fda1 | 2015-09-10 18:16:21 -0700 | [diff] [blame] | 91 | preferred_network_found_ind_cb callback_routine, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 92 | void *callback_context); |
Varun Reddy Yeturu | b43fda1 | 2015-09-10 18:16:21 -0700 | [diff] [blame] | 93 | #else |
| 94 | static inline void sme_set_pno_channel_prediction(void *request_buf, |
| 95 | tpAniSirGlobal mac_ctx) |
| 96 | {} |
| 97 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 98 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 99 | QDF_STATUS sme_is_auto_ps_timer_running(tHalHandle hal_ctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 100 | uint32_t session_id); |
| 101 | |
| 102 | #endif /* #if !defined(__SME_POWER_SAVE_API_H) */ |
| 103 | |