xref: /wlan-driver/qcacld-3.0/core/hdd/src/wlan_hdd_ocb.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2015-2020 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name 
20*5113495bSYour Name #ifndef __WLAN_HDD_OCB_H
21*5113495bSYour Name #define __WLAN_HDD_OCB_H
22*5113495bSYour Name 
23*5113495bSYour Name #include <net/iw_handler.h>
24*5113495bSYour Name #include "sir_api.h"
25*5113495bSYour Name 
26*5113495bSYour Name #define WLAN_OCB_CHANNEL_MAX 5
27*5113495bSYour Name 
28*5113495bSYour Name /**
29*5113495bSYour Name  * struct ocb_qos_params - QoS Parameters for each AC
30*5113495bSYour Name  * @aifsn:  Arbitration Inter-Frame Spacing
31*5113495bSYour Name  * @cwmin:  Contention Window (Min)
32*5113495bSYour Name  * @cwmax:  Contention Window (Max)
33*5113495bSYour Name  */
34*5113495bSYour Name struct ocb_qos_params {
35*5113495bSYour Name 	uint8_t aifsn;
36*5113495bSYour Name 	uint8_t cwmin;
37*5113495bSYour Name 	uint8_t cwmax;
38*5113495bSYour Name };
39*5113495bSYour Name 
40*5113495bSYour Name /**
41*5113495bSYour Name  * struct ocb_channel - Parameters for each OCB channel
42*5113495bSYour Name  * @channel_freq:           Channel Center Frequency (MHz)
43*5113495bSYour Name  * @duration:               Channel Duration (ms)
44*5113495bSYour Name  * @start_guard_interval:   Start Guard Interval (ms)
45*5113495bSYour Name  * @channel_bandwidth:      Channel Bandwidth (MHz)
46*5113495bSYour Name  * @tx_power:               Transmit Power (1/2 dBm)
47*5113495bSYour Name  * @tx_rate:                Transmit Data Rate (mbit)
48*5113495bSYour Name  * @qos_params:             Array of QoS Parameters
49*5113495bSYour Name  * @per_packet_rx_stats:    Enable per packet RX statistics
50*5113495bSYour Name  */
51*5113495bSYour Name struct ocb_channel {
52*5113495bSYour Name 	uint32_t channel_freq;
53*5113495bSYour Name 	uint32_t duration;
54*5113495bSYour Name 	uint32_t start_guard_interval;
55*5113495bSYour Name 	uint32_t channel_bandwidth;
56*5113495bSYour Name 	uint32_t tx_power;
57*5113495bSYour Name 	uint32_t tx_rate;
58*5113495bSYour Name 	struct ocb_qos_params qos_params[QCA_WLAN_AC_ALL];
59*5113495bSYour Name 	uint32_t per_packet_rx_stats;
60*5113495bSYour Name };
61*5113495bSYour Name 
62*5113495bSYour Name /**
63*5113495bSYour Name  * struct dot11p_channel_sched - OCB channel schedule
64*5113495bSYour Name  * @num_channels:   Number of channels
65*5113495bSYour Name  * @channels:       Array of channel parameters
66*5113495bSYour Name  * @off_channel_tx: Enable off channel TX
67*5113495bSYour Name  */
68*5113495bSYour Name struct dot11p_channel_sched {
69*5113495bSYour Name 	uint32_t num_channels;
70*5113495bSYour Name 	struct ocb_channel channels[WLAN_OCB_CHANNEL_MAX];
71*5113495bSYour Name 	uint32_t off_channel_tx;
72*5113495bSYour Name };
73*5113495bSYour Name 
74*5113495bSYour Name /**
75*5113495bSYour Name  * enum qca_wlan_vendor_attr_ocb_set_config - vendor subcmd to set ocb config
76*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_INVALID: invalid value
77*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_CHANNEL_COUNT:
78*5113495bSYour Name  *	number of channels in the configuration
79*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_SCHEDULE_SIZE: size of the schedule
80*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_CHANNEL_ARRAY: array of channels
81*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_SCHEDULE_ARRAY:
82*5113495bSYour Name  *	array of channels to be scheduled
83*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_NDL_CHANNEL_ARRAY:
84*5113495bSYour Name  *	array of NDL channel information
85*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_NDL_ACTIVE_STATE_ARRAY:
86*5113495bSYour Name  *	array of NDL active state configuration
87*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_FLAGS:
88*5113495bSYour Name  *	flag to set the absolute expiry
89*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_AFTER_LAST: number of enumerators
90*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_MAX: last enumerator
91*5113495bSYour Name  */
92*5113495bSYour Name enum qca_wlan_vendor_attr_ocb_set_config {
93*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_INVALID = 0,
94*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_CHANNEL_COUNT,
95*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_SCHEDULE_SIZE,
96*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_CHANNEL_ARRAY,
97*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_SCHEDULE_ARRAY,
98*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_NDL_CHANNEL_ARRAY,
99*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_NDL_ACTIVE_STATE_ARRAY,
100*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_FLAGS,
101*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_AFTER_LAST,
102*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_MAX =
103*5113495bSYour Name 		QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_AFTER_LAST - 1,
104*5113495bSYour Name };
105*5113495bSYour Name 
106*5113495bSYour Name /**
107*5113495bSYour Name  * enum qca_wlan_vendor_attr_ocb_set_utc_time - vendor subcmd to set UTC time
108*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_INVALID: invalid value
109*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_VALUE:
110*5113495bSYour Name  *	the UTC time as an array of 10 bytes
111*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_ERROR:
112*5113495bSYour Name  *	the time error as an array of 5 bytes
113*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_AFTER_LAST: number of enumerators
114*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_MAX: last enumerator
115*5113495bSYour Name  */
116*5113495bSYour Name enum qca_wlan_vendor_attr_ocb_set_utc_time {
117*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_INVALID = 0,
118*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_VALUE,
119*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_ERROR,
120*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_AFTER_LAST,
121*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_MAX =
122*5113495bSYour Name 		QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_AFTER_LAST - 1,
123*5113495bSYour Name };
124*5113495bSYour Name 
125*5113495bSYour Name /**
126*5113495bSYour Name  * enum qca_wlan_vendor_attr_ocb_start_timing_advert - vendor subcmd to start
127*5113495bSYour Name  *						       sending timing advert
128*5113495bSYour Name  *						       frames
129*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_INVALID: invalid value
130*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_CHANNEL_FREQ:
131*5113495bSYour Name  *	channel frequency on which to send the frames
132*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_REPEAT_RATE:
133*5113495bSYour Name  *	number of times the frame is sent in 5 seconds
134*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_AFTER_LAST:
135*5113495bSYour Name  *	number of enumerators
136*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_MAX: last enumerator
137*5113495bSYour Name  */
138*5113495bSYour Name enum qca_wlan_vendor_attr_ocb_start_timing_advert {
139*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_INVALID = 0,
140*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_CHANNEL_FREQ,
141*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_REPEAT_RATE,
142*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_AFTER_LAST,
143*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_MAX =
144*5113495bSYour Name 		QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_AFTER_LAST - 1,
145*5113495bSYour Name };
146*5113495bSYour Name 
147*5113495bSYour Name /**
148*5113495bSYour Name  * enum qca_wlan_vendor_attr_ocb_stop_timing_advert - vendor subcmd to stop
149*5113495bSYour Name  *						      timing advert
150*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_INVALID: invalid value
151*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_CHANNEL_FREQ:
152*5113495bSYour Name  *	the channel frequency on which to stop the timing advert
153*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_AFTER_LAST:
154*5113495bSYour Name  *	number of enumerators
155*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_MAX: last enumerator
156*5113495bSYour Name  */
157*5113495bSYour Name enum qca_wlan_vendor_attr_ocb_stop_timing_advert {
158*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_INVALID = 0,
159*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_CHANNEL_FREQ,
160*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_AFTER_LAST,
161*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_MAX =
162*5113495bSYour Name 		QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_AFTER_LAST - 1,
163*5113495bSYour Name };
164*5113495bSYour Name 
165*5113495bSYour Name /**
166*5113495bSYour Name  * enum qca_wlan_vendor_attr_ocb_get_tsf_resp - vendor subcmd to get TSF
167*5113495bSYour Name  *						timer value
168*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_GET_TSF_RESP_INVALID: invalid value
169*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_GET_TSF_RESP_TIMER_HIGH:
170*5113495bSYour Name  *      higher 32 bits of the timer
171*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_GET_TSF_RESP_TIMER_LOW:
172*5113495bSYour Name  *      lower 32 bits of the timer
173*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_GET_TSF_RESP_AFTER_LAST: number of enumerators
174*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_OCB_GET_TSF_RESP_MAX: last enumerator
175*5113495bSYour Name  */
176*5113495bSYour Name enum qca_wlan_vendor_attr_ocb_get_tsf_resp {
177*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_GET_TSF_RESP_INVALID = 0,
178*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_GET_TSF_RESP_TIMER_HIGH,
179*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_GET_TSF_RESP_TIMER_LOW,
180*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_GET_TSF_RESP_AFTER_LAST,
181*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_OCB_GET_TSF_RESP_MAX =
182*5113495bSYour Name 		QCA_WLAN_VENDOR_ATTR_OCB_GET_TSF_RESP_AFTER_LAST - 1,
183*5113495bSYour Name };
184*5113495bSYour Name 
185*5113495bSYour Name /**
186*5113495bSYour Name  * enum qca_wlan_vendor_attr_dcc_get_stats - vendor subcmd to get
187*5113495bSYour Name  *					     dcc stats
188*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_INVALID: invalid value
189*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_CHANNEL_COUNT:
190*5113495bSYour Name  *      the number of channels in the request array
191*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_REQUEST_ARRAY:
192*5113495bSYour Name  *      array of the channel and information being requested
193*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_AFTER_LAST: number of enumerators
194*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_MAX: last enumerator
195*5113495bSYour Name  */
196*5113495bSYour Name enum qca_wlan_vendor_attr_dcc_get_stats {
197*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_INVALID = 0,
198*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_CHANNEL_COUNT,
199*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_REQUEST_ARRAY,
200*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_AFTER_LAST,
201*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_MAX =
202*5113495bSYour Name 		QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_AFTER_LAST - 1,
203*5113495bSYour Name };
204*5113495bSYour Name 
205*5113495bSYour Name /**
206*5113495bSYour Name  * enum qca_wlan_vendor_attr_dcc_get_stats_resp - response event from get
207*5113495bSYour Name  *						  dcc stats
208*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_RESP_INVALID: invalid value
209*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_RESP_CHANNEL_COUNT:
210*5113495bSYour Name  *      the number of channels in the request array
211*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_RESP_STATS_ARRAY:
212*5113495bSYour Name  *      array of the information being requested
213*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_RESP_AFTER_LAST: number of enumerators
214*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_RESP_MAX: last enumerator
215*5113495bSYour Name  */
216*5113495bSYour Name enum qca_wlan_vendor_attr_dcc_get_stats_resp {
217*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_RESP_INVALID = 0,
218*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_RESP_CHANNEL_COUNT,
219*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_RESP_STATS_ARRAY,
220*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_RESP_AFTER_LAST,
221*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_RESP_MAX =
222*5113495bSYour Name 		QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_RESP_AFTER_LAST - 1,
223*5113495bSYour Name };
224*5113495bSYour Name 
225*5113495bSYour Name /**
226*5113495bSYour Name  * enum qca_wlan_vendor_attr_dcc_clear_stats - vendor subcmd to clear DCC stats
227*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_INVALID: invalid value
228*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_BITMAP:
229*5113495bSYour Name  *      mask of the type of stats to be cleared
230*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_AFTER_LAST: number of enumerators
231*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_MAX: last enumerator
232*5113495bSYour Name  */
233*5113495bSYour Name enum qca_wlan_vendor_attr_dcc_clear_stats {
234*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_INVALID = 0,
235*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_BITMAP,
236*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_AFTER_LAST,
237*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_MAX =
238*5113495bSYour Name 		QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_AFTER_LAST - 1,
239*5113495bSYour Name };
240*5113495bSYour Name 
241*5113495bSYour Name /**
242*5113495bSYour Name  * enum qca_wlan_vendor_attr_dcc_update_ndl - vendor subcmd to update dcc
243*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_INVALID: invalid value
244*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_CHANNEL_COUNT:
245*5113495bSYour Name  *	number of channels in the configuration
246*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_CHANNEL_ARRAY: the array of NDL
247*5113495bSYour Name  *  channel info
248*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_ACTIVE_STATE_ARRAY: the array of
249*5113495bSYour Name  *  NDL active states
250*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_AFTER_LAST: number of enumerators
251*5113495bSYour Name  * @QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_MAX: last enumerator
252*5113495bSYour Name  */
253*5113495bSYour Name enum qca_wlan_vendor_attr_dcc_update_ndl {
254*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_INVALID = 0,
255*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_CHANNEL_COUNT,
256*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_CHANNEL_ARRAY,
257*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_ACTIVE_STATE_ARRAY,
258*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_AFTER_LAST,
259*5113495bSYour Name 	QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_MAX =
260*5113495bSYour Name 		QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_AFTER_LAST - 1,
261*5113495bSYour Name };
262*5113495bSYour Name 
263*5113495bSYour Name struct hdd_context;
264*5113495bSYour Name 
265*5113495bSYour Name #ifdef WLAN_WEXT_SUPPORT_ENABLE
266*5113495bSYour Name 
267*5113495bSYour Name #ifdef WLAN_FEATURE_DSRC
268*5113495bSYour Name int iw_set_dot11p_channel_sched(struct net_device *dev,
269*5113495bSYour Name 				struct iw_request_info *info,
270*5113495bSYour Name 				union iwreq_data *wrqu, char *extra);
271*5113495bSYour Name 
272*5113495bSYour Name extern const struct nla_policy qca_wlan_vendor_ocb_set_config_policy[
273*5113495bSYour Name 			QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_MAX + 1];
274*5113495bSYour Name extern const struct nla_policy qca_wlan_vendor_ocb_set_utc_time_policy[
275*5113495bSYour Name 			QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_MAX + 1];
276*5113495bSYour Name extern const struct nla_policy qca_wlan_vendor_ocb_start_timing_advert_policy[
277*5113495bSYour Name 			QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_MAX + 1];
278*5113495bSYour Name extern const struct nla_policy  qca_wlan_vendor_ocb_stop_timing_advert_policy[
279*5113495bSYour Name 			QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_MAX + 1];
280*5113495bSYour Name extern const struct nla_policy qca_wlan_vendor_dcc_get_stats[
281*5113495bSYour Name 			QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_MAX + 1];
282*5113495bSYour Name extern const struct nla_policy qca_wlan_vendor_dcc_clear_stats[
283*5113495bSYour Name 			QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_MAX + 1];
284*5113495bSYour Name extern const struct nla_policy qca_wlan_vendor_dcc_update_ndl[
285*5113495bSYour Name 			QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_MAX + 1];
286*5113495bSYour Name 
287*5113495bSYour Name #define FEATURE_OCB_VENDOR_COMMANDS					     \
288*5113495bSYour Name {									     \
289*5113495bSYour Name 	.info.vendor_id = QCA_NL80211_VENDOR_ID,			     \
290*5113495bSYour Name 	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_OCB_SET_CONFIG,	     \
291*5113495bSYour Name 	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				     \
292*5113495bSYour Name 		 WIPHY_VENDOR_CMD_NEED_NETDEV |				     \
293*5113495bSYour Name 		 WIPHY_VENDOR_CMD_NEED_RUNNING,				     \
294*5113495bSYour Name 	.doit = wlan_hdd_cfg80211_ocb_set_config,			     \
295*5113495bSYour Name 	vendor_command_policy(qca_wlan_vendor_ocb_set_config_policy,	     \
296*5113495bSYour Name 			      QCA_WLAN_VENDOR_ATTR_OCB_SET_CONFIG_MAX)	     \
297*5113495bSYour Name },									     \
298*5113495bSYour Name 									     \
299*5113495bSYour Name {									     \
300*5113495bSYour Name 	.info.vendor_id = QCA_NL80211_VENDOR_ID,			     \
301*5113495bSYour Name 	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_OCB_SET_UTC_TIME,	     \
302*5113495bSYour Name 	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				     \
303*5113495bSYour Name 		 WIPHY_VENDOR_CMD_NEED_NETDEV |				     \
304*5113495bSYour Name 		 WIPHY_VENDOR_CMD_NEED_RUNNING,				     \
305*5113495bSYour Name 	.doit = wlan_hdd_cfg80211_ocb_set_utc_time,			     \
306*5113495bSYour Name 	vendor_command_policy(qca_wlan_vendor_ocb_set_utc_time_policy,	     \
307*5113495bSYour Name 			      QCA_WLAN_VENDOR_ATTR_OCB_SET_UTC_TIME_MAX)     \
308*5113495bSYour Name },									     \
309*5113495bSYour Name 									     \
310*5113495bSYour Name {									     \
311*5113495bSYour Name 	.info.vendor_id = QCA_NL80211_VENDOR_ID,			     \
312*5113495bSYour Name 	.info.subcmd =							     \
313*5113495bSYour Name 		QCA_NL80211_VENDOR_SUBCMD_OCB_START_TIMING_ADVERT,	     \
314*5113495bSYour Name 	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				     \
315*5113495bSYour Name 		 WIPHY_VENDOR_CMD_NEED_NETDEV |				     \
316*5113495bSYour Name 		 WIPHY_VENDOR_CMD_NEED_RUNNING,				     \
317*5113495bSYour Name 	.doit = wlan_hdd_cfg80211_ocb_start_timing_advert,		     \
318*5113495bSYour Name 	vendor_command_policy(						     \
319*5113495bSYour Name 			qca_wlan_vendor_ocb_start_timing_advert_policy,	     \
320*5113495bSYour Name 			QCA_WLAN_VENDOR_ATTR_OCB_START_TIMING_ADVERT_MAX)    \
321*5113495bSYour Name },									     \
322*5113495bSYour Name 									     \
323*5113495bSYour Name {									     \
324*5113495bSYour Name 	.info.vendor_id = QCA_NL80211_VENDOR_ID,			     \
325*5113495bSYour Name 	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_OCB_STOP_TIMING_ADVERT,     \
326*5113495bSYour Name 	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				     \
327*5113495bSYour Name 		 WIPHY_VENDOR_CMD_NEED_NETDEV |				     \
328*5113495bSYour Name 		 WIPHY_VENDOR_CMD_NEED_RUNNING,				     \
329*5113495bSYour Name 	.doit = wlan_hdd_cfg80211_ocb_stop_timing_advert,		     \
330*5113495bSYour Name 	vendor_command_policy(						     \
331*5113495bSYour Name 			qca_wlan_vendor_ocb_stop_timing_advert_policy,	     \
332*5113495bSYour Name 			QCA_WLAN_VENDOR_ATTR_OCB_STOP_TIMING_ADVERT_MAX)     \
333*5113495bSYour Name },									     \
334*5113495bSYour Name 									     \
335*5113495bSYour Name {									     \
336*5113495bSYour Name 	.info.vendor_id = QCA_NL80211_VENDOR_ID,			     \
337*5113495bSYour Name 	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_OCB_GET_TSF_TIMER,	     \
338*5113495bSYour Name 	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				     \
339*5113495bSYour Name 		 WIPHY_VENDOR_CMD_NEED_NETDEV |				     \
340*5113495bSYour Name 		 WIPHY_VENDOR_CMD_NEED_RUNNING,				     \
341*5113495bSYour Name 	.doit = wlan_hdd_cfg80211_ocb_get_tsf_timer,			     \
342*5113495bSYour Name 	vendor_command_policy(VENDOR_CMD_RAW_DATA, 0)			     \
343*5113495bSYour Name },									     \
344*5113495bSYour Name 									     \
345*5113495bSYour Name {									     \
346*5113495bSYour Name 	.info.vendor_id = QCA_NL80211_VENDOR_ID,			     \
347*5113495bSYour Name 	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DCC_GET_STATS,		     \
348*5113495bSYour Name 	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				     \
349*5113495bSYour Name 		 WIPHY_VENDOR_CMD_NEED_NETDEV |				     \
350*5113495bSYour Name 		 WIPHY_VENDOR_CMD_NEED_RUNNING,				     \
351*5113495bSYour Name 	.doit = wlan_hdd_cfg80211_dcc_get_stats,			     \
352*5113495bSYour Name 	vendor_command_policy(qca_wlan_vendor_dcc_get_stats,		     \
353*5113495bSYour Name 			      QCA_WLAN_VENDOR_ATTR_DCC_GET_STATS_MAX)	     \
354*5113495bSYour Name },									     \
355*5113495bSYour Name 									     \
356*5113495bSYour Name {									     \
357*5113495bSYour Name 	.info.vendor_id = QCA_NL80211_VENDOR_ID,			     \
358*5113495bSYour Name 	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DCC_CLEAR_STATS,	     \
359*5113495bSYour Name 	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				     \
360*5113495bSYour Name 		WIPHY_VENDOR_CMD_NEED_NETDEV |				     \
361*5113495bSYour Name 		WIPHY_VENDOR_CMD_NEED_RUNNING,				     \
362*5113495bSYour Name 	.doit = wlan_hdd_cfg80211_dcc_clear_stats,			     \
363*5113495bSYour Name 	vendor_command_policy(qca_wlan_vendor_dcc_clear_stats,		     \
364*5113495bSYour Name 			      QCA_WLAN_VENDOR_ATTR_DCC_CLEAR_STATS_MAX)	     \
365*5113495bSYour Name },									     \
366*5113495bSYour Name 									     \
367*5113495bSYour Name {									     \
368*5113495bSYour Name 	.info.vendor_id = QCA_NL80211_VENDOR_ID,			     \
369*5113495bSYour Name 	.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DCC_UPDATE_NDL,	     \
370*5113495bSYour Name 	.flags = WIPHY_VENDOR_CMD_NEED_WDEV |				     \
371*5113495bSYour Name 		WIPHY_VENDOR_CMD_NEED_NETDEV |				     \
372*5113495bSYour Name 		WIPHY_VENDOR_CMD_NEED_RUNNING,				     \
373*5113495bSYour Name 	.doit = wlan_hdd_cfg80211_dcc_update_ndl,			     \
374*5113495bSYour Name 	vendor_command_policy(qca_wlan_vendor_dcc_update_ndl,		     \
375*5113495bSYour Name 			      QCA_WLAN_VENDOR_ATTR_DCC_UPDATE_NDL_MAX)	     \
376*5113495bSYour Name },
377*5113495bSYour Name 
378*5113495bSYour Name #else
379*5113495bSYour Name #define FEATURE_OCB_VENDOR_COMMANDS
380*5113495bSYour Name 
381*5113495bSYour Name static inline
iw_set_dot11p_channel_sched(struct net_device * dev,struct iw_request_info * info,union iwreq_data * wrqu,char * extra)382*5113495bSYour Name int iw_set_dot11p_channel_sched(struct net_device *dev,
383*5113495bSYour Name 				struct iw_request_info *info,
384*5113495bSYour Name 				union iwreq_data *wrqu, char *extra)
385*5113495bSYour Name {
386*5113495bSYour Name 	return 0;
387*5113495bSYour Name }
388*5113495bSYour Name #endif
389*5113495bSYour Name #else
390*5113495bSYour Name #define FEATURE_OCB_VENDOR_COMMANDS
391*5113495bSYour Name #endif
392*5113495bSYour Name 
393*5113495bSYour Name #ifdef WLAN_FEATURE_DSRC
394*5113495bSYour Name int wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy,
395*5113495bSYour Name 				     struct wireless_dev *wdev,
396*5113495bSYour Name 				     const void *data,
397*5113495bSYour Name 				     int data_len);
398*5113495bSYour Name 
399*5113495bSYour Name int wlan_hdd_cfg80211_ocb_set_utc_time(struct wiphy *wiphy,
400*5113495bSYour Name 				       struct wireless_dev *wdev,
401*5113495bSYour Name 				       const void *data,
402*5113495bSYour Name 				       int data_len);
403*5113495bSYour Name 
404*5113495bSYour Name int wlan_hdd_cfg80211_ocb_start_timing_advert(struct wiphy *wiphy,
405*5113495bSYour Name 					      struct wireless_dev *wdev,
406*5113495bSYour Name 					      const void *data,
407*5113495bSYour Name 					      int data_len);
408*5113495bSYour Name 
409*5113495bSYour Name int wlan_hdd_cfg80211_ocb_stop_timing_advert(struct wiphy *wiphy,
410*5113495bSYour Name 					     struct wireless_dev *wdev,
411*5113495bSYour Name 					     const void *data,
412*5113495bSYour Name 					     int data_len);
413*5113495bSYour Name 
414*5113495bSYour Name int wlan_hdd_cfg80211_ocb_get_tsf_timer(struct wiphy *wiphy,
415*5113495bSYour Name 					struct wireless_dev *wdev,
416*5113495bSYour Name 					const void *data,
417*5113495bSYour Name 					int data_len);
418*5113495bSYour Name 
419*5113495bSYour Name int wlan_hdd_cfg80211_dcc_get_stats(struct wiphy *wiphy,
420*5113495bSYour Name 				    struct wireless_dev *wdev,
421*5113495bSYour Name 				    const void *data,
422*5113495bSYour Name 				    int data_len);
423*5113495bSYour Name 
424*5113495bSYour Name int wlan_hdd_cfg80211_dcc_clear_stats(struct wiphy *wiphy,
425*5113495bSYour Name 				      struct wireless_dev *wdev,
426*5113495bSYour Name 				      const void *data,
427*5113495bSYour Name 				      int data_len);
428*5113495bSYour Name 
429*5113495bSYour Name int wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy,
430*5113495bSYour Name 				     struct wireless_dev *wdev,
431*5113495bSYour Name 				     const void *data,
432*5113495bSYour Name 				     int data_len);
433*5113495bSYour Name 
434*5113495bSYour Name void wlan_hdd_dcc_register_for_dcc_stats_event(struct hdd_context *hdd_ctx);
435*5113495bSYour Name 
436*5113495bSYour Name void wlan_hdd_dcc_stats_event(void *context_ptr, void *response_ptr);
437*5113495bSYour Name #else
wlan_hdd_cfg80211_ocb_set_config(struct wiphy * wiphy,struct wireless_dev * wdev,const void * data,int data_len)438*5113495bSYour Name static inline int wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy,
439*5113495bSYour Name 		struct wireless_dev *wdev,
440*5113495bSYour Name 		const void *data,
441*5113495bSYour Name 		int data_len)
442*5113495bSYour Name {
443*5113495bSYour Name 	return 0;
444*5113495bSYour Name }
445*5113495bSYour Name 
wlan_hdd_cfg80211_ocb_set_utc_time(struct wiphy * wiphy,struct wireless_dev * wdev,const void * data,int data_len)446*5113495bSYour Name static inline int wlan_hdd_cfg80211_ocb_set_utc_time(struct wiphy *wiphy,
447*5113495bSYour Name 		struct wireless_dev *wdev,
448*5113495bSYour Name 		const void *data,
449*5113495bSYour Name 		int data_len)
450*5113495bSYour Name {
451*5113495bSYour Name 	return 0;
452*5113495bSYour Name }
453*5113495bSYour Name 
wlan_hdd_cfg80211_ocb_start_timing_advert(struct wiphy * wiphy,struct wireless_dev * wdev,const void * data,int data_len)454*5113495bSYour Name static inline int wlan_hdd_cfg80211_ocb_start_timing_advert(struct wiphy *wiphy,
455*5113495bSYour Name 		struct wireless_dev *wdev,
456*5113495bSYour Name 		const void *data,
457*5113495bSYour Name 		int data_len)
458*5113495bSYour Name {
459*5113495bSYour Name 	return 0;
460*5113495bSYour Name }
461*5113495bSYour Name 
wlan_hdd_cfg80211_ocb_stop_timing_advert(struct wiphy * wiphy,struct wireless_dev * wdev,const void * data,int data_len)462*5113495bSYour Name static inline int wlan_hdd_cfg80211_ocb_stop_timing_advert(struct wiphy *wiphy,
463*5113495bSYour Name 		struct wireless_dev *wdev,
464*5113495bSYour Name 		const void *data,
465*5113495bSYour Name 		int data_len)
466*5113495bSYour Name {
467*5113495bSYour Name 	return 0;
468*5113495bSYour Name }
469*5113495bSYour Name 
wlan_hdd_cfg80211_ocb_get_tsf_timer(struct wiphy * wiphy,struct wireless_dev * wdev,const void * data,int data_len)470*5113495bSYour Name static inline int wlan_hdd_cfg80211_ocb_get_tsf_timer(struct wiphy *wiphy,
471*5113495bSYour Name 		struct wireless_dev *wdev,
472*5113495bSYour Name 		const void *data,
473*5113495bSYour Name 		int data_len)
474*5113495bSYour Name {
475*5113495bSYour Name 	return 0;
476*5113495bSYour Name }
477*5113495bSYour Name 
wlan_hdd_cfg80211_dcc_get_stats(struct wiphy * wiphy,struct wireless_dev * wdev,const void * data,int data_len)478*5113495bSYour Name static inline int wlan_hdd_cfg80211_dcc_get_stats(struct wiphy *wiphy,
479*5113495bSYour Name 		struct wireless_dev *wdev,
480*5113495bSYour Name 		const void *data,
481*5113495bSYour Name 		int data_len)
482*5113495bSYour Name {
483*5113495bSYour Name 	return 0;
484*5113495bSYour Name }
485*5113495bSYour Name 
wlan_hdd_cfg80211_dcc_clear_stats(struct wiphy * wiphy,struct wireless_dev * wdev,const void * data,int data_len)486*5113495bSYour Name static inline int wlan_hdd_cfg80211_dcc_clear_stats(struct wiphy *wiphy,
487*5113495bSYour Name 		struct wireless_dev *wdev,
488*5113495bSYour Name 		const void *data,
489*5113495bSYour Name 		int data_len)
490*5113495bSYour Name {
491*5113495bSYour Name 	return 0;
492*5113495bSYour Name }
493*5113495bSYour Name 
wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy * wiphy,struct wireless_dev * wdev,const void * data,int data_len)494*5113495bSYour Name static inline int wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy,
495*5113495bSYour Name 		struct wireless_dev *wdev,
496*5113495bSYour Name 		const void *data,
497*5113495bSYour Name 		int data_len)
498*5113495bSYour Name {
499*5113495bSYour Name 	return 0;
500*5113495bSYour Name }
501*5113495bSYour Name 
wlan_hdd_dcc_register_for_dcc_stats_event(struct hdd_context * hdd_ctx)502*5113495bSYour Name static inline void wlan_hdd_dcc_register_for_dcc_stats_event(
503*5113495bSYour Name 		struct hdd_context *hdd_ctx)
504*5113495bSYour Name {
505*5113495bSYour Name }
506*5113495bSYour Name 
wlan_hdd_dcc_stats_event(void * context_ptr,void * response_ptr)507*5113495bSYour Name static inline void wlan_hdd_dcc_stats_event(void *context_ptr,
508*5113495bSYour Name 		void *response_ptr)
509*5113495bSYour Name {
510*5113495bSYour Name }
511*5113495bSYour Name #endif
512*5113495bSYour Name 
513*5113495bSYour Name #endif /* __WLAN_HDD_OCB_H */
514