blob: 867c4e2182c7d72fc9736b33935913da72472d8c [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Jeff Johnsonc6f3d9a2018-12-31 16:22:39 -08002 * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004 * 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
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080019#ifndef WMA_TGT_CFG_H
20#define WMA_TGT_CFG_H
21
Jeff Johnson0918f242018-07-17 18:52:17 -070022#include "wma_sar_public_structs.h"
Nachiket Kukade85aa3782018-11-02 20:12:34 +053023#include "nan_public_structs.h"
Jeff Johnson0918f242018-07-17 18:52:17 -070024
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080025/**
26 * struct wma_tgt_services - target services
27 * @sta_power_save: sta power save
28 * @uapsd: uapsd
29 * @ap_dfs: ap dfs
30 * @en_11ac: enable 11ac
31 * @arp_offload: arp offload
32 * @early_rx: early rx
33 * @pno_offload: pno offload
34 * @beacon_offload: beacon offload
Krunal Sonie6a1cda2017-09-27 15:23:02 -070035 * @lte_coex_ant_share: LTE coex ant share
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080036 * @en_tdls: enable tdls
37 * @en_tdls_offchan: enable tdls offchan
38 * @en_tdls_uapsd_buf_sta: enable sta tdls uapsd buf
39 * @en_tdls_uapsd_sleep_sta: enable sta tdls uapsd sleep
40 * @en_roam_offload: enable roam offload
Krishna Kumaar Natarajand0bbb3c2017-03-13 17:04:58 -070041 * @en_11ax: enable 11ax
Varun Reddy Yeturu62c32652017-10-26 15:32:35 -070042 * @is_fw_mawc_capable: Motion Aided Wireless Connectivity feature
Varun Reddy Yeturue93d2462018-05-22 13:54:52 -070043 * @twt_requestor: TWT requestor capability
44 * @twt_responder: TWT responder capability
Arunk Khandavallica56d4b2018-11-29 15:46:00 +053045 * @bcn_reception_stats: Beacon Reception stats capability
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080046 */
47struct wma_tgt_services {
48 uint32_t sta_power_save;
Pragaspathi Thilagaraj4b5c0602018-11-14 22:35:23 +053049 bool uapsd;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080050 uint32_t ap_dfs;
51 uint32_t en_11ac;
52 uint32_t arp_offload;
53 uint32_t early_rx;
54#ifdef FEATURE_WLAN_SCAN_PNO
55 bool pno_offload;
56#endif /* FEATURE_WLAN_SCAN_PNO */
57 bool beacon_offload;
mukul sharma72c8b222015-09-04 17:02:01 +053058 bool pmf_offload;
Krunal Sonie6a1cda2017-09-27 15:23:02 -070059 uint32_t lte_coex_ant_share;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080060#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 */
Krishna Kumaar Natarajand0bbb3c2017-03-13 17:04:58 -070069 bool en_11ax;
Will Huang496b36c2017-07-11 16:38:50 +080070 bool get_peer_info_enabled;
Vignesh Viswanathan731186f2017-09-18 13:47:37 +053071 bool is_fils_roaming_supported;
Varun Reddy Yeturu62c32652017-10-26 15:32:35 -070072 bool is_fw_mawc_capable;
Vignesh Viswanathan694e28e2018-01-18 20:53:57 +053073 bool is_11k_offload_supported;
Varun Reddy Yeturue93d2462018-05-22 13:54:52 -070074 bool twt_requestor;
75 bool twt_responder;
Liangwei Dong0da14262018-07-03 03:30:23 -040076 bool obss_scan_offload;
Arunk Khandavallica56d4b2018-11-29 15:46:00 +053077 bool bcn_reception_stats;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080078};
79
80/**
81 * struct wma_tgt_ht_cap - ht capabalitiy
82 * @mpdu_density: mpdu density
83 * @ht_rx_stbc: ht rx stbc
84 * @ht_tx_stbc: ht tx stbc
85 * @ht_rx_ldpc: ht rx ldpc
86 * @ht_sgi_20: ht sgi 20
87 * @ht_sgi_40: ht sgi 40
88 * @num_rf_chains: num of rf chains
89 */
90struct wma_tgt_ht_cap {
91 uint32_t mpdu_density;
92 bool ht_rx_stbc;
93 bool ht_tx_stbc;
94 bool ht_rx_ldpc;
95 bool ht_sgi_20;
96 bool ht_sgi_40;
97 uint32_t num_rf_chains;
98};
99
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800100/**
101 * struct wma_tgt_vht_cap - vht capabalities
102 * @vht_max_mpdu: vht max mpdu
103 * @supp_chan_width: supported channel width
104 * @vht_rx_ldpc: vht rx ldpc
105 * @vht_short_gi_80: vht short gi 80
106 * @vht_short_gi_160: vht short gi 160
107 * @vht_tx_stbc: vht tx stbc
108 * @vht_rx_stbc: vht rx stbc
109 * @vht_su_bformer: vht su bformer
110 * @vht_su_bformee: vht su bformee
111 * @vht_mu_bformer: vht mu bformer
112 * @vht_mu_bformee: vht mu bformee
113 * @vht_max_ampdu_len_exp: vht max ampdu len exp
114 * @vht_txop_ps: vht txop ps
115 */
116struct wma_tgt_vht_cap {
117 uint32_t vht_max_mpdu;
118 uint32_t supp_chan_width;
119 uint32_t vht_rx_ldpc;
120 uint32_t vht_short_gi_80;
121 uint32_t vht_short_gi_160;
122 uint32_t vht_tx_stbc;
123 uint32_t vht_rx_stbc;
124 uint32_t vht_su_bformer;
125 uint32_t vht_su_bformee;
126 uint32_t vht_mu_bformer;
127 uint32_t vht_mu_bformee;
128 uint32_t vht_max_ampdu_len_exp;
129 uint32_t vht_txop_ps;
130};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800131
132/**
Ryan Hsuc6918552018-05-16 13:29:59 -0700133 * struct board_info - Structure for board related information
134 * @bdf_version: board file version
135 * @ref_design_id: reference design id
136 * @customer_id: customer id
137 * @project_id: project id
138 * @board_data_rev: board data revision
139 *
140 * This board information will be stored in board file during the
141 * calibration and customization.
142 *
143 */
144struct board_info {
145 uint32_t bdf_version;
146 uint32_t ref_design_id;
147 uint32_t customer_id;
148 uint32_t project_id;
149 uint32_t board_data_rev;
150};
151
152/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800153 * struct wma_tgt_cfg - target config
154 * @target_fw_version: target fw version
Sandeep Puligilla3d6a8e22016-10-11 18:57:14 -0700155 * @target_fw_vers_ext: target fw extended sub version
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800156 * @band_cap: band capability
157 * @reg_domain: reg domain
158 * @eeprom_rd_ext: eeprom rd ext
159 * @hw_macaddr: hw mcast addr
160 * @services: struct wma_tgt_services
161 * @ht_cap: struct wma_tgt_ht_cap
162 * @vht_cap: struct wma_tgt_vht_cap
163 * @max_intf_count: max interface count
164 * @lpss_support: lpass support
Ryan Hsu3c8f79f2015-12-02 16:45:09 -0800165 * @egap_support: enhanced green ap support
Deepak Dhamdhere13230d32016-05-26 00:46:53 -0700166 * @nan_datapath_enabled: nan data path support
Anurag Chouhan04dbf6d2016-09-08 15:32:52 +0530167 * @bool is_ra_rate_limit_enabled: RA filter support
Krishna Kumaar Natarajand0bbb3c2017-03-13 17:04:58 -0700168 * @he_cap: HE capability received from FW
Arif Hussain759a0232017-03-20 13:17:18 -0700169 * @dfs_cac_offload: dfs and cac timer offloaded
Nachiket Kukade8b4bfd82017-05-25 18:34:48 +0530170 * @tx_bfee_8ss_enabled: Tx Beamformee support for 8x8
gaurank kathpalia5fcefa92018-10-24 15:03:15 +0530171 * @dynamic_nss_chains_update: per vdev dynamic nss, chains update
Rajeev Kumar Sirasanagandla996e5292016-11-22 21:20:33 +0530172 * @rcpi_enabled: for checking rcpi support
Arif Hussainee10f902017-12-27 16:30:17 -0800173 * @obss_detection_offloaded: obss detection offloaded to firmware
Arif Hussain05fb4872018-01-03 16:02:55 -0800174 * @obss_color_collision_offloaded: obss color collision offloaded to firmware
Jeff Johnson0918f242018-07-17 18:52:17 -0700175 * @sar_version: Version of SAR supported by firmware
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800176 */
177struct wma_tgt_cfg {
178 uint32_t target_fw_version;
Sandeep Puligilla3d6a8e22016-10-11 18:57:14 -0700179 uint32_t target_fw_vers_ext;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800180 uint8_t band_cap;
181 uint32_t reg_domain;
182 uint32_t eeprom_rd_ext;
Anurag Chouhan6d760662016-02-20 16:05:43 +0530183 struct qdf_mac_addr hw_macaddr;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800184 struct wma_tgt_services services;
185 struct wma_tgt_ht_cap ht_cap;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800186 struct wma_tgt_vht_cap vht_cap;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800187 uint8_t max_intf_count;
188#ifdef WLAN_FEATURE_LPSS
189 uint8_t lpss_support;
190#endif
191 uint8_t ap_arpns_support;
Krishna Kumaar Natarajan1ae49112015-11-24 21:43:22 -0800192 uint32_t fine_time_measurement_cap;
Anurag Chouhan04dbf6d2016-09-08 15:32:52 +0530193#ifdef FEATURE_WLAN_RA_FILTERING
194 bool is_ra_rate_limit_enabled;
195#endif
Nachiket Kukade2fb1fdb2019-01-08 15:35:27 +0530196#ifdef WLAN_FEATURE_NAN
Deepak Dhamdhere13230d32016-05-26 00:46:53 -0700197 bool nan_datapath_enabled;
198#endif
Naveen Rawat64e477e2016-05-20 10:34:56 -0700199 bool sub_20_support;
Rajeev Kumar Sirasanagandla47873002016-09-09 13:46:09 +0530200 uint16_t wmi_max_len;
Krishna Kumaar Natarajand0bbb3c2017-03-13 17:04:58 -0700201#ifdef WLAN_FEATURE_11AX
Naveen Rawatd8feac12017-09-08 15:08:39 -0700202 tDot11fIEhe_cap he_cap;
Naveen Rawat819158d2018-01-16 10:56:45 -0800203 uint8_t ppet_2g[HE_MAX_PPET_SIZE];
204 uint8_t ppet_5g[HE_MAX_PPET_SIZE];
Jinwei Chen998a1a02018-06-20 17:20:34 +0800205 tDot11fIEhe_cap he_cap_2g;
206 tDot11fIEhe_cap he_cap_5g;
Krishna Kumaar Natarajand0bbb3c2017-03-13 17:04:58 -0700207#endif
Arif Hussain759a0232017-03-20 13:17:18 -0700208 bool dfs_cac_offload;
Nachiket Kukade8b4bfd82017-05-25 18:34:48 +0530209 bool tx_bfee_8ss_enabled;
gaurank kathpalia5fcefa92018-10-24 15:03:15 +0530210 bool dynamic_nss_chains_support;
Rajeev Kumar Sirasanagandla996e5292016-11-22 21:20:33 +0530211 bool rcpi_enabled;
Arif Hussainee10f902017-12-27 16:30:17 -0800212 bool obss_detection_offloaded;
Arif Hussain05fb4872018-01-03 16:02:55 -0800213 bool obss_color_collision_offloaded;
Ryan Hsuc6918552018-05-16 13:29:59 -0700214 uint32_t hw_bd_id;
215 struct board_info hw_bd_info;
Jeff Johnson0918f242018-07-17 18:52:17 -0700216 enum sar_version sar_version;
Nachiket Kukade85aa3782018-11-02 20:12:34 +0530217 struct nan_tgt_caps nan_caps;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800218};
219#endif /* WMA_TGT_CFG_H */