Ravi Joshi | a063dd9 | 2016-05-25 16:43:13 -0700 | [diff] [blame] | 1 | /* |
Rajeev Kumar | 8eaedf6 | 2017-01-21 11:03:13 -0800 | [diff] [blame] | 2 | * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. |
Ravi Joshi | a063dd9 | 2016-05-25 16:43:13 -0700 | [diff] [blame] | 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 Singh | 4fef747 | 2016-06-06 11:36:03 -0700 | [diff] [blame] | 30 | #include "csr_inside_api.h" |
| 31 | |
Deepak Dhamdhere | e2dd544 | 2016-05-27 15:05:51 -0700 | [diff] [blame] | 32 | #ifdef WLAN_FEATURE_NAN_DATAPATH |
| 33 | #include "qdf_types.h" |
| 34 | #include "sir_api.h" |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 35 | #include "ani_global.h" |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 36 | #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 | */ |
| 45 | struct sir_sme_ndp_initiator_req { |
| 46 | uint16_t msg_type; |
| 47 | uint16_t msg_len; |
| 48 | struct ndp_initiator_req req; |
| 49 | }; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 50 | |
Abhishek Singh | 4fef747 | 2016-06-06 11:36:03 -0700 | [diff] [blame] | 51 | /** |
| 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 | */ |
| 59 | struct sir_sme_ndp_responder_req { |
| 60 | uint16_t msg_type; |
| 61 | uint16_t msg_len; |
| 62 | struct ndp_responder_req req; |
| 63 | }; |
| 64 | |
Naveen Rawat | f28315c | 2016-06-29 18:06:02 -0700 | [diff] [blame] | 65 | /* |
| 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 | */ |
| 72 | struct sir_sme_ndp_end_req { |
| 73 | uint16_t msg_type; |
| 74 | uint16_t msg_len; |
| 75 | struct ndp_end_req *req; |
| 76 | }; |
| 77 | |
Abhishek Singh | 4fef747 | 2016-06-06 11:36:03 -0700 | [diff] [blame] | 78 | /* NaN initiator request handler */ |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 79 | QDF_STATUS sme_ndp_initiator_req_handler(tHalHandle hal, |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 80 | struct ndp_initiator_req *req_params); |
| 81 | |
Abhishek Singh | 4fef747 | 2016-06-06 11:36:03 -0700 | [diff] [blame] | 82 | /* NaN responder request handler */ |
| 83 | QDF_STATUS sme_ndp_responder_req_handler(tHalHandle hal, |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 84 | struct ndp_responder_req *req_params); |
| 85 | |
| 86 | /* NAN indication response handler */ |
Naveen Rawat | f28315c | 2016-06-29 18:06:02 -0700 | [diff] [blame] | 87 | QDF_STATUS sme_ndp_end_req_handler(tHalHandle hal, struct ndp_end_req *req); |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 88 | |
Deepak Dhamdhere | e2dd544 | 2016-05-27 15:05:51 -0700 | [diff] [blame] | 89 | /* Start NDI BSS */ |
| 90 | QDF_STATUS csr_roam_start_ndi(tpAniSirGlobal mac_ctx, uint32_t session_id, |
| 91 | tCsrRoamProfile *profile); |
| 92 | |
Deepak Dhamdhere | e2dd544 | 2016-05-27 15:05:51 -0700 | [diff] [blame] | 93 | void csr_roam_save_ndi_connected_info(tpAniSirGlobal mac_ctx, |
| 94 | uint32_t session_id, |
| 95 | tCsrRoamProfile *roam_profile, |
| 96 | tSirBssDescription *bss_desc); |
| 97 | |
| 98 | void csr_roam_update_ndp_return_params(tpAniSirGlobal mac_ctx, |
| 99 | uint32_t result, |
| 100 | uint32_t *roam_status, |
Deepak Dhamdhere | 13983f2 | 2016-05-31 19:06:09 -0700 | [diff] [blame] | 101 | uint32_t *roam_result, |
| 102 | struct tagCsrRoamInfo *roam_info); |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 103 | QDF_STATUS csr_process_ndp_initiator_request(tpAniSirGlobal mac_ctx, |
| 104 | tSmeCmd *cmd); |
Naveen Rawat | f28315c | 2016-06-29 18:06:02 -0700 | [diff] [blame] | 105 | QDF_STATUS csr_process_ndp_data_end_request(tpAniSirGlobal mac_ctx, |
| 106 | tSmeCmd *cmd); |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 107 | |
Rajeev Kumar | 8eaedf6 | 2017-01-21 11:03:13 -0800 | [diff] [blame] | 108 | void sme_ndp_msg_processor(tpAniSirGlobal mac_ctx, struct scheduler_msg *msg); |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 109 | |
Abhishek Singh | 4fef747 | 2016-06-06 11:36:03 -0700 | [diff] [blame] | 110 | QDF_STATUS csr_process_ndp_responder_request(tpAniSirGlobal mac_ctx, |
| 111 | tSmeCmd *cmd); |
Naveen Rawat | 64a9a1a | 2016-06-06 14:55:48 -0700 | [diff] [blame] | 112 | |
| 113 | void csr_release_ndp_initiator_req(tpAniSirGlobal mac_ctx, tSmeCmd *cmd); |
| 114 | void csr_release_ndp_responder_req(tpAniSirGlobal mac_ctx, tSmeCmd *cmd); |
| 115 | void csr_release_ndp_data_end_req(tpAniSirGlobal mac_ctx, tSmeCmd *cmd); |
| 116 | |
Deepak Dhamdhere | e2dd544 | 2016-05-27 15:05:51 -0700 | [diff] [blame] | 117 | #else |
| 118 | |
Rakesh Sunki | 1f0553f | 2016-08-02 17:51:49 -0700 | [diff] [blame] | 119 | /* NAN initiator request handler */ |
| 120 | static 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 */ |
| 126 | static inline QDF_STATUS sme_ndp_responder_req_handler(tHalHandle hal, |
| 127 | void *req_params) { |
| 128 | return QDF_STATUS_SUCCESS; |
| 129 | } |
| 130 | |
Deepak Dhamdhere | e2dd544 | 2016-05-27 15:05:51 -0700 | [diff] [blame] | 131 | /* Start NDI BSS */ |
| 132 | static 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 Dhamdhere | e2dd544 | 2016-05-27 15:05:51 -0700 | [diff] [blame] | 139 | static 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 | |
| 146 | static inline void csr_roam_update_ndp_return_params(tpAniSirGlobal mac_ctx, |
Deepak Dhamdhere | 13983f2 | 2016-05-31 19:06:09 -0700 | [diff] [blame] | 147 | uint32_t result, |
| 148 | uint32_t *roam_status, |
| 149 | uint32_t *roam_result, |
| 150 | struct tagCsrRoamInfo *roam_info) |
Deepak Dhamdhere | e2dd544 | 2016-05-27 15:05:51 -0700 | [diff] [blame] | 151 | { |
| 152 | } |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 153 | |
Rakesh Sunki | 1f0553f | 2016-08-02 17:51:49 -0700 | [diff] [blame] | 154 | /* NAN indication response handler */ |
| 155 | static inline QDF_STATUS sme_ndp_end_req_handler(uint32_t session_id, |
| 156 | void *req_params) { |
| 157 | return QDF_STATUS_SUCCESS; |
| 158 | } |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 159 | |
Abhishek Singh | 4fef747 | 2016-06-06 11:36:03 -0700 | [diff] [blame] | 160 | static inline QDF_STATUS csr_process_ndp_initiator_request( |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 161 | tpAniSirGlobal mac_ctx, tSmeCmd *cmd) |
| 162 | { |
| 163 | return QDF_STATUS_SUCCESS; |
| 164 | } |
| 165 | |
Rajeev Kumar | 8eaedf6 | 2017-01-21 11:03:13 -0800 | [diff] [blame] | 166 | static inline void sme_ndp_msg_processor(tpAniSirGlobal mac_ctx, |
| 167 | struct scheduler_msg *msg) |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 168 | { |
| 169 | } |
| 170 | |
Abhishek Singh | 4fef747 | 2016-06-06 11:36:03 -0700 | [diff] [blame] | 171 | static inline QDF_STATUS csr_process_ndp_responder_request( |
| 172 | tpAniSirGlobal mac_ctx, tSmeCmd *cmd) |
| 173 | { |
| 174 | return QDF_STATUS_SUCCESS; |
| 175 | } |
Naveen Rawat | f28315c | 2016-06-29 18:06:02 -0700 | [diff] [blame] | 176 | |
| 177 | static inline QDF_STATUS csr_process_ndp_data_end_request( |
| 178 | tpAniSirGlobal mac_ctx, tSmeCmd *cmd) |
| 179 | { |
| 180 | return QDF_STATUS_SUCCESS; |
| 181 | } |
| 182 | |
Naveen Rawat | 64a9a1a | 2016-06-06 14:55:48 -0700 | [diff] [blame] | 183 | static inline void csr_release_ndp_initiator_req(tpAniSirGlobal mac_ctx, |
| 184 | tSmeCmd *cmd) {} |
| 185 | static inline void csr_release_ndp_responder_req(tpAniSirGlobal mac_ctx, |
| 186 | tSmeCmd *cmd) {} |
| 187 | static inline void csr_release_ndp_data_end_req(tpAniSirGlobal mac_ctx, |
| 188 | tSmeCmd *cmd) {} |
| 189 | |
Deepak Dhamdhere | e2dd544 | 2016-05-27 15:05:51 -0700 | [diff] [blame] | 190 | #endif /* WLAN_FEATURE_NAN_DATAPATH */ |
Ravi Joshi | a063dd9 | 2016-05-25 16:43:13 -0700 | [diff] [blame] | 191 | #endif /* __SME_NAN_DATAPATH_H */ |