blob: 77e2934e8a528890a2039008534bc03a89e22f5c [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05302 * Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
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 Chouhanfb54ab02016-02-18 18:00:46 +053035QDF_STATUS sme_ps_enable_disable(tHalHandle hal_ctx, uint32_t session_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080036 enum sme_ps_cmd command);
37
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053038QDF_STATUS sme_ps_uapsd_enable(tHalHandle hal_ctx, uint32_t session_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080039
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053040QDF_STATUS sme_ps_uapsd_disable(tHalHandle hal_ctx, uint32_t session_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080041
42/* Condition check if driver is ready to enter in PS */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053043QDF_STATUS sme_enable_sta_ps_check(tpAniSirGlobal mac_ctx, uint32_t session_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080044
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053045QDF_STATUS sme_ps_process_command(tpAniSirGlobal mac_ctx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080046 uint32_t session_id,
47 enum sme_ps_cmd command);
48
49void sme_set_tspec_uapsd_mask_per_session(tpAniSirGlobal mac_ctx,
50 tSirMacTSInfo *ts_info,
51 uint8_t session_id);
52/* Full Power Req Callback */
53typedef void (*uapsd_start_indication_cb)(void *callback_context,
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053054 uint32_t session_id, QDF_STATUS status);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080055
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053056QDF_STATUS sme_ps_start_uapsd(tHalHandle hal_ctx, uint32_t session_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080057 uapsd_start_indication_cb uapsd_start_ind_cb,
58 void *callback_context);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053059QDF_STATUS sme_set_ps_host_offload(tHalHandle hal_ctx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080060 tpSirHostOffloadReq request,
61 uint8_t session_id);
62
63#ifdef WLAN_NS_OFFLOAD
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053064QDF_STATUS sme_set_ps_ns_offload(tHalHandle hal_ctx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080065 tpSirHostOffloadReq request,
66 uint8_t session_id);
67
68#endif /* WLAN_NS_OFFLOAD */
69/* / Post a message to PE module */
70tSirRetStatus sme_post_pe_message(tpAniSirGlobal mac_ctx, tpSirMsgQ pMsg);
71
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053072QDF_STATUS sme_ps_enable_auto_ps_timer(tHalHandle hal_ctx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080073 uint32_t sessionId,
Dustin Brownf660fb42016-09-09 12:04:00 -070074 uint32_t timeout);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053075QDF_STATUS sme_ps_disable_auto_ps_timer(tHalHandle hal_ctx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080076 uint32_t sessionId);
77
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053078QDF_STATUS sme_ps_open(tHalHandle hal_ctx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080079
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053080QDF_STATUS sme_ps_open_per_session(tHalHandle hal_ctx, uint32_t session_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080081
82void sme_auto_ps_entry_timer_expired(void *ps_param);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053083QDF_STATUS sme_ps_close(tHalHandle hal_ctx);
84QDF_STATUS sme_ps_close_per_session(tHalHandle hal_ctx, uint32_t sessionId);
Varun Reddy Yeturub43fda12015-09-10 18:16:21 -070085#ifdef FEATURE_WLAN_SCAN_PNO
86void sme_set_pno_channel_prediction(tpSirPNOScanReq request_buf,
87 tpAniSirGlobal mac_ctx);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053088QDF_STATUS sme_set_ps_preferred_network_list(tHalHandle hal_ctx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080089 tpSirPNOScanReq request,
90 uint8_t session_id,
Varun Reddy Yeturub43fda12015-09-10 18:16:21 -070091 preferred_network_found_ind_cb callback_routine,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080092 void *callback_context);
Varun Reddy Yeturub43fda12015-09-10 18:16:21 -070093#else
94static inline void sme_set_pno_channel_prediction(void *request_buf,
95 tpAniSirGlobal mac_ctx)
96{}
97#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080098
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053099QDF_STATUS sme_is_auto_ps_timer_running(tHalHandle hal_ctx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800100 uint32_t session_id);
101
102#endif /* #if !defined(__SME_POWER_SAVE_API_H) */
103