blob: 72e47988baa5c506b758f15da7114e855ef4ad46 [file] [log] [blame]
Jeff Johnson2b0a7b82016-05-18 15:08:02 -07001/*
2 * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
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(WLAN_HDD_LPASS_H)
29#define WLAN_HDD_LPASS_H
30
Jeff Johnson9078bdc2016-09-23 17:18:11 -070031struct cds_config_info;
Jeff Johnson9afc5012016-09-23 13:56:27 -070032struct hdd_context_s;
Jeff Johnson2ae6f712016-09-23 15:08:48 -070033struct hdd_adapter_s;
Jeff Johnson9afc5012016-09-23 13:56:27 -070034
Jeff Johnson2b0a7b82016-05-18 15:08:02 -070035#ifdef WLAN_FEATURE_LPSS
Jeff Johnson71396692016-09-23 15:41:52 -070036/**
Jeff Johnson9078bdc2016-09-23 17:18:11 -070037 * hdd_lpass_populate_cds_config() - Populate LPASS configuration
38 * @cds_config: CDS configuration to populate with lpass info
39 * @hdd_ctx: HDD global context which contains lpass information
40 *
41 * This function seeds the CDS configuration structure with
42 * lpass-specific information gleaned from the HDD context.
43 *
44 * Return: none
45 */
46void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config,
47 struct hdd_context_s *hdd_ctx);
48
49/**
Jeff Johnson71396692016-09-23 15:41:52 -070050 * hdd_lpass_notify_connect() - Notify LPASS of interface connect
51 * @adapter: The adapter that connected
52 *
53 * This function is used to notify the LPASS feature that an adapter
54 * has connected.
55 *
56 * Return: none
57 */
58void hdd_lpass_notify_connect(struct hdd_adapter_s *adapter);
Jeff Johnson2ae6f712016-09-23 15:08:48 -070059
60/**
Jeff Johnsoncef59bb2016-09-23 15:28:47 -070061 * hdd_lpass_notify_disconnect() - Notify LPASS of interface disconnect
62 * @adapter: The adapter that connected
63 *
64 * This function is used to notify the LPASS feature that an adapter
65 * has disconnected.
66 *
67 * Return: none
68 */
69void hdd_lpass_notify_disconnect(struct hdd_adapter_s *adapter);
70
71/**
Jeff Johnson2ae6f712016-09-23 15:08:48 -070072 * hdd_lpass_notify_mode_change() - Notify LPASS of interface mode change
73 * @adapter: The adapter whose mode was changed
74 *
75 * This function is used to notify the LPASS feature that an adapter
76 * had its mode changed.
77 *
78 * Return: none
79 */
80void hdd_lpass_notify_mode_change(struct hdd_adapter_s *adapter);
Jeff Johnson9afc5012016-09-23 13:56:27 -070081
82/**
83 * hdd_lpass_notify_start() - Notify LPASS of driver start
84 * @hdd_ctx: The global HDD context
85 *
86 * This function is used to notify the LPASS feature that the wlan
87 * driver has (re-)started.
88 *
89 * Return: none
90 */
91void hdd_lpass_notify_start(struct hdd_context_s *hdd_ctx);
Jeff Johnsonf7f66f02016-09-23 14:50:11 -070092
93/**
94 * hdd_lpass_notify_stop() - Notify LPASS of driver stop
95 * @hdd_ctx: The global HDD context
96 *
97 * This function is used to notify the LPASS feature that the wlan
98 * driver has stopped.
99 *
100 * Return: none
101 */
102void hdd_lpass_notify_stop(struct hdd_context_s *hdd_ctx);
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700103#else
Jeff Johnson9078bdc2016-09-23 17:18:11 -0700104static inline
105void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config,
106 struct hdd_context_s *hdd_ctx)
107{
108}
Jeff Johnson71396692016-09-23 15:41:52 -0700109static inline void hdd_lpass_notify_connect(struct hdd_adapter_s *adapter)
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700110{
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700111}
Jeff Johnsoncef59bb2016-09-23 15:28:47 -0700112static inline void hdd_lpass_notify_disconnect(struct hdd_adapter_s *adapter)
113{
114}
Jeff Johnson2ae6f712016-09-23 15:08:48 -0700115static inline void hdd_lpass_notify_mode_change(struct hdd_adapter_s *adapter)
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700116{
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700117}
Jeff Johnson9afc5012016-09-23 13:56:27 -0700118static inline void hdd_lpass_notify_start(struct hdd_context_s *hdd_ctx) { }
Jeff Johnsonf7f66f02016-09-23 14:50:11 -0700119static inline void hdd_lpass_notify_stop(struct hdd_context_s *hdd_ctx) { }
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700120#endif
121
122#endif /* WLAN_HDD_LPASS_H */