blob: d0d281ad92f38b21c06eded87a8fd5c813a16efa [file] [log] [blame]
Sravan Kumar Kairamd01b4452018-03-07 17:37:09 +05301/*
2 * Copyright (c) 2013-2018 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#ifndef _WLAN_IPA_CORE_H_
29#define _WLAN_IPA_CORE_H_
30
31#ifdef IPA_OFFLOAD
32
33#include "wlan_ipa_priv.h"
34#include "wlan_ipa_public_struct.h"
35
36/**
37 * wlan_ipa_is_enabled() - Is IPA enabled?
38 * @ipa_cfg: IPA config
39 *
40 * Return: true if IPA is enabled, false otherwise
41 */
42static inline bool wlan_ipa_is_enabled(struct wlan_ipa_config *ipa_cfg)
43{
44 return WLAN_IPA_IS_CONFIG_ENABLED(ipa_cfg, WLAN_IPA_ENABLE_MASK);
45}
46
47/**
48 * wlan_ipa_uc_is_enabled() - Is IPA UC enabled?
49 * @ipa_cfg: IPA config
50 *
51 * Return: true if IPA UC is enabled, false otherwise
52 */
53static inline bool wlan_ipa_uc_is_enabled(struct wlan_ipa_config *ipa_cfg)
54{
55 return WLAN_IPA_IS_CONFIG_ENABLED(ipa_cfg, WLAN_IPA_UC_ENABLE_MASK);
56}
57
58/**
59 * wlan_ipa_setup - IPA initialize and setup
60 * @ipa_ctx: IPA priv obj
61 * @ipa_cfg: IPA config
62 *
63 * Return: QDF_STATUS
64 */
65QDF_STATUS wlan_ipa_setup(struct wlan_ipa_priv *ipa_ctx,
66 struct wlan_ipa_config *ipa_cfg);
67
68/**
69 * wlan_ipa_cleanup - IPA cleanup
70 * @ipa_ctx: IPA priv obj
71 *
72 * Return: QDF_STATUS
73 */
74QDF_STATUS wlan_ipa_cleanup(struct wlan_ipa_priv *ipa_ctx);
75#endif /* IPA_OFFLOAD */
76#endif /* _WLAN_IPA_CORE_H_ */