1 /*
2 * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
3 *
4 * 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
19 /**
20 * DOC: nan_datapath.h
21 *
22 * MAC NAN Data path API specification
23 */
24
25 #ifndef __MAC_NAN_DATAPATH_H
26 #define __MAC_NAN_DATAPATH_H
27
28 #ifdef WLAN_FEATURE_NAN
29
30 #include "sir_common.h"
31 #include "ani_global.h"
32 #include "sir_params.h"
33
34 struct peer_nan_datapath_map;
35
36 /**
37 * lim_process_ndi_mlm_add_bss_rsp() - Process ADD_BSS response for NDI
38 * @mac_ctx: Pointer to Global MAC structure
39 * @add_bss_rsp: Bss params including rsp data
40 * @session_entry: PE session
41 *
42 * Return: None
43 */
44 void lim_process_ndi_mlm_add_bss_rsp(struct mac_context *mac_ctx,
45 struct add_bss_rsp *add_bss_rsp,
46 struct pe_session *session_entry);
47 /* Handler for DEL BSS resp for NDI interface */
48
49 /**
50 * lim_ndi_del_bss_rsp() - Handler for DEL BSS resp for NDI interface
51 * @mac_ctx: handle to mac structure
52 * @del_bss: pointer to del bss response
53 * @session_entry: session entry
54 *
55 * Return: None
56 */
57 void lim_ndi_del_bss_rsp(struct mac_context * mac_ctx,
58 struct del_bss_resp *del_bss,
59 struct pe_session *session_entry);
60
61 void lim_ndp_add_sta_rsp(struct mac_context *mac_ctx,
62 struct pe_session *session_entry,
63 tAddStaParams *add_sta_rsp);
64
65 void lim_process_ndi_del_sta_rsp(struct mac_context *mac_ctx,
66 struct scheduler_msg *lim_msg,
67 struct pe_session *pe_session);
68
69 QDF_STATUS lim_add_ndi_peer_converged(uint32_t vdev_id,
70 struct qdf_mac_addr peer_mac_addr);
71
72 void lim_ndp_delete_peers_converged(struct peer_nan_datapath_map *ndp_map,
73 uint8_t num_peers);
74
75 void lim_ndp_delete_peers_by_addr_converged(uint8_t vdev_id,
76 struct qdf_mac_addr peer_ndi_mac_addr);
77
78 #else
79 static inline
lim_process_ndi_mlm_add_bss_rsp(struct mac_context * mac_ctx,struct add_bss_rsp * add_bss_rsp,struct pe_session * session_entry)80 void lim_process_ndi_mlm_add_bss_rsp(struct mac_context *mac_ctx,
81 struct add_bss_rsp *add_bss_rsp,
82 struct pe_session *session_entry)
83 {
84 }
85
86 /**
87 * lim_ndi_del_bss_rsp() - Handler for DEL BSS resp for NDI interface
88 * @mac_ctx: handle to mac structure
89 * @del_bss: pointer to del bss response
90 * @session_entry: session entry
91 *
92 * Return: None
93 */
94 static inline
lim_ndi_del_bss_rsp(struct mac_context * mac_ctx,struct del_bss_resp * del_bss,struct pe_session * session_entry)95 void lim_ndi_del_bss_rsp(struct mac_context *mac_ctx,
96 struct del_bss_resp *del_bss,
97 struct pe_session *session_entry)
98 {
99 }
100
101 static inline
lim_process_ndi_del_sta_rsp(struct mac_context * mac_ctx,struct scheduler_msg * lim_msg,struct pe_session * pe_session)102 void lim_process_ndi_del_sta_rsp(struct mac_context *mac_ctx,
103 struct scheduler_msg *lim_msg,
104 struct pe_session *pe_session)
105 {
106 }
107
108 static inline
lim_ndp_add_sta_rsp(struct mac_context * mac_ctx,struct pe_session * session_entry,tAddStaParams * add_sta_rsp)109 void lim_ndp_add_sta_rsp(struct mac_context *mac_ctx,
110 struct pe_session *session_entry,
111 tAddStaParams *add_sta_rsp)
112 {
113 }
114
115 #endif /* WLAN_FEATURE_NAN */
116
117 #endif /* __MAC_NAN_DATAPATH_H */
118
119