1 /* 2 * Copyright (c) 2020, The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 /** 18 * DOC: wlan_cm_roam_sm.h 19 * 20 * This header file maintain structures required for connection mgr roam sm 21 */ 22 23 #ifndef __WLAN_CM_ROAM_SM_H__ 24 #define __WLAN_CM_ROAM_SM_H__ 25 26 /** 27 * mlme_cm_state_roaming_entry() - Entry API for roaming state for 28 * connection mgr 29 * @ctx: connection manager ctx 30 * 31 * API to perform operations on moving to roaming state 32 * 33 * Return: void 34 */ 35 void mlme_cm_state_roaming_entry(void *ctx); 36 37 /** 38 * mlme_cm_state_roaming_exit() - Exit API for roaming state for connection mgr 39 * @ctx: connection manager ctx 40 * 41 * API to perform operations on exiting from roaming state 42 * 43 * Return: void 44 */ 45 void mlme_cm_state_roaming_exit(void *ctx); 46 47 /** 48 * mlme_cm_state_roaming_event() - Roaming State event handler for 49 * connection mgr 50 * @ctx: connection manager ctx 51 * 52 * API to handle events in roaming state 53 * 54 * Return: bool 55 */ 56 bool mlme_cm_state_roaming_event(void *ctx, uint16_t event, 57 uint16_t event_data_len, 58 void *event_data); 59 60 #ifdef WLAN_FEATURE_HOST_ROAM 61 #ifdef WLAN_FEATURE_PREAUTH_ENABLE 62 /** 63 * mlme_cm_subst_preauth_entry() - Entry API for preauth sub-state for 64 * connection mgr 65 * @ctx: connection manager ctx 66 * 67 * API to perform operations on moving to preauth sub-state 68 * 69 * Return: void 70 */ 71 void mlme_cm_subst_preauth_entry(void *ctx); 72 73 /** 74 * mlme_cm_subst_preauth_exit() - Exit API for preauth sub-state for 75 * connection mgr 76 * @ctx: connection manager ctx 77 * 78 * API to perform operations on exiting from preauth sub-state 79 * 80 * Return: void 81 */ 82 void mlme_cm_subst_preauth_exit(void *ctx); 83 84 /** 85 * mlme_cm_subst_preauth_event() - Preauth sub-state event handler for 86 * connection mgr 87 * @ctx: connection manager ctx 88 * 89 * API to handle events in preauth sub-state 90 * 91 * Return: bool 92 */ 93 bool mlme_cm_subst_preauth_event(void *ctx, uint16_t event, 94 uint16_t event_data_len, 95 void *event_data); 96 #else /* WLAN_FEATURE_PREAUTH_ENABLE && WLAN_FEATURE_HOST_ROAM */ 97 98 static inline void mlme_cm_subst_preauth_entry(void *ctx) {} 99 100 static inline void mlme_cm_subst_preauth_exit(void *ctx) {} 101 102 static inline bool mlme_cm_subst_preauth_event(void *ctx, uint16_t event, 103 uint16_t event_data_len, 104 void *event_data) 105 { 106 return true; 107 } 108 #endif /* WLAN_FEATURE_PREAUTH_ENABLE */ 109 110 /** 111 * mlme_cm_subst_reassoc_entry() - Entry API for reassoc sub-state for 112 * connection mgr 113 * @ctx: connection manager ctx 114 * 115 * API to perform operations on moving to reassoc sub-state 116 * 117 * Return: void 118 */ 119 void mlme_cm_subst_reassoc_entry(void *ctx); 120 121 /** 122 * mlme_cm_subst_reassoc_exit() - Exit API for reassoc sub-state for 123 * connection mgr 124 * @ctx: connection manager ctx 125 * 126 * API to perform operations on exiting from reassoc sub-state 127 * 128 * Return: void 129 */ 130 void mlme_cm_subst_reassoc_exit(void *ctx); 131 132 /** 133 * mlme_cm_subst_reassoc_event() - Reassoc sub-state event handler for 134 * connection mgr 135 * @ctx: connection manager ctx 136 * 137 * API to handle events in preauth sub-state 138 * 139 * Return: bool 140 */ 141 bool mlme_cm_subst_reassoc_event(void *ctx, uint16_t event, 142 uint16_t event_data_len, 143 void *event_data); 144 #endif /* WLAN_FEATURE_HOST_ROAM */ 145 146 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 147 148 /** 149 * mlme_cm_subst_roam_start_entry() - Entry API for roam start sub-state for 150 * connection mgr 151 * @ctx: connection manager ctx 152 * 153 * API to perform operations on moving to roam start sub-state 154 * 155 * Return: void 156 */ 157 void mlme_cm_subst_roam_start_entry(void *ctx); 158 159 /** 160 * mlme_cm_subst_roam_start_exit() - Exit API for roam start sub-state for 161 * connection mgr 162 * @ctx: connection manager ctx 163 * 164 * API to perform operations on exiting from roam start sub-state 165 * 166 * Return: void 167 */ 168 void mlme_cm_subst_roam_start_exit(void *ctx); 169 170 /** 171 * mlme_cm_subst_roam_start_event() - Roam start sub-state event handler for 172 * connection mgr 173 * @ctx: connection manager ctx 174 * 175 * API to handle events in roam start sub-state 176 * 177 * Return: bool 178 */ 179 bool mlme_cm_subst_roam_start_event(void *ctx, uint16_t event, 180 uint16_t event_data_len, 181 void *event_data); 182 183 /** 184 * mlme_cm_subst_roam_sync_entry() - Entry API for roam sync sub-state for 185 * connection mgr 186 * @ctx: connection manager ctx 187 * 188 * API to perform operations on moving to roam sync sub-state 189 * 190 * Return: void 191 */ 192 void mlme_cm_subst_roam_sync_entry(void *ctx); 193 194 /** 195 * mlme_cm_subst_roam_sync_exit() - Exit API for roam sync sub-state for 196 * connection mgr 197 * @ctx: connection manager ctx 198 * 199 * API to perform operations on exiting from roam sync sub-state 200 * 201 * Return: void 202 */ 203 void mlme_cm_subst_roam_sync_exit(void *ctx); 204 205 /** 206 * mlme_cm_subst_roam_sync_event() - Roam sync sub-state event handler for 207 * connection mgr 208 * @ctx: connection manager ctx 209 * 210 * API to handle events in roam sync sub-state 211 * 212 * Return: bool 213 */ 214 bool mlme_cm_subst_roam_sync_event(void *ctx, uint16_t event, 215 uint16_t event_data_len, 216 void *event_data); 217 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ 218 219 #endif /* __WLAN_CM_ROAM_SM_H__ */ 220