blob: 9434ce9e02e3886dab30baa7c9bdb8a8755aaeee [file] [log] [blame]
Ravi Joshia063dd92016-05-25 16:43:13 -07001/*
Rajeev Kumar8eaedf62017-01-21 11:03:13 -08002 * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
Ravi Joshia063dd92016-05-25 16:43:13 -07003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 * Permission to use, copy, modify, and/or distribute this software for
7 * any purpose with or without fee is hereby granted, provided that the
8 * above copyright notice and this permission notice appear in all
9 * copies.
10 *
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
12 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
13 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
14 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
15 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
16 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
17 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18 * PERFORMANCE OF THIS SOFTWARE.
19 */
20
21/**
22 * DOC: sme_nan_datapath.h
23 *
24 * SME NAN Data path API specification
25 */
26
27#ifndef __SME_NAN_DATAPATH_H
28#define __SME_NAN_DATAPATH_H
29
Abhishek Singh4fef7472016-06-06 11:36:03 -070030#include "csr_inside_api.h"
31
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -070032#ifdef WLAN_FEATURE_NAN_DATAPATH
33#include "qdf_types.h"
34#include "sir_api.h"
Ravi Joshi412f23d2016-05-26 15:09:23 -070035#include "ani_global.h"
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -070036#include "sme_inside.h"
37
38/**
39 * struct sir_sme_ndp_initiator_req - sme request struct for ndp initiator req
40 * @mesgType: SME msg type(eWNI_SME_NDP_INITIATOR_REQ)
41 * @mesgLen: lenght of message
42 * @req: actual ndp initiator request
43 *
44 */
45struct sir_sme_ndp_initiator_req {
46 uint16_t msg_type;
47 uint16_t msg_len;
48 struct ndp_initiator_req req;
49};
Ravi Joshi412f23d2016-05-26 15:09:23 -070050
Abhishek Singh4fef7472016-06-06 11:36:03 -070051/**
52 * struct sir_sme_ndp_responder_req - Wraper of responder's response
53 * to ndp create request
54 * @msg_type: SME msg type
55 * @msg_len: Length of msg
56 * @req: responder's response to ndp create request
57 *
58 */
59struct sir_sme_ndp_responder_req {
60 uint16_t msg_type;
61 uint16_t msg_len;
62 struct ndp_responder_req req;
63};
64
Naveen Rawatf28315c2016-06-29 18:06:02 -070065/*
66 * struct sir_sme_ndp_end_req - sme request struct for ndp end req
67 * @msg_type: SME msg type(sir_sme_ndp_initiator_req)
68 * @msg_len: lenght of message
69 * @req: actual ndp initiator request
70 *
71 */
72struct sir_sme_ndp_end_req {
73 uint16_t msg_type;
74 uint16_t msg_len;
75 struct ndp_end_req *req;
76};
77
Abhishek Singh4fef7472016-06-06 11:36:03 -070078/* NaN initiator request handler */
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -070079QDF_STATUS sme_ndp_initiator_req_handler(tHalHandle hal,
Ravi Joshi412f23d2016-05-26 15:09:23 -070080 struct ndp_initiator_req *req_params);
81
Abhishek Singh4fef7472016-06-06 11:36:03 -070082/* NaN responder request handler */
83QDF_STATUS sme_ndp_responder_req_handler(tHalHandle hal,
Ravi Joshi412f23d2016-05-26 15:09:23 -070084 struct ndp_responder_req *req_params);
85
86/* NAN indication response handler */
Naveen Rawatf28315c2016-06-29 18:06:02 -070087QDF_STATUS sme_ndp_end_req_handler(tHalHandle hal, struct ndp_end_req *req);
Ravi Joshi412f23d2016-05-26 15:09:23 -070088
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -070089/* Start NDI BSS */
90QDF_STATUS csr_roam_start_ndi(tpAniSirGlobal mac_ctx, uint32_t session_id,
91 tCsrRoamProfile *profile);
92
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -070093void csr_roam_save_ndi_connected_info(tpAniSirGlobal mac_ctx,
94 uint32_t session_id,
95 tCsrRoamProfile *roam_profile,
96 tSirBssDescription *bss_desc);
97
98void csr_roam_update_ndp_return_params(tpAniSirGlobal mac_ctx,
99 uint32_t result,
100 uint32_t *roam_status,
Deepak Dhamdhere13983f22016-05-31 19:06:09 -0700101 uint32_t *roam_result,
102 struct tagCsrRoamInfo *roam_info);
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700103QDF_STATUS csr_process_ndp_initiator_request(tpAniSirGlobal mac_ctx,
104 tSmeCmd *cmd);
Naveen Rawatf28315c2016-06-29 18:06:02 -0700105QDF_STATUS csr_process_ndp_data_end_request(tpAniSirGlobal mac_ctx,
106 tSmeCmd *cmd);
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700107
Rajeev Kumar8eaedf62017-01-21 11:03:13 -0800108void sme_ndp_msg_processor(tpAniSirGlobal mac_ctx, struct scheduler_msg *msg);
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700109
Abhishek Singh4fef7472016-06-06 11:36:03 -0700110QDF_STATUS csr_process_ndp_responder_request(tpAniSirGlobal mac_ctx,
111 tSmeCmd *cmd);
Naveen Rawat64a9a1a2016-06-06 14:55:48 -0700112
113void csr_release_ndp_initiator_req(tpAniSirGlobal mac_ctx, tSmeCmd *cmd);
114void csr_release_ndp_responder_req(tpAniSirGlobal mac_ctx, tSmeCmd *cmd);
115void csr_release_ndp_data_end_req(tpAniSirGlobal mac_ctx, tSmeCmd *cmd);
116
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -0700117#else
118
Rakesh Sunki1f0553f2016-08-02 17:51:49 -0700119/* NAN initiator request handler */
120static inline QDF_STATUS sme_ndp_initiator_req_handler(tHalHandle hal,
121 void *req_params) {
122 return QDF_STATUS_SUCCESS;
123}
124
125/* NAN responder request handler */
126static inline QDF_STATUS sme_ndp_responder_req_handler(tHalHandle hal,
127 void *req_params) {
128 return QDF_STATUS_SUCCESS;
129}
130
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -0700131/* Start NDI BSS */
132static inline QDF_STATUS csr_roam_start_ndi(tpAniSirGlobal mac_ctx,
133 uint32_t session_id,
134 tCsrRoamProfile *profile)
135{
136 return QDF_STATUS_SUCCESS;
137}
138
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -0700139static inline void csr_roam_save_ndi_connected_info(tpAniSirGlobal mac_ctx,
140 uint32_t session_id,
141 tCsrRoamProfile *roam_profile,
142 tSirBssDescription *bss_desc)
143{
144}
145
146static inline void csr_roam_update_ndp_return_params(tpAniSirGlobal mac_ctx,
Deepak Dhamdhere13983f22016-05-31 19:06:09 -0700147 uint32_t result,
148 uint32_t *roam_status,
149 uint32_t *roam_result,
150 struct tagCsrRoamInfo *roam_info)
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -0700151{
152}
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700153
Rakesh Sunki1f0553f2016-08-02 17:51:49 -0700154/* NAN indication response handler */
155static inline QDF_STATUS sme_ndp_end_req_handler(uint32_t session_id,
156 void *req_params) {
157 return QDF_STATUS_SUCCESS;
158}
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700159
Abhishek Singh4fef7472016-06-06 11:36:03 -0700160static inline QDF_STATUS csr_process_ndp_initiator_request(
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700161 tpAniSirGlobal mac_ctx, tSmeCmd *cmd)
162{
163 return QDF_STATUS_SUCCESS;
164}
165
Rajeev Kumar8eaedf62017-01-21 11:03:13 -0800166static inline void sme_ndp_msg_processor(tpAniSirGlobal mac_ctx,
167 struct scheduler_msg *msg)
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700168{
169}
170
Abhishek Singh4fef7472016-06-06 11:36:03 -0700171static inline QDF_STATUS csr_process_ndp_responder_request(
172 tpAniSirGlobal mac_ctx, tSmeCmd *cmd)
173{
174 return QDF_STATUS_SUCCESS;
175}
Naveen Rawatf28315c2016-06-29 18:06:02 -0700176
177static inline QDF_STATUS csr_process_ndp_data_end_request(
178 tpAniSirGlobal mac_ctx, tSmeCmd *cmd)
179{
180 return QDF_STATUS_SUCCESS;
181}
182
Naveen Rawat64a9a1a2016-06-06 14:55:48 -0700183static inline void csr_release_ndp_initiator_req(tpAniSirGlobal mac_ctx,
184 tSmeCmd *cmd) {}
185static inline void csr_release_ndp_responder_req(tpAniSirGlobal mac_ctx,
186 tSmeCmd *cmd) {}
187static inline void csr_release_ndp_data_end_req(tpAniSirGlobal mac_ctx,
188 tSmeCmd *cmd) {}
189
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -0700190#endif /* WLAN_FEATURE_NAN_DATAPATH */
Ravi Joshia063dd92016-05-25 16:43:13 -0700191#endif /* __SME_NAN_DATAPATH_H */