xref: /wlan-driver/qcacld-3.0/components/nan/dispatcher/inc/nan_ucfg_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2023 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: contains interface prototypes for OS_IF layer
22  */
23 
24 #ifndef _NAN_UCFG_API_H_
25 #define _NAN_UCFG_API_H_
26 
27 #include "wlan_objmgr_cmn.h"
28 #include "nan_public_structs.h"
29 
30 #define NAN_CONCURRENCY_SUPPORTED(psoc) \
31 	(ucfg_is_nan_dbs_supported(psoc) || \
32 	 ucfg_is_nan_conc_control_supported(psoc))
33 
34 #define NDI_CONCURRENCY_SUPPORTED(psoc) \
35 	(ucfg_is_ndi_dbs_supported(psoc) || \
36 	 ucfg_is_nan_conc_control_supported(psoc))
37 
38 #ifdef WLAN_FEATURE_NAN
39 /**
40  * ucfg_nan_set_ndi_state: set ndi state
41  * @vdev: pointer to vdev object
42  * @state: value to set
43  *
44  * Return: status of operation
45  */
46 #define ucfg_nan_set_ndi_state(vdev, state) \
47 	__ucfg_nan_set_ndi_state(vdev, state, __func__)
48 
49 /**
50  * __ucfg_nan_set_ndi_state: set ndi state
51  * @vdev: pointer to vdev object
52  * @state: value to set
53  * @func: Caller of this API
54  *
55  * Return: status of operation
56  */
57 QDF_STATUS __ucfg_nan_set_ndi_state(struct wlan_objmgr_vdev *vdev,
58 				    enum nan_datapath_state state,
59 				    const char *func);
60 
61 /**
62  * ucfg_nan_psoc_open: Setup NAN priv object params on PSOC open
63  * @psoc: Pointer to PSOC object
64  *
65  * Return: QDF Status of operation
66  */
67 QDF_STATUS ucfg_nan_psoc_open(struct wlan_objmgr_psoc *psoc);
68 
69 /**
70  * ucfg_nan_psoc_close: Clean up NAN priv data on PSOC close
71  * @psoc: Pointer to PSOC object
72  *
73  * Return: None
74  */
75 void ucfg_nan_psoc_close(struct wlan_objmgr_psoc *psoc);
76 
77 /**
78  * ucfg_nan_get_ndi_state: get ndi state from vdev obj
79  * @vdev: pointer to vdev object
80  *
81  * Return: ndi state
82  */
83 enum nan_datapath_state ucfg_nan_get_ndi_state(struct wlan_objmgr_vdev *vdev);
84 
85 /**
86  * ucfg_nan_set_active_peers: set active ndi peer
87  * @vdev: pointer to vdev object
88  * @val: value to set
89  *
90  * Return: status of operation
91  */
92 QDF_STATUS ucfg_nan_set_active_peers(struct wlan_objmgr_vdev *vdev,
93 				     uint32_t val);
94 
95 /**
96  * ucfg_nan_get_active_peers: get active ndi peer from vdev obj
97  * @vdev: pointer to vdev object
98  *
99  * Return: active ndi peer
100  */
101 uint32_t ucfg_nan_get_active_peers(struct wlan_objmgr_vdev *vdev);
102 
103 /**
104  * ucfg_nan_set_peer_mc_list: API to derive peer multicast address and add it
105  *                            to the list
106  * @vdev: pointer to vdev object
107  * @peer_mac_addr: Peer MAC address
108  *
109  * Return: None
110  */
111 void ucfg_nan_set_peer_mc_list(struct wlan_objmgr_vdev *vdev,
112 			       struct qdf_mac_addr peer_mac_addr);
113 
114 /**
115  * ucfg_nan_get_peer_mc_list: API to get peer multicast address list
116  * @vdev: pointer to vdev object
117  * @peer_mc_addr_list: Out pointer to the peer multicast address list
118  *
119  * Return: None
120  */
121 void ucfg_nan_get_peer_mc_list(struct wlan_objmgr_vdev *vdev,
122 			       struct qdf_mac_addr **peer_mc_addr_list);
123 
124 /**
125  * ucfg_nan_clear_peer_mc_list: Clear peer multicast address list
126  * @psoc: pointer to psoc object
127  * @vdev: pointer to vdev object
128  * @peer_mac_addr: Pointer to peer MAC address
129  *
130  * Return: None
131  */
132 void ucfg_nan_clear_peer_mc_list(struct wlan_objmgr_psoc *psoc,
133 				 struct wlan_objmgr_vdev *vdev,
134 				 struct qdf_mac_addr *peer_mac_addr);
135 
136 /**
137  * ucfg_nan_set_ndp_create_transaction_id: set ndp create transaction id
138  * @vdev: pointer to vdev object
139  * @val: value to set
140  *
141  * Return: status of operation
142  */
143 QDF_STATUS ucfg_nan_set_ndp_create_transaction_id(struct wlan_objmgr_vdev *vdev,
144 						  uint16_t val);
145 
146 /**
147  * ucfg_nan_get_ndp_create_transaction_id: get ndp create transaction id
148  * vdev obj
149  * @vdev: pointer to vdev object
150  *
151  * Return: ndp create transaction_id
152  */
153 uint16_t ucfg_nan_get_ndp_create_transaction_id(struct wlan_objmgr_vdev *vdev);
154 
155 /**
156  * ucfg_nan_set_ndp_delete_transaction_id: set ndp delete transaction id
157  * @vdev: pointer to vdev object
158  * @val: value to set
159  *
160  * Return: status of operation
161  */
162 QDF_STATUS ucfg_nan_set_ndp_delete_transaction_id(struct wlan_objmgr_vdev *vdev,
163 						  uint16_t val);
164 
165 /**
166  * ucfg_nan_get_ndp_delete_transaction_id: get ndp delete transaction id from
167  * vdev obj
168  * @vdev: pointer to vdev object
169  *
170  * Return: ndp delete transaction_id
171  */
172 uint16_t ucfg_nan_get_ndp_delete_transaction_id(struct wlan_objmgr_vdev *vdev);
173 
174 /**
175  * ucfg_nan_set_ndi_delete_rsp_reason: set ndi delete response reason
176  * @vdev: pointer to vdev object
177  * @val: value to set
178  *
179  * Return: status of operation
180  */
181 QDF_STATUS ucfg_nan_set_ndi_delete_rsp_reason(struct wlan_objmgr_vdev *vdev,
182 					      uint32_t val);
183 
184 /**
185  * ucfg_nan_get_ndi_delete_rsp_reason: get ndi delete response reason from vdev
186  * obj
187  * @vdev: pointer to vdev object
188  *
189  * Return: ndi delete rsp reason
190  */
191 uint32_t ucfg_nan_get_ndi_delete_rsp_reason(struct wlan_objmgr_vdev *vdev);
192 
193 /**
194  * ucfg_nan_set_ndi_delete_rsp_status: set ndi delete response reason
195  * @vdev: pointer to vdev object
196  * @val: value to set
197  *
198  * Return: status of operation
199  */
200 QDF_STATUS ucfg_nan_set_ndi_delete_rsp_status(struct wlan_objmgr_vdev *vdev,
201 					      uint32_t val);
202 
203 /**
204  * ucfg_nan_get_ndi_delete_rsp_status: get ndi delete response status from vdev
205  * obj
206  * @vdev: pointer to vdev object
207  *
208  * Return: ndi delete rsp status
209  */
210 uint32_t ucfg_nan_get_ndi_delete_rsp_status(struct wlan_objmgr_vdev *vdev);
211 
212 /**
213  * ucfg_nan_get_callbacks: ucfg API to return callbacks
214  * @psoc: pointer to psoc object
215  * @cb_obj: callback struct to populate
216  *
217  * Return: callback struct on success, NULL otherwise
218  */
219 QDF_STATUS ucfg_nan_get_callbacks(struct wlan_objmgr_psoc *psoc,
220 				  struct nan_callbacks *cb_obj);
221 
222 /**
223  * ucfg_nan_req_processor: ucfg API to be called from HDD/OS_IF to
224  * process nan datapath initiator request from userspace
225  * @vdev: nan vdev pointer
226  * @in_req: NDP request
227  * @req_type: type of request
228  *
229  * Return: status of operation
230  */
231 QDF_STATUS ucfg_nan_req_processor(struct wlan_objmgr_vdev *vdev,
232 				  void *in_req, uint32_t req_type);
233 
234 /**
235  * ucfg_nan_datapath_event_handler: ucfg API to be called from legacy code to
236  * post events to os_if/hdd layer
237  * @psoc: pointer to psoc object
238  * @vdev: pointer to vdev object
239  * @type: message type
240  * @msg: msg buffer
241  *
242  * Return: None
243  */
244 void ucfg_nan_datapath_event_handler(struct wlan_objmgr_psoc *psoc,
245 				     struct wlan_objmgr_vdev *vdev,
246 				     uint32_t type, void *msg);
247 
248 /**
249  * ucfg_nan_register_hdd_callbacks: ucfg API to set hdd callbacks
250  * @psoc: pointer to psoc object
251  * @cb_obj: structs containing callbacks
252  *
253  * Return: status of operation
254  */
255 int ucfg_nan_register_hdd_callbacks(struct wlan_objmgr_psoc *psoc,
256 				    struct nan_callbacks *cb_obj);
257 
258 /**
259  * ucfg_nan_register_lim_callbacks: ucfg API to set lim callbacks
260  * @psoc: pointer to psoc object
261  * @cb_obj: structs containing callbacks
262  *
263  * Return: status of operation
264  */
265 int ucfg_nan_register_lim_callbacks(struct wlan_objmgr_psoc *psoc,
266 				    struct nan_callbacks *cb_obj);
267 
268 /**
269  * ucfg_nan_get_callbacks: ucfg API to return callbacks
270  * @psoc: pointer to psoc object
271  * @cb_obj: callback struct to populate
272  *
273  * Return: callback struct on success, NULL otherwise
274  */
275 QDF_STATUS ucfg_nan_get_callbacks(struct wlan_objmgr_psoc *psoc,
276 				  struct nan_callbacks *cb_obj);
277 
278 /**
279  * ucfg_nan_discovery_req: ucfg API for NAN Discovery related requests
280  * @in_req: NAN request
281  * @req_type: Request type
282  *
283  * Return: status of operation
284  */
285 QDF_STATUS ucfg_nan_discovery_req(void *in_req, uint32_t req_type);
286 
287 /**
288  * ucfg_is_nan_conc_control_supported() - is NAN concurrency controlled by host
289  * @psoc: pointer to psoc object
290  *
291  * This function returns NAN concurrency support status
292  *
293  * Return: True if NAN concurrency is controlled by host, False otherwise
294  */
295 bool ucfg_is_nan_conc_control_supported(struct wlan_objmgr_psoc *psoc);
296 
297 /**
298  * ucfg_is_nan_dbs_supported() - ucfg API to query NAN DBS support
299  * @psoc: pointer to psoc object
300  *
301  * This function returns NAN DBS support status
302  *
303  * Return: True if NAN DBS is supported, False otherwise
304  */
305 bool ucfg_is_nan_dbs_supported(struct wlan_objmgr_psoc *psoc);
306 
307 /**
308  * ucfg_is_ndi_dbs_supported() - ucfg API to query NAN Datapath DBS support
309  * @psoc: pointer to psoc object
310  *
311  * This function returns NDI DBS support status
312  *
313  * Return: True if NDI DBS is supported, False otherwise
314  */
315 bool ucfg_is_ndi_dbs_supported(struct wlan_objmgr_psoc *psoc);
316 
317 /**
318  * ucfg_is_nan_sap_supported() - ucfg API to query NAN SAP support
319  * @psoc: pointer to psoc object
320  *
321  * This function returns NAN SAP support status
322  *
323  * Return: True if NAN SAP is supported, False otherwise
324  */
325 bool ucfg_is_nan_sap_supported(struct wlan_objmgr_psoc *psoc);
326 
327 /**
328  * ucfg_is_nan_enable_allowed() - ucfg API to query if NAN Discovery is
329  * allowed
330  * @psoc: pointer to psoc object
331  * @nan_ch_freq: NAN Discovery primary social channel
332  * @vdev_id: Vdev Id
333  *
334  * Return: True if NAN Discovery enable is allowed, False otherwise
335  */
336 bool ucfg_is_nan_enable_allowed(struct wlan_objmgr_psoc *psoc,
337 				uint32_t nan_ch_freq,
338 				uint8_t vdev_id);
339 
340 /**
341  * ucfg_is_nan_disc_active() - ucfg API to query if NAN Discovery is
342  * active
343  * @psoc: pointer to psoc object
344  *
345  * Return: True if NAN Discovery is active, False otherwise
346  */
347 bool ucfg_is_nan_disc_active(struct wlan_objmgr_psoc *psoc);
348 
349 /**
350  * ucfg_nan_set_tgt_caps: ucfg API to set the NAN capabilities of the Target
351  * @psoc: pointer to psoc object
352  * @nan_caps: pointer to the structure of NAN capability bits
353  *
354  * Return: status of operation
355  */
356 void ucfg_nan_set_tgt_caps(struct wlan_objmgr_psoc *psoc,
357 			   struct nan_tgt_caps *nan_caps);
358 
359 /**
360  * ucfg_nan_disable_concurrency: ucfg API to explicitly disable NAN Discovery
361  * @psoc: pointer to psoc object
362  *
363  * Return: None
364  */
365 void ucfg_nan_disable_concurrency(struct wlan_objmgr_psoc *psoc);
366 
367 /**
368  * ucfg_nan_register_wma_callbacks: ucfg API to register WMA callbacks
369  * @psoc: pointer to psoc object
370  * @cb_obj: Pointer to NAN callback structure
371  *
372  * Return: status of operation
373  */
374 int ucfg_nan_register_wma_callbacks(struct wlan_objmgr_psoc *psoc,
375 				    struct nan_callbacks *cb_obj);
376 /**
377  * ucfg_nan_check_and_disable_unsupported_ndi: ucfg API to check if NAN Datapath
378  * is active on multiple NDI's and disable the unsupported concurrencies.
379  * @psoc: pointer to psoc object
380  * @force: When set forces NDI disable
381  *
382  * Return: QDF_STATUS
383  */
384 QDF_STATUS
385 ucfg_nan_check_and_disable_unsupported_ndi(struct wlan_objmgr_psoc *psoc,
386 					   bool force);
387 
388 /**
389  * ucfg_ndi_remove_entry_from_policy_mgr() - API to remove NDI entry from
390  *	policy manager.
391  * @vdev: vdev pointer for NDI interface
392  *
393  * Return: QDF_STATUS
394  */
395 QDF_STATUS ucfg_ndi_remove_entry_from_policy_mgr(struct wlan_objmgr_vdev *vdev);
396 
397 /**
398  * ucfg_nan_is_enable_disable_in_progress() - Is NAN enable/disable in progress
399  * @psoc: Pointer to PSOC object
400  *
401  * Return: True if NAN discovery enable/disable is in progress, false otherwise
402  */
403 bool ucfg_nan_is_enable_disable_in_progress(struct wlan_objmgr_psoc *psoc);
404 
405 /**
406  * ucfg_nan_is_sta_ndp_concurrency_allowed() - Indicates if NDP is allowed
407  * @psoc: pointer to psoc object
408  * @vdev: pointer to vdev object
409  *
410  * If STA+NDI(NDPs) exist and another NDI tries to establish
411  * NDP, then reject the second NDI(NDP).
412  *
413  * Return: true if allowed, false otherwise
414  */
415 bool ucfg_nan_is_sta_ndp_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
416 					     struct wlan_objmgr_vdev *vdev);
417 
418 /**
419  * ucfg_nan_set_vdev_creation_supp_by_fw()- Set the NAN separate vdev psoc param
420  * @psoc: pointer to psoc object
421  * @set: True if firmware supports NAN separate vdev feature
422  *
423  * Cache the value of set in NAN psoc object param.
424  *
425  * Return: None
426  */
427 void
428 ucfg_nan_set_vdev_creation_supp_by_fw(struct wlan_objmgr_psoc *psoc, bool set);
429 
430 /**
431  * ucfg_nan_is_vdev_creation_allowed()- Get support for NAN vdev creation
432  * @psoc: pointer to psoc object
433  *
434  * Return: True if NAN vdev creation is allowed by host and firmware else false
435  */
436 bool ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc *psoc);
437 
438 /**
439  * ucfg_nan_is_sta_nan_ndi_4_port_allowed- Get support for 4 port (STA +
440  * NAN Disc + NDI + NDI)
441  * @psoc: pointer to psoc object
442  *
443  * Return: True if 4 port concurrency allowed or not.
444  */
445 bool ucfg_nan_is_sta_nan_ndi_4_port_allowed(struct wlan_objmgr_psoc *psoc);
446 
447 /**
448  * ucfg_nan_is_beamforming_supported- Get support for beamforing
449  * @psoc: pointer to psoc object
450  *
451  * Return: True if beamforming is supported, false if not.
452  */
453 bool ucfg_nan_is_beamforming_supported(struct wlan_objmgr_psoc *psoc);
454 
455 /**
456  * ucfg_disable_nan_discovery() - Disable NAN discovery
457  * @psoc: pointer to psoc object
458  * @data: Data to be sent to NAN discovery engine, which runs in firmware
459  * @data_len: Length of the data
460  *
461  * Send NAN disable request to firmware by setting the mandatory
462  * params(disable_2g_discovery, disable_5g_discovery) along
463  * with the data, if provided.
464  *
465  * Return: status of operation
466  */
467 QDF_STATUS ucfg_disable_nan_discovery(struct wlan_objmgr_psoc *psoc,
468 				      uint8_t *data, uint32_t data_len);
469 
470 /**
471  * ucfg_nan_disable_ndi() - Disable the NDI with given vdev_id
472  * @psoc: pointer to psoc object
473  * @ndi_vdev_id: vdev_id of the NDI to be disabled
474  *
475  * Disable all the NDPs present on the given NDI by sending NDP_END_ALL
476  * to firmware. Firmwere sends an immediate response(NDP_HOST_UPDATE) with
477  * ndp_disable param as 1 followed by NDP_END indication for all the NDPs.
478  *
479  * Return: status of operation
480  */
481 QDF_STATUS
482 ucfg_nan_disable_ndi(struct wlan_objmgr_psoc *psoc, uint32_t ndi_vdev_id);
483 
484 /**
485  * ucfg_get_nan_feature_config() - Get NAN feature bitmap
486  * @psoc: pointer to psoc object
487  * @nan_feature_config: NAN feature config bitmap to be enabled in firmware
488  *
489  * Return: QDF_STATUS
490  */
491 QDF_STATUS ucfg_get_nan_feature_config(struct wlan_objmgr_psoc *psoc,
492 				       uint32_t *nan_feature_config);
493 
494 /**
495  * ucfg_is_nan_vdev() - Check if the current vdev supports NAN or not
496  * @vdev: pointer to vdev object
497  *
498  * Return true
499  * 1. If the VDEV type is NAN_DISC or
500  * 2. If the VDEV type is STA and nan_separate_iface feature is not supported
501  *
502  * Return: Bool
503  */
504 bool ucfg_is_nan_vdev(struct wlan_objmgr_vdev *vdev);
505 
506 /**
507  * ucfg_nan_disable_ind_to_userspace() - Send NAN disable ind to userspace
508  * @psoc: pointer to psoc object
509  *
510  * Prepare NAN disable indication and send it to userspace
511  *
512  * Return: QDF_STATUS
513  */
514 QDF_STATUS ucfg_nan_disable_ind_to_userspace(struct wlan_objmgr_psoc *psoc);
515 
516 /**
517  * ucfg_is_nan_allowed_on_freq() - Check if NAN is allowed on given freq
518  * @pdev: pdev context
519  * @freq: Frequency to be checked
520  *
521  * Check if NAN/NDP can be enabled on given frequency.
522  * Validate SRD channels based on the ini and reg domain. Assume rest of the
523  * channels support NAN/NDP for now.
524  *
525  * Return: True if NAN is allowed on the given frequency
526  */
527 bool ucfg_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq);
528 
529 /**
530  * ucfg_get_disable_6g_nan() - Get NAN feature configuration for 6GHz
531  * @psoc: pointer to psoc object
532  *
533  * Return: Boolean flag indicating whether the NAN feature is disabled in
534  *         6GHz or not
535  */
536 bool ucfg_get_disable_6g_nan(struct wlan_objmgr_psoc *psoc);
537 
538 /**
539  * ucfg_is_mlo_sta_nan_ndi_allowed()- Get support for MLO STA +
540  * NAN Disc + NDI concurrency
541  * @psoc: pointer to psoc object
542  *
543  * Return: True if mlo sta + nan + ndi concurrency allowed or not.
544  */
545 bool ucfg_is_mlo_sta_nan_ndi_allowed(struct wlan_objmgr_psoc *psoc);
546 
547 #else /* WLAN_FEATURE_NAN */
548 
549 static inline
ucfg_nan_set_tgt_caps(struct wlan_objmgr_psoc * psoc,struct nan_tgt_caps * nan_caps)550 void ucfg_nan_set_tgt_caps(struct wlan_objmgr_psoc *psoc,
551 			   struct nan_tgt_caps *nan_caps)
552 {
553 }
554 
ucfg_nan_disable_concurrency(struct wlan_objmgr_psoc * psoc)555 static inline void ucfg_nan_disable_concurrency(struct wlan_objmgr_psoc *psoc)
556 {
557 }
558 
559 static inline QDF_STATUS
ucfg_nan_check_and_disable_unsupported_ndi(struct wlan_objmgr_psoc * psoc,bool force)560 ucfg_nan_check_and_disable_unsupported_ndi(struct wlan_objmgr_psoc *psoc,
561 					   bool force)
562 {
563 	return QDF_STATUS_SUCCESS;
564 }
565 
ucfg_nan_psoc_open(struct wlan_objmgr_psoc * psoc)566 static inline QDF_STATUS ucfg_nan_psoc_open(struct wlan_objmgr_psoc *psoc)
567 {
568 	return QDF_STATUS_SUCCESS;
569 }
570 
ucfg_nan_psoc_close(struct wlan_objmgr_psoc * psoc)571 static inline void ucfg_nan_psoc_close(struct wlan_objmgr_psoc *psoc)
572 {
573 }
574 
ucfg_is_nan_disc_active(struct wlan_objmgr_psoc * psoc)575 static inline bool ucfg_is_nan_disc_active(struct wlan_objmgr_psoc *psoc)
576 {
577 	return false;
578 }
579 
580 static inline
ucfg_nan_get_ndi_state(struct wlan_objmgr_vdev * vdev)581 enum nan_datapath_state ucfg_nan_get_ndi_state(struct wlan_objmgr_vdev *vdev)
582 {
583 	return NAN_DATA_INVALID_STATE;
584 }
585 
586 static inline
ucfg_nan_is_enable_disable_in_progress(struct wlan_objmgr_psoc * psoc)587 bool ucfg_nan_is_enable_disable_in_progress(struct wlan_objmgr_psoc *psoc)
588 {
589 	return false;
590 }
591 
592 static inline
ucfg_nan_is_sta_ndp_concurrency_allowed(struct wlan_objmgr_psoc * psoc,struct wlan_objmgr_vdev * vdev)593 bool ucfg_nan_is_sta_ndp_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
594 					     struct wlan_objmgr_vdev *vdev)
595 {
596 	return false;
597 }
598 
599 static inline void
ucfg_nan_set_vdev_creation_supp_by_fw(struct wlan_objmgr_psoc * psoc,bool set)600 ucfg_nan_set_vdev_creation_supp_by_fw(struct wlan_objmgr_psoc *psoc, bool set)
601 {
602 }
603 
604 static inline
ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc * psoc)605 bool ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc *psoc)
606 {
607 	return false;
608 }
609 
610 static inline
ucfg_nan_is_sta_nan_ndi_4_port_allowed(struct wlan_objmgr_psoc * psoc)611 bool ucfg_nan_is_sta_nan_ndi_4_port_allowed(struct wlan_objmgr_psoc *psoc)
612 {
613 	return false;
614 }
615 
616 static inline
ucfg_nan_is_beamforming_supported(struct wlan_objmgr_psoc * psoc)617 bool ucfg_nan_is_beamforming_supported(struct wlan_objmgr_psoc *psoc)
618 {
619 	return false;
620 }
621 
622 static inline
ucfg_disable_nan_discovery(struct wlan_objmgr_psoc * psoc,uint8_t * data,uint32_t data_len)623 QDF_STATUS ucfg_disable_nan_discovery(struct wlan_objmgr_psoc *psoc,
624 				      uint8_t *data, uint32_t data_len)
625 {
626 	return QDF_STATUS_SUCCESS;
627 }
628 
629 static inline
630 QDF_STATUS
ucfg_nan_disable_ndi(struct wlan_objmgr_psoc * psoc,uint32_t ndi_vdev_id)631 ucfg_nan_disable_ndi(struct wlan_objmgr_psoc *psoc, uint32_t ndi_vdev_id)
632 {
633 	return QDF_STATUS_E_INVAL;
634 }
635 
636 static inline
ucfg_is_nan_conc_control_supported(struct wlan_objmgr_psoc * psoc)637 bool ucfg_is_nan_conc_control_supported(struct wlan_objmgr_psoc *psoc)
638 {
639 	return false;
640 }
641 
642 static inline
ucfg_get_nan_feature_config(struct wlan_objmgr_psoc * psoc,uint32_t * nan_feature_config)643 QDF_STATUS ucfg_get_nan_feature_config(struct wlan_objmgr_psoc *psoc,
644 				       uint32_t *nan_feature_config)
645 {
646 	return QDF_STATUS_SUCCESS;
647 }
648 
649 static inline
ucfg_is_nan_vdev(struct wlan_objmgr_vdev * vdev)650 bool ucfg_is_nan_vdev(struct wlan_objmgr_vdev *vdev)
651 {
652 	return false;
653 }
654 
655 static inline
ucfg_is_nan_dbs_supported(struct wlan_objmgr_psoc * psoc)656 bool ucfg_is_nan_dbs_supported(struct wlan_objmgr_psoc *psoc)
657 {
658 	return false;
659 }
660 
661 static inline
ucfg_nan_disable_ind_to_userspace(struct wlan_objmgr_psoc * psoc)662 QDF_STATUS ucfg_nan_disable_ind_to_userspace(struct wlan_objmgr_psoc *psoc)
663 {
664 	return QDF_STATUS_SUCCESS;
665 }
666 
667 static inline
ucfg_is_nan_allowed_on_freq(struct wlan_objmgr_pdev * pdev,uint32_t freq)668 bool ucfg_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq)
669 {
670 	return false;
671 }
672 
ucfg_get_disable_6g_nan(struct wlan_objmgr_psoc * psoc)673 static inline bool ucfg_get_disable_6g_nan(struct wlan_objmgr_psoc *psoc)
674 {
675 	return true;
676 }
677 
678 static inline void
ucfg_nan_get_peer_mc_list(struct wlan_objmgr_vdev * vdev,struct qdf_mac_addr ** peer_mc_addr_list)679 ucfg_nan_get_peer_mc_list(struct wlan_objmgr_vdev *vdev,
680 			  struct qdf_mac_addr **peer_mc_addr_list)
681 {
682 }
683 
684 static inline bool
ucfg_is_mlo_sta_nan_ndi_allowed(struct wlan_objmgr_psoc * psoc)685 ucfg_is_mlo_sta_nan_ndi_allowed(struct wlan_objmgr_psoc *psoc)
686 {
687 	return false;
688 }
689 #endif /* WLAN_FEATURE_NAN */
690 #endif /* _NAN_UCFG_API_H_ */
691