blob: ca3a01faf1eec21ef8f700516e9f64af671c965c [file] [log] [blame]
Sravan Kumar Kairam4af61cf2018-02-22 17:53:44 +05301/*
2 * Copyright (c) 2018 The Linux Foundation. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
19/*
20 * DOC: contains ipa public structure definitions
21 */
22
23#ifndef _WLAN_IPA_PUBLIC_STRUCT_H_
24#define _WLAN_IPA_PUBLIC_STRUCT_H_
25
26#include <wlan_cmn.h>
27#include <qdf_status.h>
28#include <wlan_objmgr_psoc_obj.h>
29
30/**
31 * struct wlan_ipa_config
32 * @ipa_config: IPA config
33 * @desc_size: IPA descriptor size
34 * @txbuf_count: TX buffer count
35 * @bus_bw_high: Bus bandwidth high threshold
36 * @bus_bw_medium: Bus bandwidth medium threshold
37 * @bus_bw_low: Bus bandwidth low threshold
38 * @ipa_bw_high: IPA bandwidth high threshold
39 * @ipa_bw_medium: IPA bandwidth medium threshold
40 * @ipa_bw_low: IPA bandwidth low threshold
41 */
42struct wlan_ipa_config {
43 uint32_t ipa_config;
44 uint32_t desc_size;
45 uint32_t txbuf_count;
46 uint32_t bus_bw_high;
47 uint32_t bus_bw_medium;
48 uint32_t bus_bw_low;
49 uint32_t ipa_bw_high;
50 uint32_t ipa_bw_medium;
51 uint32_t ipa_bw_low;
52};
53
54/**
55 * enum wlan_ipa_wlan_event - WLAN IPA events
56 * @WLAN_IPA_CLIENT_CONNECT: Client Connects
57 * @WLAN_IPA_CLIENT_DISCONNECT: Client Disconnects
58 * @WLAN_IPA_AP_CONNECT: SoftAP is started
59 * @WLAN_IPA_AP_DISCONNECT: SoftAP is stopped
60 * @WLAN_IPA_STA_CONNECT: STA associates to AP
61 * @WLAN_IPA_STA_DISCONNECT: STA dissociates from AP
62 * @WLAN_IPA_CLIENT_CONNECT_EX: Peer associates/re-associates to softap
63 * @WLAN_IPA_WLAN_EVENT_MAX: Max value for the enum
64 */
65enum wlan_ipa_wlan_event {
66 WLAN_IPA_CLIENT_CONNECT,
67 WLAN_IPA_CLIENT_DISCONNECT,
68 WLAN_IPA_AP_CONNECT,
69 WLAN_IPA_AP_DISCONNECT,
70 WLAN_IPA_STA_CONNECT,
71 WLAN_IPA_STA_DISCONNECT,
72 WLAN_IPA_CLIENT_CONNECT_EX,
73 WLAN_IPA_WLAN_EVENT_MAX
74};
75
76/**
77 * struct ipa_uc_offload_control_params - ipa offload control params
78 * @offload_type: ipa offload type
79 * @vdev_id: vdev id
80 * @enable: ipa offload enable/disable
81 */
82struct ipa_uc_offload_control_params {
83 uint32_t offload_type;
84 uint32_t vdev_id;
85 uint32_t enable;
86};
87
88/* fp to send IPA UC offload cmd */
89typedef QDF_STATUS (*ipa_uc_offload_control_req)(struct wlan_objmgr_psoc *psoc,
90 struct ipa_uc_offload_control_params *req);
91#endif /* end of _WLAN_IPA_PUBLIC_STRUCT_H_ */