blob: cc2b719cf1590d0684eb888be65cdb9a161e42aa [file] [log] [blame]
Ravi Joshia063dd92016-05-25 16:43:13 -07001/*
2 * Copyright (c) 2016 The Linux Foundation. All rights reserved.
3 *
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
89/* NAN schedule update request handler */
90QDF_STATUS sme_ndp_sched_req_handler(uint32_t session_id,
91 struct ndp_schedule_update_req *req_params);
92
93/* Function to handle NDP messages from lower layers */
94void sme_ndp_message_processor(tpAniSirGlobal mac_ctx, uint16_t msg_type,
95 void *msg);
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -070096
97/* Start NDI BSS */
98QDF_STATUS csr_roam_start_ndi(tpAniSirGlobal mac_ctx, uint32_t session_id,
99 tCsrRoamProfile *profile);
100
101void csr_roam_fill_roaminfo_ndp(tpAniSirGlobal mac_ctx,
102 tCsrRoamInfo *roam_info,
103 eCsrRoamResult roam_result,
104 tSirResultCodes status_code,
105 uint32_t reason_code,
106 uint32_t transaction_id);
107
108void csr_roam_save_ndi_connected_info(tpAniSirGlobal mac_ctx,
109 uint32_t session_id,
110 tCsrRoamProfile *roam_profile,
111 tSirBssDescription *bss_desc);
112
113void csr_roam_update_ndp_return_params(tpAniSirGlobal mac_ctx,
114 uint32_t result,
115 uint32_t *roam_status,
Deepak Dhamdhere13983f22016-05-31 19:06:09 -0700116 uint32_t *roam_result,
117 struct tagCsrRoamInfo *roam_info);
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700118QDF_STATUS csr_process_ndp_initiator_request(tpAniSirGlobal mac_ctx,
119 tSmeCmd *cmd);
Naveen Rawatf28315c2016-06-29 18:06:02 -0700120QDF_STATUS csr_process_ndp_data_end_request(tpAniSirGlobal mac_ctx,
121 tSmeCmd *cmd);
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700122
123void sme_ndp_msg_processor(tpAniSirGlobal mac_ctx, cds_msg_t *msg);
124
Abhishek Singh4fef7472016-06-06 11:36:03 -0700125QDF_STATUS csr_process_ndp_responder_request(tpAniSirGlobal mac_ctx,
126 tSmeCmd *cmd);
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -0700127#else
128
129/* Start NDI BSS */
130static inline QDF_STATUS csr_roam_start_ndi(tpAniSirGlobal mac_ctx,
131 uint32_t session_id,
132 tCsrRoamProfile *profile)
133{
134 return QDF_STATUS_SUCCESS;
135}
136
137/* Fill in ndp information in roam_info */
138static inline void csr_roam_fill_roaminfo_ndp(tpAniSirGlobal mac_ctx,
139 tCsrRoamInfo *roam_info,
140 eCsrRoamResult roam_result,
141 tSirResultCodes status_code,
142 uint32_t reason_code,
143 uint32_t transaction_id)
144{
145}
146
147static inline void csr_roam_save_ndi_connected_info(tpAniSirGlobal mac_ctx,
148 uint32_t session_id,
149 tCsrRoamProfile *roam_profile,
150 tSirBssDescription *bss_desc)
151{
152}
153
154static inline void csr_roam_update_ndp_return_params(tpAniSirGlobal mac_ctx,
Deepak Dhamdhere13983f22016-05-31 19:06:09 -0700155 uint32_t result,
156 uint32_t *roam_status,
157 uint32_t *roam_result,
158 struct tagCsrRoamInfo *roam_info)
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -0700159{
160}
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700161
162/* NaN indication response handler */
163QDF_STATUS sme_ndp_end_req_handler(uint32_t session_id,
164 struct ndp_end_req *req_params);
165
166/* NaN schedule update request handler */
167QDF_STATUS sme_ndp_sched_req_handler(uint32_t session_id,
168 struct ndp_schedule_update_req *req_params);
169
Abhishek Singh4fef7472016-06-06 11:36:03 -0700170static inline QDF_STATUS csr_process_ndp_initiator_request(
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700171 tpAniSirGlobal mac_ctx, tSmeCmd *cmd)
172{
173 return QDF_STATUS_SUCCESS;
174}
175
176static inline void sme_ndp_msg_processor(tpAniSirGlobal mac_ctx, cds_msg_t *msg)
177{
178}
179
Abhishek Singh4fef7472016-06-06 11:36:03 -0700180static inline QDF_STATUS csr_process_ndp_responder_request(
181 tpAniSirGlobal mac_ctx, tSmeCmd *cmd)
182{
183 return QDF_STATUS_SUCCESS;
184}
Naveen Rawatf28315c2016-06-29 18:06:02 -0700185
186static inline QDF_STATUS csr_process_ndp_data_end_request(
187 tpAniSirGlobal mac_ctx, tSmeCmd *cmd)
188{
189 return QDF_STATUS_SUCCESS;
190}
191
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -0700192#endif /* WLAN_FEATURE_NAN_DATAPATH */
Ravi Joshia063dd92016-05-25 16:43:13 -0700193#endif /* __SME_NAN_DATAPATH_H */