Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 2 | * Copyright (c) 2012-2017 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 | #ifndef __WLAN_HDD_GREEN_AP_H |
| 29 | #define __WLAN_HDD_GREEN_AP_H |
| 30 | |
| 31 | /** |
| 32 | * DOC: wlan_hdd_green_ap.h |
| 33 | * |
| 34 | * WLAN Host Device Driver Green AP API specification |
| 35 | */ |
| 36 | |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 37 | struct hdd_context; |
Jeff Johnson | a7e5eed | 2016-09-28 15:19:13 -0700 | [diff] [blame] | 38 | struct wma_tgt_cfg; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 39 | |
| 40 | #ifdef FEATURE_GREEN_AP |
Jeff Johnson | a7e5eed | 2016-09-28 15:19:13 -0700 | [diff] [blame] | 41 | /** |
| 42 | * hdd_green_ap_init() - Initialize Green AP feature |
| 43 | * @hdd_ctx: HDD global context |
| 44 | * |
| 45 | * Return: none |
| 46 | */ |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 47 | void hdd_green_ap_init(struct hdd_context *hdd_ctx); |
Ryan Hsu | 3c8f79f | 2015-12-02 16:45:09 -0800 | [diff] [blame] | 48 | |
Jeff Johnson | a7e5eed | 2016-09-28 15:19:13 -0700 | [diff] [blame] | 49 | /** |
| 50 | * hdd_green_ap_deinit() - De-initialize Green AP feature |
| 51 | * @hdd_ctx: HDD global context |
| 52 | * |
| 53 | * Return: none |
| 54 | */ |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 55 | void hdd_green_ap_deinit(struct hdd_context *hdd_ctx); |
Jeff Johnson | a7e5eed | 2016-09-28 15:19:13 -0700 | [diff] [blame] | 56 | |
| 57 | /** |
| 58 | * hdd_green_ap_start_bss() - Notify Green AP of Start BSS event |
| 59 | * @hdd_ctx: HDD global context |
| 60 | * |
| 61 | * Return: none |
| 62 | */ |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 63 | void hdd_green_ap_start_bss(struct hdd_context *hdd_ctx); |
Jeff Johnson | a7e5eed | 2016-09-28 15:19:13 -0700 | [diff] [blame] | 64 | |
| 65 | /** |
| 66 | * hdd_green_ap_stop_bss() - Notify Green AP of Stop BSS event |
| 67 | * @hdd_ctx: HDD global context |
| 68 | * |
| 69 | * Return: none |
| 70 | */ |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 71 | void hdd_green_ap_stop_bss(struct hdd_context *hdd_ctx); |
Jeff Johnson | a7e5eed | 2016-09-28 15:19:13 -0700 | [diff] [blame] | 72 | |
| 73 | /** |
| 74 | * hdd_green_ap_add_sta() - Notify Green AP of Add Station event |
| 75 | * @hdd_ctx: HDD global context |
| 76 | * |
| 77 | * Return: none |
| 78 | */ |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 79 | void hdd_green_ap_add_sta(struct hdd_context *hdd_ctx); |
Jeff Johnson | a7e5eed | 2016-09-28 15:19:13 -0700 | [diff] [blame] | 80 | |
| 81 | /** |
| 82 | * hdd_green_ap_del_sta() - Notify Green AP of Delete Station event |
| 83 | * @hdd_ctx: HDD global context |
| 84 | * |
| 85 | * Return: none |
| 86 | */ |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 87 | void hdd_green_ap_del_sta(struct hdd_context *hdd_ctx); |
Jeff Johnson | a7e5eed | 2016-09-28 15:19:13 -0700 | [diff] [blame] | 88 | |
| 89 | /** |
bings | 612b9c4 | 2016-11-07 10:52:03 +0800 | [diff] [blame] | 90 | * hdd_enable_egap() - Enable Enhance Green AP |
| 91 | * @hdd_ctx: HDD global context |
| 92 | * |
| 93 | * Return: 0 on success, negative errno on failure |
| 94 | */ |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 95 | int hdd_enable_egap(struct hdd_context *hdd_ctx); |
bings | 612b9c4 | 2016-11-07 10:52:03 +0800 | [diff] [blame] | 96 | |
| 97 | /** |
Jeff Johnson | a7e5eed | 2016-09-28 15:19:13 -0700 | [diff] [blame] | 98 | * hdd_green_ap_target_config() - Handle Green AP target configuration |
| 99 | * @hdd_ctx: HDD global context where Green AP information is stored |
| 100 | * @target_config: Target configuration containing Green AP info |
| 101 | * |
| 102 | * This function updates the HDD context with Green AP-specific |
| 103 | * information provided by the target. |
| 104 | * |
| 105 | * Return: none |
| 106 | */ |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 107 | void hdd_green_ap_target_config(struct hdd_context *hdd_ctx, |
Jeff Johnson | a7e5eed | 2016-09-28 15:19:13 -0700 | [diff] [blame] | 108 | struct wma_tgt_cfg *target_config); |
| 109 | #else |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 110 | static inline void hdd_green_ap_init(struct hdd_context *hdd_ctx) {} |
| 111 | static inline void hdd_green_ap_deinit(struct hdd_context *hdd_ctx) {} |
| 112 | static inline void hdd_green_ap_start_bss(struct hdd_context *hdd_ctx) {} |
| 113 | static inline void hdd_green_ap_stop_bss(struct hdd_context *hdd_ctx) {} |
| 114 | static inline void hdd_green_ap_add_sta(struct hdd_context *hdd_ctx) {} |
| 115 | static inline void hdd_green_ap_del_sta(struct hdd_context *hdd_ctx) {} |
| 116 | static inline int hdd_enable_egap(struct hdd_context *hdd_ctx) |
bings | 612b9c4 | 2016-11-07 10:52:03 +0800 | [diff] [blame] | 117 | { |
| 118 | return -EINVAL; |
| 119 | } |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 120 | static inline void hdd_green_ap_target_config(struct hdd_context *hdd_ctx, |
Jeff Johnson | a7e5eed | 2016-09-28 15:19:13 -0700 | [diff] [blame] | 121 | struct wma_tgt_cfg *target_config) |
| 122 | { |
| 123 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 124 | #endif /* FEATURE_GREEN_AP */ |
| 125 | #endif /* __WLAN_HDD_GREEN_AP_H */ |