1 /*
2  * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: Defines main P2P functions & structures
22  */
23 
24 #ifndef _WLAN_P2P_MAIN_H_
25 #define _WLAN_P2P_MAIN_H_
26 
27 #include <qdf_trace.h>
28 #include <qdf_types.h>
29 #include <qdf_event.h>
30 #include <qdf_list.h>
31 #include <qdf_lock.h>
32 #include <qdf_idr.h>
33 #include <qdf_mc_timer.h>
34 #include <wlan_scan_public_structs.h>
35 #include "wlan_p2p_ucfg_api.h"
36 
37 #define MAX_QUEUE_LENGTH 20
38 #define P2P_NOA_ATTR_IND 0x1090
39 #define P2P_MODULE_NAME  "P2P"
40 #define P2P_INVALID_VDEV_ID 0xFFFFFFFF
41 #define MAX_RANDOM_MAC_ADDRS 4
42 
43 #define p2p_debug(params ...) \
44 	QDF_TRACE_DEBUG(QDF_MODULE_ID_P2P, params)
45 #define p2p_info(params ...) \
46 	QDF_TRACE_INFO(QDF_MODULE_ID_P2P, params)
47 #define p2p_warn(params ...) \
48 	QDF_TRACE_WARN(QDF_MODULE_ID_P2P, params)
49 #define p2p_err(params ...) \
50 	QDF_TRACE_ERROR(QDF_MODULE_ID_P2P, params)
51 #define p2p_debug_rl(params...) \
52 	QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_P2P, params)
53 #define p2p_info_rl(params...) \
54 		QDF_TRACE_INFO_RL(QDF_MODULE_ID_P2P, params)
55 
56 #define p2p_alert(params ...) \
57 	QDF_TRACE_FATAL(QDF_MODULE_ID_P2P, params)
58 
59 #define p2p_nofl_debug(params ...) \
60 	QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_P2P, params)
61 #define p2p_nofl_info(params ...) \
62 	QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_P2P, params)
63 #define p2p_nofl_warn(params ...) \
64 	QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_P2P, params)
65 #define p2p_nofl_err(params ...) \
66 	QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_P2P, params)
67 #define p2p_nofl_alert(params ...) \
68 	QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_P2P, params)
69 
70 struct scheduler_msg;
71 struct p2p_tx_cnf;
72 struct p2p_rx_mgmt_frame;
73 struct p2p_lo_event;
74 struct p2p_start_param;
75 struct p2p_noa_info;
76 struct tx_action_context;
77 
78 /**
79  * enum p2p_cmd_type - P2P request type
80  * @P2P_ROC_REQ:            P2P roc request
81  * @P2P_CANCEL_ROC_REQ:     Cancel P2P roc request
82  * @P2P_MGMT_TX:            P2P tx action frame request
83  * @P2P_MGMT_TX_CANCEL:     Cancel tx action frame request
84  * @P2P_CLEANUP_ROC:        Cleanup roc queue
85  * @P2P_CLEANUP_TX:         Cleanup tx mgmt queue
86  * @P2P_SET_RANDOM_MAC: Set Random MAC addr filter request
87  */
88 enum p2p_cmd_type {
89 	P2P_ROC_REQ = 0,
90 	P2P_CANCEL_ROC_REQ,
91 	P2P_MGMT_TX,
92 	P2P_MGMT_TX_CANCEL,
93 	P2P_CLEANUP_ROC,
94 	P2P_CLEANUP_TX,
95 	P2P_SET_RANDOM_MAC,
96 };
97 
98 /**
99  * enum p2p_event_type - P2P event type
100  * @P2P_EVENT_SCAN_EVENT:        P2P scan event
101  * @P2P_EVENT_MGMT_TX_ACK_CNF:   P2P mgmt tx confirm frame
102  * @P2P_EVENT_RX_MGMT:           P2P rx mgmt frame
103  * @P2P_EVENT_LO_STOPPED:        P2P listen offload stopped event
104  * @P2P_EVENT_NOA:               P2P noa event
105  * @P2P_EVENT_ADD_MAC_RSP: Set Random MAC addr event
106  */
107 enum p2p_event_type {
108 	P2P_EVENT_SCAN_EVENT = 0,
109 	P2P_EVENT_MGMT_TX_ACK_CNF,
110 	P2P_EVENT_RX_MGMT,
111 	P2P_EVENT_LO_STOPPED,
112 	P2P_EVENT_NOA,
113 	P2P_EVENT_ADD_MAC_RSP,
114 };
115 
116 /**
117  * struct p2p_tx_conf_event - p2p tx confirm event
118  * @p2p_soc_obj:        p2p soc private object
119  * @nbuf:               buffer address
120  * @status:             tx status
121  */
122 struct p2p_tx_conf_event {
123 	struct p2p_soc_priv_obj *p2p_soc_obj;
124 	qdf_nbuf_t nbuf;
125 	uint32_t status;
126 };
127 
128 /**
129  * struct p2p_rx_mgmt_event - p2p rx mgmt frame event
130  * @p2p_soc_obj:        p2p soc private object
131  * @rx_mgmt:            p2p rx mgmt frame structure
132  */
133 struct p2p_rx_mgmt_event {
134 	struct p2p_soc_priv_obj *p2p_soc_obj;
135 	struct p2p_rx_mgmt_frame *rx_mgmt;
136 };
137 
138 /**
139  * struct p2p_lo_stop_event - p2p listen offload stop event
140  * @p2p_soc_obj:        p2p soc private object
141  * @lo_event:           p2p lo stop structure
142  */
143 struct p2p_lo_stop_event {
144 	struct p2p_soc_priv_obj *p2p_soc_obj;
145 	struct p2p_lo_event *lo_event;
146 };
147 
148 /**
149  * struct p2p_noa_event - p2p noa event
150  * @p2p_soc_obj:        p2p soc private object
151  * @noa_info:           p2p noa information structure
152  */
153 struct p2p_noa_event {
154 	struct p2p_soc_priv_obj *p2p_soc_obj;
155 	struct p2p_noa_info *noa_info;
156 };
157 
158 /**
159  * struct p2p_mac_filter_rsp - p2p set mac filter respone
160  * @p2p_soc_obj: p2p soc private object
161  * @vdev_id: vdev id
162  * @status: successfully(1) or not (0)
163  */
164 struct p2p_mac_filter_rsp {
165 	struct p2p_soc_priv_obj *p2p_soc_obj;
166 	uint32_t vdev_id;
167 	uint32_t status;
168 };
169 
170 #ifdef WLAN_FEATURE_P2P_DEBUG
171 /**
172  * enum p2p_connection_status - p2p connection status
173  * @P2P_NOT_ACTIVE:                P2P not active status
174  * @P2P_GO_NEG_PROCESS:            P2P GO negotiation in process
175  * @P2P_GO_NEG_COMPLETED:          P2P GO negotiation complete
176  * @P2P_CLIENT_CONNECTING_STATE_1: P2P client connecting state 1
177  * @P2P_GO_COMPLETED_STATE:        P2P GO complete state
178  * @P2P_CLIENT_CONNECTED_STATE_1:  P2P client connected state 1
179  * @P2P_CLIENT_DISCONNECTED_STATE: P2P client disconnected state
180  * @P2P_CLIENT_CONNECTING_STATE_2: P2P client connecting state 2
181  * @P2P_CLIENT_COMPLETED_STATE:    P2P client complete state
182  */
183 enum p2p_connection_status {
184 	P2P_NOT_ACTIVE,
185 	P2P_GO_NEG_PROCESS,
186 	P2P_GO_NEG_COMPLETED,
187 	P2P_CLIENT_CONNECTING_STATE_1,
188 	P2P_GO_COMPLETED_STATE,
189 	P2P_CLIENT_CONNECTED_STATE_1,
190 	P2P_CLIENT_DISCONNECTED_STATE,
191 	P2P_CLIENT_CONNECTING_STATE_2,
192 	P2P_CLIENT_COMPLETED_STATE
193 };
194 
195 /**
196  * p2p_status_update() - Update p2p connection status
197  * @p2p_soc_obj: p2p priv object
198  * @status: p2p connection status
199  *
200  * Return: void
201  */
202 void p2p_status_update(struct p2p_soc_priv_obj *p2p_soc_obj,
203 		       enum p2p_connection_status status);
204 #endif
205 
206 /**
207  * struct p2p_param - p2p parameters to be used
208  * @go_keepalive_period:            P2P GO keep alive period
209  * @go_link_monitor_period:         period where link is idle and
210  *                                  where we send NULL frame
211  * @p2p_device_addr_admin:          enable/disable to derive the P2P
212  *                                  MAC address from the primary MAC address
213  * @skip_dfs_channel_p2p_search:    skip DFS Channel in case of P2P Search
214  * @is_random_seq_num_enabled:      Flag to generate random sequence numbers
215  * @indoor_channel_support:         support to allow GO in indoor channels
216  * @go_ignore_non_p2p_probe_req:    P2P GO ignore non-P2P probe req
217  */
218 struct p2p_param {
219 	uint32_t go_keepalive_period;
220 	uint32_t go_link_monitor_period;
221 	bool p2p_device_addr_admin;
222 	bool is_random_seq_num_enabled;
223 	bool indoor_channel_support;
224 	bool go_ignore_non_p2p_probe_req;
225 };
226 
227 /**
228  * struct p2p_soc_priv_obj - Per SoC p2p private object
229  * @soc:              Pointer to SoC context
230  * @roc_q:            Queue for pending roc requests
231  * @tx_q_roc:         Queue for tx frames waiting for RoC
232  * @tx_q_ack:         Queue for tx frames waiting for ack
233  * @scan_req_id:      Scan requestor id
234  * @start_param:      Start parameters, include callbacks and user
235  *                    data to HDD
236  * @cancel_roc_done:  Cancel roc done event
237  * @cleanup_roc_done: Cleanup roc done event
238  * @cleanup_tx_done:  Cleanup tx done event
239  * @roc_runtime_lock: Runtime lock for roc request
240  * @p2p_cb: Callbacks to protocol stack
241  * @cur_roc_vdev_id:  Vdev id of current roc
242  * @p2p_idr:          p2p idr
243  * @param:            p2p parameters to be used
244  * @connection_status:Global P2P connection status
245  * @mcc_quota_ev_os_if_cb:  callback to OS IF to indicate mcc quota event
246  */
247 struct p2p_soc_priv_obj {
248 	struct wlan_objmgr_psoc *soc;
249 	qdf_list_t roc_q;
250 	qdf_list_t tx_q_roc;
251 	qdf_list_t tx_q_ack;
252 	wlan_scan_requester scan_req_id;
253 	struct p2p_start_param *start_param;
254 	qdf_event_t cleanup_roc_done;
255 	qdf_event_t cleanup_tx_done;
256 	qdf_runtime_lock_t roc_runtime_lock;
257 	struct p2p_protocol_callbacks p2p_cb;
258 	uint32_t cur_roc_vdev_id;
259 	qdf_idr p2p_idr;
260 	struct p2p_param param;
261 #ifdef WLAN_FEATURE_P2P_DEBUG
262 	enum p2p_connection_status connection_status;
263 #endif
264 #ifdef WLAN_FEATURE_MCC_QUOTA
265 	mcc_quota_event_callback mcc_quota_ev_os_if_cb;
266 #endif
267 };
268 
269 /**
270  * struct action_frame_cookie - Action frame cookie item in cookie list
271  * @cookie_node: qdf_list_node
272  * @cookie: Cookie value
273  */
274 struct action_frame_cookie {
275 	qdf_list_node_t cookie_node;
276 	uint64_t cookie;
277 };
278 
279 /**
280  * struct action_frame_random_mac - Action Frame random mac addr &
281  * related attrs
282  * @p2p_vdev_obj: p2p vdev private obj ptr
283  * @in_use: Checks whether random mac is in use
284  * @addr: Contains random mac addr
285  * @freq: Channel frequency
286  * @clear_timer: timer to clear random mac filter
287  * @cookie_list: List of cookies tied with random mac
288  */
289 struct action_frame_random_mac {
290 	struct p2p_vdev_priv_obj *p2p_vdev_obj;
291 	bool in_use;
292 	uint8_t addr[QDF_MAC_ADDR_SIZE];
293 	uint32_t freq;
294 	qdf_mc_timer_t clear_timer;
295 	qdf_list_t cookie_list;
296 };
297 
298 /**
299  * typedef p2p_request_mgr_callback_t() - callback to process set mac filter
300  *                                        result
301  * @result: bool
302  * @context: callback context.
303  *
304  * Return: void
305  */
306 typedef void (*p2p_request_mgr_callback_t)(bool result, void *context);
307 
308 /**
309  * struct random_mac_priv - request private data struct
310  * @result: result of request.
311  */
312 struct random_mac_priv {
313 	bool result;
314 };
315 
316 /**
317  * struct p2p_set_mac_filter_req - set mac addr filter cmd data structure
318  * @soc: soc object
319  * @vdev_id: vdev id
320  * @mac: mac address to be set
321  * @freq: frequency
322  * @set: set or clear
323  * @cb: callback func to be called when the request completion
324  * @req_cookie: cookie to be used when request completed
325  */
326 struct p2p_set_mac_filter_req {
327 	struct wlan_objmgr_psoc *soc;
328 	uint32_t vdev_id;
329 	uint8_t mac[QDF_MAC_ADDR_SIZE];
330 	uint32_t freq;
331 	bool set;
332 	p2p_request_mgr_callback_t cb;
333 	void *req_cookie;
334 };
335 
336 /**
337  * struct p2p_vdev_priv_obj - Per vdev p2p private object
338  * @vdev:               Pointer to vdev context
339  * @noa_info:           NoA information
340  * @noa_status:         NoA status i.e. Enabled / Disabled (TRUE/FALSE)
341  * @non_p2p_peer_count: Number of legacy stations connected to this GO
342  * @random_mac_lock:    lock for random_mac list
343  * @random_mac:         active random mac filter lists
344  * @pending_req:        pending set mac filter request.
345  * @prev_action_frame_addr2: Address2 field (TA) of the last transmitted
346  *                           action frame.
347  */
348 struct p2p_vdev_priv_obj {
349 	struct   wlan_objmgr_vdev *vdev;
350 	struct   p2p_noa_info *noa_info;
351 	bool     noa_status;
352 	uint16_t non_p2p_peer_count;
353 
354 	/* random address management for management action frames */
355 	qdf_spinlock_t random_mac_lock;
356 	struct action_frame_random_mac random_mac[MAX_RANDOM_MAC_ADDRS];
357 	struct p2p_set_mac_filter_req pending_req;
358 	uint8_t prev_action_frame_addr2[QDF_MAC_ADDR_SIZE];
359 };
360 
361 /**
362  * struct p2p_noa_attr - p2p noa attribute
363  * @rsvd1:             reserved bits 1
364  * @opps_ps:           opps ps state of the AP
365  * @ct_win:            ct window in TUs
366  * @index:             identifies instance of NOA su element
367  * @rsvd2:             reserved bits 2
368  * @noa1_count:        interval count of noa1
369  * @noa1_duration:     absent period duration of noa1
370  * @noa1_interval:     absent period interval of noa1
371  * @noa1_start_time:   32 bit tsf time of noa1
372  * @rsvd3:             reserved bits 3
373  * @noa2_count:        interval count of noa2
374  * @noa2_duration:     absent period duration of noa2
375  * @noa2_interval:     absent period interval of noa2
376  * @noa2_start_time:   32 bit tsf time of noa2
377  */
378 struct p2p_noa_attr {
379 	uint32_t rsvd1:16;
380 	uint32_t ct_win:7;
381 	uint32_t opps_ps:1;
382 	uint32_t index:8;
383 	uint32_t rsvd2:24;
384 	uint32_t noa1_count:8;
385 	uint32_t noa1_duration;
386 	uint32_t noa1_interval;
387 	uint32_t noa1_start_time;
388 	uint32_t rsvd3:24;
389 	uint32_t noa2_count:8;
390 	uint32_t noa2_duration;
391 	uint32_t noa2_interval;
392 	uint32_t noa2_start_time;
393 };
394 
395 /**
396  * p2p_component_init() - P2P component initialization
397  *
398  * This function registers psoc/vdev create/delete handler.
399  *
400  * Return: QDF_STATUS_SUCCESS - in case of success
401  */
402 QDF_STATUS p2p_component_init(void);
403 
404 /**
405  * p2p_component_deinit() - P2P component de-init
406  *
407  * This function deregisters psoc/vdev create/delete handler.
408  *
409  * Return: QDF_STATUS_SUCCESS - in case of success
410  */
411 QDF_STATUS p2p_component_deinit(void);
412 
413 /**
414  * p2p_psoc_object_open() - Open P2P component
415  * @soc: soc context
416  *
417  * This function initialize p2p psoc object
418  *
419  * Return: QDF_STATUS_SUCCESS - in case of success
420  */
421 QDF_STATUS p2p_psoc_object_open(struct wlan_objmgr_psoc *soc);
422 
423 /**
424  * p2p_psoc_object_close() - Close P2P component
425  * @soc: soc context
426  *
427  * This function de-init p2p psoc object.
428  *
429  * Return: QDF_STATUS_SUCCESS - in case of success
430  */
431 QDF_STATUS p2p_psoc_object_close(struct wlan_objmgr_psoc *soc);
432 
433 /**
434  * p2p_psoc_start() - Start P2P component
435  * @soc: soc context
436  * @req: P2P start parameters
437  *
438  * This function sets up layer call back in p2p psoc object
439  *
440  * Return: QDF_STATUS_SUCCESS - in case of success
441  */
442 QDF_STATUS p2p_psoc_start(struct wlan_objmgr_psoc *soc,
443 	struct p2p_start_param *req);
444 
445 /**
446  * p2p_psoc_stop() - Stop P2P component
447  * @soc: soc context
448  *
449  * This function clears up layer call back in p2p psoc object.
450  *
451  * Return: QDF_STATUS_SUCCESS - in case of success
452  */
453 QDF_STATUS p2p_psoc_stop(struct wlan_objmgr_psoc *soc);
454 
455 /**
456  * p2p_process_cmd() - Process P2P messages in OS interface queue
457  * @msg: message information
458  *
459  * This function is main handler for P2P messages in OS interface
460  * queue, it gets called by message scheduler.
461  *
462  * Return: QDF_STATUS_SUCCESS - in case of success
463  */
464 QDF_STATUS p2p_process_cmd(struct scheduler_msg *msg);
465 
466 /**
467  * p2p_process_evt() - Process P2P messages in target interface queue
468  * @msg: message information
469  *
470  * This function is main handler for P2P messages in target interface
471  * queue, it gets called by message scheduler.
472  *
473  * Return: QDF_STATUS_SUCCESS - in case of success
474  */
475 QDF_STATUS p2p_process_evt(struct scheduler_msg *msg);
476 
477 /**
478  * p2p_msg_flush_callback() - Callback used to flush P2P messages
479  * @msg: message information
480  *
481  * This callback will be called when scheduler flush some of P2P messages.
482  *
483  * Return: QDF_STATUS_SUCCESS - in case of success
484  */
485 QDF_STATUS p2p_msg_flush_callback(struct scheduler_msg *msg);
486 
487 /**
488  * p2p_event_flush_callback() - Callback used to flush P2P events
489  * @msg: event information
490  *
491  * This callback will be called when scheduler flush some of P2P events.
492  *
493  * Return: QDF_STATUS_SUCCESS - in case of success
494  */
495 QDF_STATUS p2p_event_flush_callback(struct scheduler_msg *msg);
496 
497 /**
498  * p2p_check_oui_and_force_1x1() - Function to get P2P client device
499  * attributes from assoc request frame IE passed in.
500  * @assoc_ie:     Pointer to the IEs in the association req frame
501  * @assoc_ie_len: Total length of the IE in association req frame
502  *
503  * Return: true if the OUI is present else false
504  */
505 bool p2p_check_oui_and_force_1x1(uint8_t *assoc_ie, uint32_t assoc_ie_len);
506 
507 #ifdef FEATURE_P2P_LISTEN_OFFLOAD
508 /**
509  * p2p_process_lo_stop() - Process lo stop event
510  * @lo_stop_event: listen offload stop event information
511  *
512  * This function handles listen offload stop event and deliver this
513  * event to HDD layer by registered callback.
514  *
515  * Return: QDF_STATUS_SUCCESS - in case of success
516  */
517 QDF_STATUS p2p_process_lo_stop(
518 	struct p2p_lo_stop_event *lo_stop_event);
519 #else
p2p_process_lo_stop(struct p2p_lo_stop_event * lo_stop_event)520 static inline QDF_STATUS p2p_process_lo_stop(
521 	struct p2p_lo_stop_event *lo_stop_event)
522 {
523 	return QDF_STATUS_SUCCESS;
524 }
525 #endif
526 /**
527  * p2p_process_noa() - Process noa event
528  * @noa_event: noa event information
529  *
530  * This function handles noa event and save noa information in p2p
531  * vdev object.
532  *
533  * Return: QDF_STATUS_SUCCESS - in case of success
534  */
535 QDF_STATUS p2p_process_noa(struct p2p_noa_event *noa_event);
536 
537 #ifdef WLAN_FEATURE_P2P_DEBUG
538 /**
539  * p2p_status_scan() - Update P2P connection status
540  * @vdev: vdev context
541  *
542  * This function updates P2P connection status when scanning
543  *
544  * Return: QDF_STATUS_SUCCESS - in case of success
545  */
546 QDF_STATUS p2p_status_scan(struct wlan_objmgr_vdev *vdev);
547 
548 /**
549  * p2p_status_connect() - Update P2P connection status
550  * @vdev:        vdev context
551  *
552  * This function updates P2P connection status when connecting.
553  *
554  * Return: QDF_STATUS_SUCCESS - in case of success
555  */
556 QDF_STATUS p2p_status_connect(struct wlan_objmgr_vdev *vdev);
557 
558 /**
559  * p2p_status_disconnect() - Update P2P connection status
560  * @vdev:        vdev context
561  *
562  * This function updates P2P connection status when disconnecting.
563  *
564  * Return: QDF_STATUS_SUCCESS - in case of success
565  */
566 QDF_STATUS p2p_status_disconnect(struct wlan_objmgr_vdev *vdev);
567 
568 /**
569  * p2p_status_start_bss() - Update P2P connection status
570  * @vdev:        vdev context
571  *
572  * This function updates P2P connection status when starting BSS.
573  *
574  * Return: QDF_STATUS_SUCCESS - in case of success
575  */
576 QDF_STATUS p2p_status_start_bss(struct wlan_objmgr_vdev *vdev);
577 
578 /**
579  * p2p_status_stop_bss() - Update P2P connection status
580  * @vdev:        vdev context
581  *
582  * This function updates P2P connection status when stopping BSS.
583  *
584  * Return: QDF_STATUS_SUCCESS - in case of success
585  */
586 QDF_STATUS p2p_status_stop_bss(struct wlan_objmgr_vdev *vdev);
587 #else
p2p_status_scan(struct wlan_objmgr_vdev * vdev)588 static inline QDF_STATUS p2p_status_scan(struct wlan_objmgr_vdev *vdev)
589 {
590 	return QDF_STATUS_SUCCESS;
591 }
592 
p2p_status_connect(struct wlan_objmgr_vdev * vdev)593 static inline QDF_STATUS p2p_status_connect(struct wlan_objmgr_vdev *vdev)
594 {
595 	return QDF_STATUS_SUCCESS;
596 }
597 
p2p_status_disconnect(struct wlan_objmgr_vdev * vdev)598 static inline QDF_STATUS p2p_status_disconnect(struct wlan_objmgr_vdev *vdev)
599 {
600 	return QDF_STATUS_SUCCESS;
601 }
602 
p2p_status_start_bss(struct wlan_objmgr_vdev * vdev)603 static inline QDF_STATUS p2p_status_start_bss(struct wlan_objmgr_vdev *vdev)
604 {
605 	return QDF_STATUS_SUCCESS;
606 }
607 
p2p_status_stop_bss(struct wlan_objmgr_vdev * vdev)608 static inline QDF_STATUS p2p_status_stop_bss(struct wlan_objmgr_vdev *vdev)
609 {
610 	return QDF_STATUS_SUCCESS;
611 }
612 #endif /* WLAN_FEATURE_P2P_DEBUG */
613 #ifdef WLAN_FEATURE_P2P_P2P_STA
614 /**
615  * p2p_check_and_force_scc_go_plus_go() - Check and do force scc for
616  * go plus go
617  * @psoc: psoc object
618  * @vdev: vdev object
619  *
620  * This function checks whether force scc is enabled or not. If it
621  * is enabled then it will do force scc to remaining p2p go vdev if
622  * user has initiated CSA to current vdev.
623  *
624  * Return: status
625  */
626 
627 QDF_STATUS
628 p2p_check_and_force_scc_go_plus_go(struct wlan_objmgr_psoc *psoc,
629 				   struct wlan_objmgr_vdev *vdev);
630 #endif /* WLAN_FEATURE_P2P_P2P_STA */
631 #endif /* _WLAN_P2P_MAIN_H_ */
632