blob: eab91f69a89252e4afa55bf84a839ab7a340e1e9 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
2 * Copyright (c) 2013-2015 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 WMA_TGT_CFG_H
29#define WMA_TGT_CFG_H
30
31/**
32 * struct wma_tgt_services - target services
33 * @sta_power_save: sta power save
34 * @uapsd: uapsd
35 * @ap_dfs: ap dfs
36 * @en_11ac: enable 11ac
37 * @arp_offload: arp offload
38 * @early_rx: early rx
39 * @pno_offload: pno offload
40 * @beacon_offload: beacon offload
41 * @lte_coex_ant_share: LTE coex ant share
42 * @en_tdls: enable tdls
43 * @en_tdls_offchan: enable tdls offchan
44 * @en_tdls_uapsd_buf_sta: enable sta tdls uapsd buf
45 * @en_tdls_uapsd_sleep_sta: enable sta tdls uapsd sleep
46 * @en_roam_offload: enable roam offload
47 */
48struct wma_tgt_services {
49 uint32_t sta_power_save;
50 uint32_t uapsd;
51 uint32_t ap_dfs;
52 uint32_t en_11ac;
53 uint32_t arp_offload;
54 uint32_t early_rx;
55#ifdef FEATURE_WLAN_SCAN_PNO
56 bool pno_offload;
57#endif /* FEATURE_WLAN_SCAN_PNO */
58 bool beacon_offload;
59 uint32_t lte_coex_ant_share;
60#ifdef FEATURE_WLAN_TDLS
61 bool en_tdls;
62 bool en_tdls_offchan;
63 bool en_tdls_uapsd_buf_sta;
64 bool en_tdls_uapsd_sleep_sta;
65#endif /* FEATURE_WLAN_TDLS */
66#ifdef WLAN_FEATURE_ROAM_OFFLOAD
67 bool en_roam_offload;
68#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
69};
70
71/**
72 * struct wma_tgt_ht_cap - ht capabalitiy
73 * @mpdu_density: mpdu density
74 * @ht_rx_stbc: ht rx stbc
75 * @ht_tx_stbc: ht tx stbc
76 * @ht_rx_ldpc: ht rx ldpc
77 * @ht_sgi_20: ht sgi 20
78 * @ht_sgi_40: ht sgi 40
79 * @num_rf_chains: num of rf chains
80 */
81struct wma_tgt_ht_cap {
82 uint32_t mpdu_density;
83 bool ht_rx_stbc;
84 bool ht_tx_stbc;
85 bool ht_rx_ldpc;
86 bool ht_sgi_20;
87 bool ht_sgi_40;
88 uint32_t num_rf_chains;
89};
90
91#ifdef WLAN_FEATURE_11AC
92/**
93 * struct wma_tgt_vht_cap - vht capabalities
94 * @vht_max_mpdu: vht max mpdu
95 * @supp_chan_width: supported channel width
96 * @vht_rx_ldpc: vht rx ldpc
97 * @vht_short_gi_80: vht short gi 80
98 * @vht_short_gi_160: vht short gi 160
99 * @vht_tx_stbc: vht tx stbc
100 * @vht_rx_stbc: vht rx stbc
101 * @vht_su_bformer: vht su bformer
102 * @vht_su_bformee: vht su bformee
103 * @vht_mu_bformer: vht mu bformer
104 * @vht_mu_bformee: vht mu bformee
105 * @vht_max_ampdu_len_exp: vht max ampdu len exp
106 * @vht_txop_ps: vht txop ps
107 */
108struct wma_tgt_vht_cap {
109 uint32_t vht_max_mpdu;
110 uint32_t supp_chan_width;
111 uint32_t vht_rx_ldpc;
112 uint32_t vht_short_gi_80;
113 uint32_t vht_short_gi_160;
114 uint32_t vht_tx_stbc;
115 uint32_t vht_rx_stbc;
116 uint32_t vht_su_bformer;
117 uint32_t vht_su_bformee;
118 uint32_t vht_mu_bformer;
119 uint32_t vht_mu_bformee;
120 uint32_t vht_max_ampdu_len_exp;
121 uint32_t vht_txop_ps;
122};
123#endif /* WLAN_FEATURE_11AC */
124
125/**
126 * struct wma_dfs_radar_ind - dfs radar indication
127 * @ieee_chan_number: ieee channel number
128 * @chan_freq: channel freq
129 * @dfs_radar_status: dfs radar status
130 */
131struct wma_dfs_radar_ind {
132 uint8_t ieee_chan_number;
133 uint32_t chan_freq;
134 uint32_t dfs_radar_status;
135};
136
137/**
138 * struct wma_tgt_cfg - target config
139 * @target_fw_version: target fw version
140 * @band_cap: band capability
141 * @reg_domain: reg domain
142 * @eeprom_rd_ext: eeprom rd ext
143 * @hw_macaddr: hw mcast addr
144 * @services: struct wma_tgt_services
145 * @ht_cap: struct wma_tgt_ht_cap
146 * @vht_cap: struct wma_tgt_vht_cap
147 * @max_intf_count: max interface count
148 * @lpss_support: lpass support
149 */
150struct wma_tgt_cfg {
151 uint32_t target_fw_version;
152 uint8_t band_cap;
153 uint32_t reg_domain;
154 uint32_t eeprom_rd_ext;
155 struct cdf_mac_addr hw_macaddr;
156 struct wma_tgt_services services;
157 struct wma_tgt_ht_cap ht_cap;
158#ifdef WLAN_FEATURE_11AC
159 struct wma_tgt_vht_cap vht_cap;
160#endif
161 uint8_t max_intf_count;
162#ifdef WLAN_FEATURE_LPSS
163 uint8_t lpss_support;
164#endif
165 uint8_t ap_arpns_support;
166};
167#endif /* WMA_TGT_CFG_H */