Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Abhishek Singh | 880d712 | 2015-08-26 16:23:04 +0530 | [diff] [blame^] | 2 | * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. |
Kiet Lam | 1ed83fc | 2014-02-19 01:15:45 -0800 | [diff] [blame] | 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 20 | */ |
Kiet Lam | 1ed83fc | 2014-02-19 01:15:45 -0800 | [diff] [blame] | 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 28 | #if !defined( __VOS_SCHED_H ) |
| 29 | #define __VOS_SCHED_H |
| 30 | |
| 31 | /**========================================================================= |
| 32 | |
| 33 | \file vos_sched.h |
| 34 | |
| 35 | \brief virtual Operating System Servies (vOSS) |
| 36 | |
| 37 | Definitions for some of the internal data type that is internally used |
| 38 | by the vOSS scheduler on Windows Mobile. |
| 39 | |
| 40 | This file defines a vOSS message queue on Win Mobile and give some |
| 41 | insights about how the scheduler implements the execution model supported |
| 42 | by vOSS. |
| 43 | |
| 44 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 45 | |
| 46 | ========================================================================*/ |
| 47 | |
| 48 | /*=========================================================================== |
| 49 | |
| 50 | EDIT HISTORY FOR FILE |
| 51 | |
| 52 | |
| 53 | This section contains comments describing changes made to the module. |
| 54 | Notice that changes are listed in reverse chronological order. |
| 55 | |
| 56 | |
| 57 | $Header:$ $DateTime: $ $Author: $ |
| 58 | |
| 59 | |
| 60 | when who what, where, why |
| 61 | -------- --- -------------------------------------------------------- |
| 62 | 09/15/08 lac Removed hardcoded #define for VOS_TRACE. |
| 63 | 06/12/08 hba Created module. |
| 64 | |
| 65 | ===========================================================================*/ |
| 66 | |
| 67 | /*-------------------------------------------------------------------------- |
| 68 | Include Files |
| 69 | ------------------------------------------------------------------------*/ |
| 70 | #include <vos_event.h> |
Vinay Krishna Eranna | 2025d89 | 2014-09-18 16:51:42 +0530 | [diff] [blame] | 71 | #include <vos_nvitem.h> |
| 72 | #include <vos_mq.h> |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 73 | #include "i_vos_types.h" |
| 74 | #include "i_vos_packet.h" |
| 75 | #include <linux/wait.h> |
| 76 | #include <linux/wakelock.h> |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 77 | |
| 78 | #define TX_POST_EVENT_MASK 0x001 |
| 79 | #define TX_SUSPEND_EVENT_MASK 0x002 |
| 80 | #define MC_POST_EVENT_MASK 0x001 |
| 81 | #define MC_SUSPEND_EVENT_MASK 0x002 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 82 | #define RX_POST_EVENT_MASK 0x001 |
| 83 | #define RX_SUSPEND_EVENT_MASK 0x002 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 84 | #define TX_SHUTDOWN_EVENT_MASK 0x010 |
| 85 | #define MC_SHUTDOWN_EVENT_MASK 0x010 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 86 | #define RX_SHUTDOWN_EVENT_MASK 0x010 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 87 | #define WD_POST_EVENT_MASK 0x001 |
| 88 | #define WD_SHUTDOWN_EVENT_MASK 0x002 |
| 89 | #define WD_CHIP_RESET_EVENT_MASK 0x004 |
| 90 | #define WD_WLAN_SHUTDOWN_EVENT_MASK 0x008 |
| 91 | #define WD_WLAN_REINIT_EVENT_MASK 0x010 |
| 92 | |
| 93 | |
| 94 | |
| 95 | /* |
| 96 | ** Maximum number of messages in the system |
| 97 | ** These are buffers to account for all current messages |
| 98 | ** with some accounting of what we think is a |
| 99 | ** worst-case scenario. Must be able to handle all |
| 100 | ** incoming frames, as well as overhead for internal |
| 101 | ** messaging |
| 102 | */ |
| 103 | #define VOS_CORE_MAX_MESSAGES (VPKT_NUM_RX_RAW_PACKETS + 32) |
| 104 | |
| 105 | |
| 106 | /* |
| 107 | ** vOSS Message queue definition. |
| 108 | */ |
| 109 | typedef struct _VosMqType |
| 110 | { |
| 111 | /* Lock use to synchronize access to this message queue */ |
| 112 | spinlock_t mqLock; |
| 113 | |
| 114 | /* List of vOS Messages waiting on this queue */ |
| 115 | struct list_head mqList; |
| 116 | |
| 117 | } VosMqType, *pVosMqType; |
| 118 | |
| 119 | |
| 120 | /* |
| 121 | ** vOSS Scheduler context |
| 122 | ** The scheduler context contains the following: |
| 123 | ** ** the messages queues |
| 124 | ** ** the handle to the tread |
| 125 | ** ** pointer to the events that gracefully shutdown the MC and Tx threads |
| 126 | ** |
| 127 | */ |
| 128 | typedef struct _VosSchedContext |
| 129 | { |
| 130 | /* Place holder to the VOSS Context */ |
| 131 | v_PVOID_t pVContext; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 132 | /* WDA Message queue on the Main thread*/ |
| 133 | VosMqType wdaMcMq; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 134 | |
| 135 | |
| 136 | |
| 137 | /* PE Message queue on the Main thread*/ |
| 138 | VosMqType peMcMq; |
| 139 | |
| 140 | /* SME Message queue on the Main thread*/ |
| 141 | VosMqType smeMcMq; |
| 142 | |
| 143 | /* TL Message queue on the Main thread */ |
| 144 | VosMqType tlMcMq; |
| 145 | |
| 146 | /* SYS Message queue on the Main thread */ |
| 147 | VosMqType sysMcMq; |
| 148 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 149 | /* WDI Message queue on the Main thread*/ |
| 150 | VosMqType wdiMcMq; |
| 151 | |
| 152 | /* WDI Message queue on the Tx Thread*/ |
| 153 | VosMqType wdiTxMq; |
| 154 | |
| 155 | /* WDI Message queue on the Rx Thread*/ |
| 156 | VosMqType wdiRxMq; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 157 | |
| 158 | /* TL Message queue on the Tx thread */ |
| 159 | VosMqType tlTxMq; |
| 160 | |
Katya Nigam | 664f503 | 2014-05-05 12:24:32 +0530 | [diff] [blame] | 161 | /* TL Message queue on the Rx thread */ |
| 162 | VosMqType tlRxMq; |
| 163 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 164 | /* SYS Message queue on the Tx thread */ |
| 165 | VosMqType sysTxMq; |
| 166 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 167 | VosMqType sysRxMq; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 168 | |
| 169 | /* Handle of Event for MC thread to signal startup */ |
| 170 | struct completion McStartEvent; |
| 171 | |
| 172 | /* Handle of Event for Tx thread to signal startup */ |
| 173 | struct completion TxStartEvent; |
| 174 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 175 | /* Handle of Event for Rx thread to signal startup */ |
| 176 | struct completion RxStartEvent; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 177 | |
| 178 | struct task_struct* McThread; |
| 179 | |
| 180 | /* TX Thread handle */ |
| 181 | |
| 182 | struct task_struct* TxThread; |
| 183 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 184 | /* RX Thread handle */ |
| 185 | struct task_struct* RxThread; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 186 | |
| 187 | |
| 188 | /* completion object for MC thread shutdown */ |
| 189 | struct completion McShutdown; |
| 190 | |
| 191 | /* completion object for Tx thread shutdown */ |
| 192 | struct completion TxShutdown; |
| 193 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 194 | /* completion object for Rx thread shutdown */ |
| 195 | struct completion RxShutdown; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 196 | |
| 197 | /* Wait queue for MC thread */ |
| 198 | wait_queue_head_t mcWaitQueue; |
| 199 | |
| 200 | unsigned long mcEventFlag; |
| 201 | |
| 202 | /* Wait queue for Tx thread */ |
| 203 | wait_queue_head_t txWaitQueue; |
| 204 | |
| 205 | unsigned long txEventFlag; |
| 206 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 207 | /* Wait queue for Rx thread */ |
| 208 | wait_queue_head_t rxWaitQueue; |
| 209 | |
| 210 | unsigned long rxEventFlag; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 211 | |
| 212 | /* Completion object to resume Mc thread */ |
| 213 | struct completion ResumeMcEvent; |
| 214 | |
| 215 | /* Completion object to resume Tx thread */ |
| 216 | struct completion ResumeTxEvent; |
| 217 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 218 | /* Completion object to resume Rx thread */ |
| 219 | struct completion ResumeRxEvent; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 220 | |
| 221 | /* lock to make sure that McThread and TxThread Suspend/resume mechanism is in sync*/ |
| 222 | spinlock_t McThreadLock; |
| 223 | spinlock_t TxThreadLock; |
| 224 | spinlock_t RxThreadLock; |
| 225 | |
| 226 | } VosSchedContext, *pVosSchedContext; |
| 227 | |
| 228 | /* |
| 229 | ** VOSS watchdog context |
| 230 | ** The watchdog context contains the following: |
| 231 | ** The messages queues and events |
| 232 | ** The handle to the thread |
| 233 | ** |
| 234 | */ |
| 235 | typedef struct _VosWatchdogContext |
| 236 | { |
| 237 | |
| 238 | /* Place holder to the VOSS Context */ |
| 239 | v_PVOID_t pVContext; |
| 240 | |
| 241 | /* Handle of Event for Watchdog thread to signal startup */ |
| 242 | struct completion WdStartEvent; |
| 243 | |
| 244 | /* Watchdog Thread handle */ |
| 245 | |
| 246 | struct task_struct* WdThread; |
| 247 | |
| 248 | /* completion object for Watchdog thread shutdown */ |
| 249 | struct completion WdShutdown; |
| 250 | |
| 251 | /* Wait queue for Watchdog thread */ |
| 252 | wait_queue_head_t wdWaitQueue; |
| 253 | |
| 254 | /* Event flag for events handled by Watchdog */ |
| 255 | unsigned long wdEventFlag; |
| 256 | |
| 257 | v_BOOL_t resetInProgress; |
| 258 | |
Pradeep Kumar Goudagunta | 22d8e4d | 2014-07-17 15:03:51 +0530 | [diff] [blame] | 259 | v_BOOL_t isFatalError; |
| 260 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 261 | /* Lock for preventing multiple reset being triggered simultaneously */ |
| 262 | spinlock_t wdLock; |
| 263 | |
| 264 | } VosWatchdogContext, *pVosWatchdogContext; |
| 265 | |
| 266 | /* |
| 267 | ** vOSS Sched Msg Wrapper |
| 268 | ** Wrapper messages so that they can be chained to their respective queue |
| 269 | ** in the scheduler. |
| 270 | */ |
| 271 | typedef struct _VosMsgWrapper |
| 272 | { |
| 273 | /* Message node */ |
| 274 | struct list_head msgNode; |
| 275 | |
| 276 | /* the Vos message it is associated to */ |
| 277 | vos_msg_t *pVosMsg; |
| 278 | |
| 279 | } VosMsgWrapper, *pVosMsgWrapper; |
| 280 | |
| 281 | |
| 282 | |
| 283 | typedef struct _VosContextType |
| 284 | { |
| 285 | /* Messages buffers */ |
| 286 | vos_msg_t aMsgBuffers[VOS_CORE_MAX_MESSAGES]; |
| 287 | |
| 288 | VosMsgWrapper aMsgWrappers[VOS_CORE_MAX_MESSAGES]; |
| 289 | |
| 290 | /* Free Message queue*/ |
| 291 | VosMqType freeVosMq; |
| 292 | |
| 293 | /* Scheduler Context */ |
| 294 | VosSchedContext vosSched; |
| 295 | |
| 296 | /* Watchdog Context */ |
| 297 | VosWatchdogContext vosWatchdog; |
| 298 | |
| 299 | /* HDD Module Context */ |
| 300 | v_VOID_t *pHDDContext; |
| 301 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 302 | /* HDD SoftAP Module Context */ |
| 303 | v_VOID_t *pHDDSoftAPContext; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 304 | |
| 305 | /* TL Module Context */ |
| 306 | v_VOID_t *pTLContext; |
| 307 | |
| 308 | /* MAC Module Context */ |
| 309 | v_VOID_t *pMACContext; |
| 310 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 311 | /* BAP Context */ |
| 312 | v_VOID_t *pBAPContext; |
| 313 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 314 | /* SAP Context */ |
| 315 | v_VOID_t *pSAPContext; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 316 | |
| 317 | /* VOS Packet Context */ |
| 318 | vos_pkt_context_t vosPacket; |
| 319 | |
| 320 | vos_event_t ProbeEvent; |
| 321 | |
| 322 | volatile v_U8_t isLogpInProgress; |
| 323 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 324 | vos_event_t wdaCompleteEvent; |
| 325 | |
| 326 | /* WDA Context */ |
| 327 | v_VOID_t *pWDAContext; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 328 | |
| 329 | volatile v_U8_t isLoadUnloadInProgress; |
| 330 | |
Sameer Thalappil | 9ab2fe5 | 2013-10-22 12:50:24 -0700 | [diff] [blame] | 331 | /* SSR re-init in progress */ |
| 332 | volatile v_U8_t isReInitInProgress; |
| 333 | |
Leo Chang | 80de3c2 | 2013-11-26 10:52:12 -0800 | [diff] [blame] | 334 | /* NV BIN Version */ |
| 335 | eNvVersionType nvVersion; |
| 336 | |
Girish Gowli | a33f037 | 2015-01-19 15:39:04 +0530 | [diff] [blame] | 337 | /* Roam delay statistic enabled in ini*/ |
| 338 | v_U8_t roamDelayStatsEnabled; |
Sachin Ahuja | 715aafc | 2015-07-21 23:35:10 +0530 | [diff] [blame] | 339 | |
| 340 | /*Fw log complete Event*/ |
| 341 | vos_event_t fwLogsComplete; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 342 | } VosContextType, *pVosContextType; |
| 343 | |
| 344 | |
| 345 | |
| 346 | /*--------------------------------------------------------------------------- |
| 347 | Function declarations and documenation |
| 348 | ---------------------------------------------------------------------------*/ |
| 349 | |
| 350 | int vos_sched_is_tx_thread(int threadID); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 351 | int vos_sched_is_rx_thread(int threadID); |
Abhishek Singh | 880d712 | 2015-08-26 16:23:04 +0530 | [diff] [blame^] | 352 | int vos_sched_is_mc_thread(int threadID); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 353 | /*--------------------------------------------------------------------------- |
| 354 | |
| 355 | \brief vos_sched_open() - initialize the vOSS Scheduler |
| 356 | |
| 357 | The \a vos_sched_open() function initializes the vOSS Scheduler |
| 358 | Upon successful initialization: |
| 359 | |
| 360 | - All the message queues are initialized |
| 361 | |
| 362 | - The Main Controller thread is created and ready to receive and |
| 363 | dispatch messages. |
| 364 | |
| 365 | - The Tx thread is created and ready to receive and dispatch messages |
| 366 | |
| 367 | |
| 368 | \param pVosContext - pointer to the global vOSS Context |
| 369 | |
| 370 | \param pVosSchedContext - pointer to a previously allocated buffer big |
| 371 | enough to hold a scheduler context. |
| 372 | \ |
| 373 | |
| 374 | \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and |
| 375 | is ready to be used. |
| 376 | |
| 377 | VOS_STATUS_E_RESOURCES - System resources (other than memory) |
| 378 | are unavailable to initilize the scheduler |
| 379 | |
| 380 | VOS_STATUS_E_NOMEM - insufficient memory exists to initialize |
| 381 | the scheduler |
| 382 | |
| 383 | VOS_STATUS_E_INVAL - Invalid parameter passed to the scheduler Open |
| 384 | function |
| 385 | |
| 386 | VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ |
| 387 | |
| 388 | \sa vos_sched_open() |
| 389 | |
| 390 | -------------------------------------------------------------------------*/ |
| 391 | VOS_STATUS vos_sched_open( v_PVOID_t pVosContext, |
| 392 | pVosSchedContext pSchedCxt, |
| 393 | v_SIZE_t SchedCtxSize); |
| 394 | |
| 395 | /*--------------------------------------------------------------------------- |
| 396 | |
| 397 | \brief vos_watchdog_open() - initialize the vOSS watchdog |
| 398 | |
| 399 | The \a vos_watchdog_open() function initializes the vOSS watchdog. Upon successful |
| 400 | initialization, the watchdog thread is created and ready to receive and process messages. |
| 401 | |
| 402 | |
| 403 | \param pVosContext - pointer to the global vOSS Context |
| 404 | |
| 405 | \param pWdContext - pointer to a previously allocated buffer big |
| 406 | enough to hold a watchdog context. |
| 407 | |
| 408 | \return VOS_STATUS_SUCCESS - Watchdog was successfully initialized and |
| 409 | is ready to be used. |
| 410 | |
| 411 | VOS_STATUS_E_RESOURCES - System resources (other than memory) |
| 412 | are unavailable to initilize the Watchdog |
| 413 | |
| 414 | VOS_STATUS_E_NOMEM - insufficient memory exists to initialize |
| 415 | the Watchdog |
| 416 | |
| 417 | VOS_STATUS_E_INVAL - Invalid parameter passed to the Watchdog Open |
| 418 | function |
| 419 | |
| 420 | VOS_STATUS_E_FAILURE - Failure to initialize the Watchdog/ |
| 421 | |
| 422 | \sa vos_watchdog_open() |
| 423 | |
| 424 | -------------------------------------------------------------------------*/ |
| 425 | |
| 426 | VOS_STATUS vos_watchdog_open |
| 427 | |
| 428 | ( |
| 429 | v_PVOID_t pVosContext, |
| 430 | pVosWatchdogContext pWdContext, |
| 431 | v_SIZE_t wdCtxSize |
| 432 | ); |
| 433 | |
| 434 | /*--------------------------------------------------------------------------- |
| 435 | |
| 436 | \brief vos_sched_close() - Close the vOSS Scheduler |
| 437 | |
| 438 | The \a vos_sched_closes() function closes the vOSS Scheduler |
| 439 | Upon successful closing: |
| 440 | |
| 441 | - All the message queues are flushed |
| 442 | |
| 443 | - The Main Controller thread is closed |
| 444 | |
| 445 | - The Tx thread is closed |
| 446 | |
| 447 | |
| 448 | \param pVosContext - pointer to the global vOSS Context |
| 449 | |
| 450 | \return VOS_STATUS_SUCCESS - Scheduler was successfully initialized and |
| 451 | is ready to be used. |
| 452 | |
| 453 | VOS_STATUS_E_INVAL - Invalid parameter passed to the scheduler Open |
| 454 | function |
| 455 | |
| 456 | VOS_STATUS_E_FAILURE - Failure to initialize the scheduler/ |
| 457 | |
| 458 | \sa vos_sched_close() |
| 459 | |
| 460 | ---------------------------------------------------------------------------*/ |
| 461 | VOS_STATUS vos_sched_close( v_PVOID_t pVosContext); |
| 462 | |
| 463 | /*--------------------------------------------------------------------------- |
| 464 | |
| 465 | \brief vos_watchdog_close() - Close the vOSS Watchdog |
| 466 | |
| 467 | The \a vos_watchdog_close() function closes the vOSS Watchdog |
| 468 | Upon successful closing: |
| 469 | |
| 470 | - The Watchdog thread is closed |
| 471 | |
| 472 | |
| 473 | \param pVosContext - pointer to the global vOSS Context |
| 474 | |
| 475 | \return VOS_STATUS_SUCCESS - Watchdog was successfully initialized and |
| 476 | is ready to be used. |
| 477 | |
| 478 | VOS_STATUS_E_INVAL - Invalid parameter passed |
| 479 | |
| 480 | VOS_STATUS_E_FAILURE - Failure to initialize the Watchdog/ |
| 481 | |
| 482 | \sa vos_watchdog_close() |
| 483 | |
| 484 | ---------------------------------------------------------------------------*/ |
| 485 | VOS_STATUS vos_watchdog_close ( v_PVOID_t pVosContext ); |
| 486 | |
| 487 | /* Helper routines provided to other VOS API's */ |
| 488 | VOS_STATUS vos_mq_init(pVosMqType pMq); |
| 489 | void vos_mq_deinit(pVosMqType pMq); |
| 490 | void vos_mq_put(pVosMqType pMq, pVosMsgWrapper pMsgWrapper); |
| 491 | pVosMsgWrapper vos_mq_get(pVosMqType pMq); |
| 492 | v_BOOL_t vos_is_mq_empty(pVosMqType pMq); |
| 493 | pVosSchedContext get_vos_sched_ctxt(void); |
| 494 | pVosWatchdogContext get_vos_watchdog_ctxt(void); |
| 495 | VOS_STATUS vos_sched_init_mqs (pVosSchedContext pSchedContext); |
| 496 | void vos_sched_deinit_mqs (pVosSchedContext pSchedContext); |
| 497 | void vos_sched_flush_mc_mqs (pVosSchedContext pSchedContext); |
| 498 | void vos_sched_flush_tx_mqs (pVosSchedContext pSchedContext); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 499 | void vos_sched_flush_rx_mqs (pVosSchedContext pSchedContext); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 500 | void clearWlanResetReason(void); |
| 501 | |
| 502 | void vos_timer_module_init( void ); |
| 503 | VOS_STATUS vos_watchdog_wlan_shutdown(void); |
| 504 | VOS_STATUS vos_watchdog_wlan_re_init(void); |
Pradeep Kumar Goudagunta | 22d8e4d | 2014-07-17 15:03:51 +0530 | [diff] [blame] | 505 | v_BOOL_t isSsrPanicOnFailure(void); |
Mahesh A Saptasagar | 96395ab | 2014-04-08 12:48:39 +0530 | [diff] [blame] | 506 | void vos_ssr_protect(const char *caller_func); |
| 507 | void vos_ssr_unprotect(const char *caller_func); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 508 | |
| 509 | #endif // #if !defined __VOSS_SCHED_H |