1 /* 2 * Copyright (c) 2012-2015, 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 * 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 cm_state_roaming_entry(void *ctx); 36 37 /** 38 * 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 cm_state_roaming_exit(void *ctx); 46 47 /** 48 * cm_state_roaming_event() - Roaming State event handler for 49 * connection mgr 50 * @ctx: connection manager ctx 51 * @event: event to handle 52 * @data_len: event data len 53 * @data:event data 54 * 55 * API to handle events in roaming state 56 * 57 * Return: bool 58 */ 59 bool cm_state_roaming_event(void *ctx, uint16_t event, uint16_t data_len, 60 void *data); 61 62 #ifdef WLAN_FEATURE_HOST_ROAM 63 #ifdef WLAN_FEATURE_PREAUTH_ENABLE 64 /** 65 * cm_subst_preauth_entry() - Entry API for preauth sub-state for 66 * connection mgr 67 * @ctx: connection manager ctx 68 * 69 * API to perform operations on moving to preauth sub-state 70 * 71 * Return: void 72 */ 73 void cm_subst_preauth_entry(void *ctx); 74 75 /** 76 * cm_subst_preauth_exit() - Exit API for preauth sub-state for 77 * connection mgr 78 * @ctx: connection manager ctx 79 * 80 * API to perform operations on exiting from preauth sub-state 81 * 82 * Return: void 83 */ 84 void cm_subst_preauth_exit(void *ctx); 85 86 /** 87 * cm_subst_preauth_event() - Preauth sub-state event handler for 88 * connection mgr 89 * @ctx: connection manager ctx 90 * @event: event to handle 91 * @data_len: event data len 92 * @data:event data 93 * 94 * API to handle events in preauth sub-state 95 * 96 * Return: bool 97 */ 98 bool cm_subst_preauth_event(void *ctx, uint16_t event, 99 uint16_t data_len, void *data); 100 #else /* WLAN_FEATURE_PREAUTH_ENABLE && WLAN_FEATURE_HOST_ROAM */ 101 102 static inline void cm_subst_preauth_entry(void *ctx) {} 103 104 static inline void cm_subst_preauth_exit(void *ctx) {} 105 106 static inline bool cm_subst_preauth_event(void *ctx, uint16_t event, 107 uint16_t data_len, void *data) 108 { 109 return true; 110 } 111 #endif /* WLAN_FEATURE_PREAUTH_ENABLE */ 112 113 /** 114 * cm_subst_reassoc_entry() - Entry API for reassoc sub-state for 115 * connection mgr 116 * @ctx: connection manager ctx 117 * 118 * API to perform operations on moving to reassoc sub-state 119 * 120 * Return: void 121 */ 122 void cm_subst_reassoc_entry(void *ctx); 123 124 /** 125 * cm_subst_reassoc_exit() - Exit API for reassoc sub-state for 126 * connection mgr 127 * @ctx: connection manager ctx 128 * 129 * API to perform operations on exiting from reassoc sub-state 130 * 131 * Return: void 132 */ 133 void cm_subst_reassoc_exit(void *ctx); 134 135 /** 136 * cm_subst_reassoc_event() - Reassoc sub-state event handler for 137 * connection mgr 138 * @ctx: connection manager ctx 139 * @event: event to handle 140 * @data_len: event data len 141 * @data:event data 142 * 143 * API to handle events in preauth sub-state 144 * 145 * Return: bool 146 */ 147 bool cm_subst_reassoc_event(void *ctx, uint16_t event, uint16_t data_len, 148 void *data); 149 #endif /* WLAN_FEATURE_HOST_ROAM */ 150 151 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 152 153 /** 154 * cm_subst_roam_start_entry() - Entry API for roam start sub-state for 155 * connection mgr 156 * @ctx: connection manager ctx 157 * 158 * API to perform operations on moving to roam start sub-state 159 * 160 * Return: void 161 */ 162 void cm_subst_roam_start_entry(void *ctx); 163 164 /** 165 * cm_subst_roam_start_exit() - Exit API for roam start sub-state for 166 * connection mgr 167 * @ctx: connection manager ctx 168 * 169 * API to perform operations on exiting from roam start sub-state 170 * 171 * Return: void 172 */ 173 void cm_subst_roam_start_exit(void *ctx); 174 175 /** 176 * cm_subst_roam_start_event() - Roam start sub-state event handler for 177 * connection mgr 178 * @ctx: connection manager ctx 179 * @event: event to handle 180 * @data_len: event data len 181 * @data:event data 182 * 183 * API to handle events in roam start sub-state 184 * 185 * Return: bool 186 */ 187 bool cm_subst_roam_start_event(void *ctx, uint16_t event, uint16_t data_len, 188 void *data); 189 190 /** 191 * cm_subst_roam_sync_entry() - Entry API for roam sync sub-state for 192 * connection mgr 193 * @ctx: connection manager ctx 194 * 195 * API to perform operations on moving to roam sync sub-state 196 * 197 * Return: void 198 */ 199 void cm_subst_roam_sync_entry(void *ctx); 200 201 /** 202 * cm_subst_roam_sync_exit() - Exit API for roam sync sub-state for 203 * connection mgr 204 * @ctx: connection manager ctx 205 * 206 * API to perform operations on exiting from roam sync sub-state 207 * 208 * Return: void 209 */ 210 void cm_subst_roam_sync_exit(void *ctx); 211 212 /** 213 * cm_subst_roam_sync_event() - Roam sync sub-state event handler for 214 * connection mgr 215 * @ctx: connection manager ctx 216 * @event: event to handle 217 * @data_len: event data len 218 * @data:event data 219 * 220 * API to handle events in roam sync sub-state 221 * 222 * Return: bool 223 */ 224 bool cm_subst_roam_sync_event(void *ctx, uint16_t event, uint16_t data_len, 225 void *data); 226 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ 227 228 #endif /* __WLAN_CM_ROAM_SM_H__ */ 229