1/** \file ScanCncnRoamingContSM.c
2 *  \brief This file include the scan concentrator continuous scan for roaming module implementation
3 *  \author Ronen Kalish
4 *  \date 03-Jan-2005
5 */
6/****************************************************************************
7**+-----------------------------------------------------------------------+**
8**|                                                                       |**
9**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved.      |**
10**| All rights reserved.                                                  |**
11**|                                                                       |**
12**| Redistribution and use in source and binary forms, with or without    |**
13**| modification, are permitted provided that the following conditions    |**
14**| are met:                                                              |**
15**|                                                                       |**
16**|  * Redistributions of source code must retain the above copyright     |**
17**|    notice, this list of conditions and the following disclaimer.      |**
18**|  * Redistributions in binary form must reproduce the above copyright  |**
19**|    notice, this list of conditions and the following disclaimer in    |**
20**|    the documentation and/or other materials provided with the         |**
21**|    distribution.                                                      |**
22**|  * Neither the name Texas Instruments nor the names of its            |**
23**|    contributors may be used to endorse or promote products derived    |**
24**|    from this software without specific prior written permission.      |**
25**|                                                                       |**
26**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   |**
27**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     |**
28**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
29**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  |**
30**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
31**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      |**
32**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
33**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
34**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   |**
35**| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
36**| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  |**
37**|                                                                       |**
38**+-----------------------------------------------------------------------+**
39****************************************************************************/
40
41#include "ScanCncnRoamingContSM.h"
42#include "MacServices_api.h"
43#include "report.h"
44#include "siteMgrApi.h"
45#include "healthMonitor.h"
46
47static TI_STATUS actionUnexpected( TI_HANDLE hScanCncn );
48static TI_STATUS actionNop( TI_HANDLE hScanCncn );
49
50/**
51 * \author Ronen Kalish\n
52 * \date 02-Jan-2005\n
53 * \brief Initialize the scan concentrator continuous scan for roaming SM.
54 *
55 * Function Scope \e Public.\n
56 * \param hScanCncn - handle to the scan concentrator object.\n
57 * \return OK if successful, NOK otherwise.\n
58 */
59TI_STATUS scanConcentratorRoamingContSM_init( TI_HANDLE hScanCncn )
60{
61    scanConcentrator_t* pScanConcentrator = (scanConcentrator_t*)hScanCncn;
62
63    fsm_actionCell_t    smMatrix[ CONT_SCAN_NUM_OF_STATES ][ CONT_SCAN_NUM_OF_EVENTS ] =
64	{
65		/* next state and actions for IDLE state */
66		{
67            {CONT_SCAN_STATE_SCR_REQUEST, scanConcentratorRoamingContSM_requestSCR},      /*"START_SCAN",*/
68			{CONT_SCAN_STATE_IDLE, actionUnexpected},                                     /*"SCR_RUN",*/
69			{CONT_SCAN_STATE_IDLE, actionUnexpected},                                     /*"SCR_PEND",  */
70			{CONT_SCAN_STATE_IDLE, actionUnexpected},                                     /*"SCR_REJECT",*/
71            {CONT_SCAN_STATE_IDLE, actionUnexpected},                                     /*"ABORT_SCAN"*/
72            {CONT_SCAN_STATE_IDLE, actionUnexpected},                                     /*"FW_RESET"*/
73            {CONT_SCAN_STATE_IDLE, actionNop},                                            /*"STOP_SCAN"*/
74            {CONT_SCAN_STATE_IDLE, actionUnexpected}                                      /*"SCAN_COMPLETE"*/
75
76		},
77
78		/* next state and actions for SCR_REQUEST state */
79		{
80            {CONT_SCAN_STATE_SCR_REQUEST, actionUnexpected},                                     /*"START_SCAN",*/
81            {CONT_SCAN_STATE_SCANNING, scanConcentratorRoamingContSM_startScan},          /*"SCR_RUN",*/
82			{CONT_SCAN_STATE_SCR_WAIT, actionNop},                                        /*"SCR_PEND",  */
83			{CONT_SCAN_STATE_IDLE, scanConcentratorRoamingContSM_scanRejected},           /*"SCR_REJECT",*/
84            {CONT_SCAN_STATE_SCR_REQUEST, actionUnexpected},                                     /*"ABORT_SCAN"*/
85            {CONT_SCAN_STATE_SCR_REQUEST, actionUnexpected},                                     /*"FW_RESET"*/
86            {CONT_SCAN_STATE_SCR_REQUEST, actionUnexpected},                                     /*"STOP_SCAN"*/
87            {CONT_SCAN_STATE_SCR_REQUEST, actionUnexpected}                                      /*"SCAN_COMPLETE"*/
88		},
89
90		/* next state and actions for SCR_WAIT state */
91		{
92            {CONT_SCAN_STATE_SCR_WAIT, actionUnexpected},                                     /*"START_SCAN",*/
93			{CONT_SCAN_STATE_SCANNING, scanConcentratorRoamingContSM_startScan},          /*"SCR_RUN",*/
94			{CONT_SCAN_STATE_SCR_WAIT, actionNop},                                        /*"SCR_PEND",  */
95			{CONT_SCAN_STATE_IDLE, scanConcentratorRoamingContSM_scanRejected},           /*"SCR_REJECT",*/
96            {CONT_SCAN_STATE_SCR_WAIT, actionUnexpected},                                     /*"ABORT_SCAN"*/
97            {CONT_SCAN_STATE_SCR_WAIT, actionUnexpected},                                     /*"FW_RESET"*/
98            {CONT_SCAN_STATE_IDLE, scanConcentratorRoamingContSM_scanRejected},           /*"STOP_SCAN"*/
99            {CONT_SCAN_STATE_SCR_WAIT, actionUnexpected}                                      /*"SCAN_COMPLETE"*/
100		},
101
102        /* next state and actions for SCANNING state */
103        {
104            {CONT_SCAN_STATE_SCANNING, actionUnexpected},                                     /*"START_SCAN",*/
105			{CONT_SCAN_STATE_SCANNING, actionUnexpected},                                     /*"SCR_RUN",*/
106			{CONT_SCAN_STATE_SCANNING, actionUnexpected},                                     /*"SCR_PEND",  */
107			{CONT_SCAN_STATE_SCANNING, actionUnexpected},                                     /*"SCR_REJECT",*/
108            {CONT_SCAN_STATE_STOPPING, scanConcentratorRoamingContSM_abortScan},          /*"ABORT_SCAN"*/
109            {CONT_SCAN_STATE_SCANNING, scanConcentratorRoamingContSM_recoveryDuringScan}, /*"FW_RESET"*/
110            {CONT_SCAN_STATE_STOPPING, scanConcentratorRoamingContSM_abortScan},          /*"STOP_SCAN"*/
111            {CONT_SCAN_STATE_IDLE, scanConcentratorRoamingContSM_scanComplete}            /*"SCAN_COMPLETE"*/
112		},
113
114        /* next state and actions for STOPPING state */
115		{
116            {CONT_SCAN_STATE_STOPPING, actionUnexpected},                                     /*"START_SCAN",*/
117			{CONT_SCAN_STATE_STOPPING, actionUnexpected},                                     /*"SCR_RUN",*/
118			{CONT_SCAN_STATE_STOPPING, actionUnexpected},                                     /*"SCR_PEND",  */
119			{CONT_SCAN_STATE_STOPPING, actionUnexpected},                                     /*"SCR_REJECT",*/
120            {CONT_SCAN_STATE_STOPPING, actionNop},                                        /*"ABORT_SCAN"*/
121            {CONT_SCAN_STATE_STOPPING, scanConcentratorRoamingContSM_recoveryDuringScan}, /*"FW_RESET"*/
122            {CONT_SCAN_STATE_STOPPING, actionNop},                                        /*"STOP_SCAN"*/
123            {CONT_SCAN_STATE_IDLE, scanConcentratorRoamingContSM_scanComplete}            /*"SCAN_COMPLETE"*/
124		}
125    };
126
127    /* initialize current state */
128    pScanConcentrator->clientSMState[ SCAN_SCC_ROAMING_CONT ] = CONT_SCAN_STATE_IDLE;
129
130    /* configure the state machine */
131	return fsm_Config( pScanConcentrator->clientSM[ SCAN_SCC_ROAMING_CONT ], (fsm_Matrix_t)smMatrix,
132                       CONT_SCAN_NUM_OF_STATES, CONT_SCAN_NUM_OF_EVENTS,
133                       (fsm_eventActivation_t)scanConcentratorRoamingContSM_SMEvent, pScanConcentrator->hOS );
134}
135
136
137#ifdef REPORT_LOG
138
139/* state descriptions, for state machine logging */
140static char stateDesc[ CONT_SCAN_NUM_OF_STATES ][ MAX_DESC_STRING_LEN ] =
141{
142    "STATE_IDLE",
143    "STATE_SCR_REQUEST",
144    "STATE_SCR_WAIT",
145    "STATE_SCANNING",
146    "STATE_STOPPING"
147};
148
149/* event descriptions, for state machine logging */
150static char eventDesc[ CONT_SCAN_NUM_OF_EVENTS ][ MAX_DESC_STRING_LEN ] =
151{
152    "EVENT_START_SCAN",
153    "EVENT_SCR_RUN",
154    "EVENT_SCR_PEND",
155    "EVENT_SCR_REJECT",
156    "EVENT_ABORT_SCAN",
157    "EVENT_FW_RESET",
158    "EVENT_STOP_SCAN",
159    "EVENT_SCAN_COMPLETE"
160};
161
162#endif
163
164
165/**
166 * \author Ronen Kalish\n
167 * \date 02-Jan-2005\n
168 * \brief Processes an event.
169 *
170 * Function Scope \e Public.\n
171 * \param hScanCncn - handle to the scan concentrator object.\n
172 * \param currentState - the current continuous scan for roaming SM state.\n
173 * \param event - the event to handle.\n
174 * \return OK if successful, NOK otherwise.\n
175 */
176TI_STATUS scanConcentratorRoamingContSM_SMEvent( TI_HANDLE hScanCncn, scan_contSMStates_e* currentState,
177                                                 scan_contSMEvents_e event )
178{
179    scanConcentrator_t *pScanConcentrator = (scanConcentrator_t *)hScanCncn;
180	TI_STATUS status = OK;
181	UINT8 nextState;
182
183    /* obtain the next state */
184	status = fsm_GetNextState( pScanConcentrator->clientSM[ SCAN_SCC_ROAMING_CONT ], *(UINT8*)currentState, (UINT8)event, &nextState );
185	if ( status != OK )
186	{
187		WLAN_REPORT_SM( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG, ("Failed getting continuous scan for roaming next state.\n") );
188		return NOK;
189	}
190
191    /* report the move */
192    WLAN_REPORT_SM( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG,
193                    ("CONT ROAMING SCAN: <%s, %s> --> %s\n\n",
194                    stateDesc[(UINT8)*currentState],
195                    eventDesc[(UINT8)event],
196                    stateDesc[nextState]) );
197
198    /* move */
199    return fsm_Event( pScanConcentrator->clientSM[ SCAN_SCC_ROAMING_CONT ], (UINT8*)currentState,
200                      (UINT8)event, hScanCncn );
201}
202
203/**
204 * \author Ronen Kalish\n
205 * \date 02-Jan-2005\n
206 * \brief SM action - handles a start scan event (by requesting the SCR)
207 *
208 * Function Scope \e Public.\n
209 * \param hScanCncn - handle to the scan concentrator object.\n
210 * \return OK if successful, NOK otherwise.\n
211 */
212TI_STATUS scanConcentratorRoamingContSM_requestSCR( TI_HANDLE hScanCncn )
213{
214    scr_clientRequestStatus_e scrReplyStatus;
215	scr_pendReason_e scrPendReason;
216    scanConcentrator_t* pScanConcentrator = (scanConcentrator_t*)hScanCncn;
217
218    WLAN_REPORT_INFORMATION( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG,
219                             ("CONT SM: Requesting SCR.\n") );
220
221    /* request the SCR as continuous roaming client, and act according to return status */
222    switch ( scrReplyStatus = scr_clientRequest( pScanConcentrator->hSCR, SCR_CID_CONT_SCAN, &scrPendReason ) )
223    {
224    case SCR_CRS_PEND:
225        WLAN_REPORT_INFORMATION( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG,
226                                 ("CONT SM: SCR pending, pend Reason: %d.\n", scrPendReason) );
227
228        if ( SCR_PR_DIFFERENT_GROUP_RUNNING == scrPendReason )
229        {
230            /* send a reject event to the SM - will not scan if not in connected group */
231			pScanConcentrator->scanResult[ SCAN_SCC_ROAMING_CONT ] = SCAN_CRS_SCAN_FAILED;
232			return scanConcentratorRoamingContSM_SMEvent( hScanCncn,
233                                                          (scan_contSMStates_e*)&(pScanConcentrator->clientSMState[ SCAN_SCC_ROAMING_CONT ]),
234                                                          CONT_SCAN_EVENT_SCR_REJECT );
235        }
236        else
237        {
238        /* send a pend event to the SM */
239        return scanConcentratorRoamingContSM_SMEvent( hScanCncn,
240                                                      (scan_contSMStates_e*)&(pScanConcentrator->clientSMState[ SCAN_SCC_ROAMING_CONT ]),
241                                                      CONT_SCAN_EVENT_SCR_PEND );
242        }
243/*        break; - unreachable */
244
245    case SCR_CRS_RUN:
246        /* send a run event to the SM */
247        WLAN_REPORT_INFORMATION( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG,
248                                 ("CONT SM: SCR acquired.\n") );
249        return scanConcentratorRoamingContSM_SMEvent( hScanCncn,
250                                                      (scan_contSMStates_e*)&(pScanConcentrator->clientSMState[ SCAN_SCC_ROAMING_CONT ]),
251                                                      CONT_SCAN_EVENT_SCR_RUN );
252/*        break; - unreachable */
253
254    default:
255        WLAN_REPORT_WARNING( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG,
256                             ("CONT SM: SCR returned unrecognized status: %d.\n", scrReplyStatus) );
257        /* Notify scan complete to recover from this error */
258		pScanConcentrator->scanResult[ SCAN_SCC_ROAMING_CONT ] = SCAN_CRS_SCAN_FAILED;
259        scanConcentratorRoamingContSM_SMEvent( hScanCncn,
260                                               (scan_contSMStates_e*)&(pScanConcentrator->clientSMState[ SCAN_SCC_ROAMING_CONT ]),
261                                               CONT_SCAN_EVENT_SCAN_COMPLETE );
262        return NOK;
263/*        break; - unreachable */
264    }
265
266 /*   return OK; - unreachable */
267}
268
269/**
270 * \author Ronen Kalish\n
271 * \date 02-Jan-2005\n
272 * \brief SM action - handles a SCR run event (by starting the actual scan)
273 *
274 * Function Scope \e Public.\n
275 * \param hScanCncn - handle to the scan concentrator object.\n
276 * \return OK if successful, NOK otherwise.\n
277 */
278TI_STATUS scanConcentratorRoamingContSM_startScan( TI_HANDLE hScanCncn )
279{
280    scanConcentrator_t* pScanConcentrator = (scanConcentrator_t*)hScanCncn;
281    TI_STATUS status;
282
283    WLAN_REPORT_INFORMATION( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG,
284                             ("CONT SM: Sending scan command to scan SRV.\n") );
285
286    /* mark that this scan is currently running */
287    pScanConcentrator->currentRunningScanClient = SCAN_SCC_ROAMING_CONT;
288
289    /* register for scan results with the MLME parser */
290    if ( OK != mlmeParser_registerForBeaconAndProbeResp( pScanConcentrator->hMlme,
291                                                         scanConcentrator_mlmeResultCB,
292                                                         hScanCncn ) )
293    {
294        WLAN_REPORT_WARNING( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG,
295                             ("CONT SM: MLME result registration failed.\n") );
296
297        /* mark the return status */
298        pScanConcentrator->scanResult[ SCAN_SCC_ROAMING_CONT ] = SCAN_CRS_SCAN_FAILED;
299
300        /* could not start scan, send a scan complete event */
301        scanConcentratorRoamingContSM_SMEvent( hScanCncn,
302                                               (scan_contSMStates_e*)&(pScanConcentrator->clientSMState[ SCAN_SCC_ROAMING_CONT ]),
303                                               CONT_SCAN_EVENT_SCAN_COMPLETE );
304
305        return NOK;
306    }
307
308	 /* stop built-in test timer, to avoid TX stuck due to heavy traffic and unknown scan result time originally at scanSrv*/
309	healthMonitor_suspendPeriodicTest( pScanConcentrator->hHealthMonitor );
310
311    /* call the scan SRV start scan */
312    if ( OK != (status = MacServices_scanSRV_scan( pScanConcentrator->hMacServices,
313                                       &(pScanConcentrator->clientScanParams[ SCAN_SCC_ROAMING_CONT ]),
314                                       FALSE,
315                                       TRUE,
316                                       FALSE,
317                                       POWER_SAVE_ON,
318                                       TRUE ,
319									   NULL,NULL)) )
320    {
321        WLAN_REPORT_WARNING( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG,
322                             ("CONT SM: scan SRV returned status %d, quitting continuous scan.\n", status) );
323
324        /* mark the return status */
325        pScanConcentrator->scanResult[ SCAN_SCC_ROAMING_CONT ] = SCAN_CRS_SCAN_FAILED;
326
327	    /* unregister at the MLME for scan result frames */
328        mlmeParser_unregisterForBeaconAndProbeResp( pScanConcentrator->hMlme );
329
330        /* could not start scan, send a scan complete event */
331        scanConcentratorRoamingContSM_SMEvent( hScanCncn,
332                                               (scan_contSMStates_e*)&(pScanConcentrator->clientSMState[ SCAN_SCC_ROAMING_CONT ]),
333                                               CONT_SCAN_EVENT_SCAN_COMPLETE );
334
335        return NOK;
336    }
337
338    return OK;
339}
340
341/**
342 * \author Ronen Kalish\n
343 * \date 02-Jan-2005\n
344 * \brief SM action - handles a stop scan or abort scan event (by stopping the actual scan)
345 *
346 * Function Scope \e Public.\n
347 * \param hScanCncn - handle to the scan concentrator object.\n
348 * \return OK if successful, NOK otherwise.\n
349 */
350TI_STATUS scanConcentratorRoamingContSM_abortScan( TI_HANDLE hScanCncn )
351{
352    scanConcentrator_t* pScanConcentrator = (scanConcentrator_t*)hScanCncn;
353    BOOLEAN  bSendNullData;
354
355    WLAN_REPORT_INFORMATION( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG,
356                             ("CONT SM: aborting scan.\n") );
357    bSendNullData = (pScanConcentrator->bAbortOrStop == SCAN_CNCN_STOP) ? TRUE : FALSE;
358
359    /* call the scan SRV stop scan */
360    MacServices_scanSRV_stopScan( pScanConcentrator->hMacServices, bSendNullData, NULL , NULL  );
361
362    return OK;
363}
364
365/**
366 * \author Ronen Kalish\n
367 * \date 10-July-2005\n
368 * \brief SM action - handles a recovery event (calls the scan SRV abort on FW reset and than finishes scan)
369 *
370 * Function Scope \e Public.\n
371 * \param hScanCncn - handle to the scan concentrator object.\n
372 * \return OK if successful, NOK otherwise.\n
373 */
374TI_STATUS scanConcentratorRoamingContSM_recoveryDuringScan( TI_HANDLE hScanCncn )
375{
376    scanConcentrator_t* pScanConcentrator = (scanConcentrator_t*)hScanCncn;
377
378    WLAN_REPORT_INFORMATION( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG,
379                             ("CONT SM: Recovery occured!.\n") );
380
381    /* reset the scan SRV */
382    MacServices_scanSRV_stopOnFWReset( pScanConcentrator->hMacServices );
383
384    /* send a scan complete event to the SM */
385    return scanConcentratorRoamingContSM_SMEvent( hScanCncn,
386                                                  (scan_contSMStates_e*)&(pScanConcentrator->clientSMState[ SCAN_SCC_ROAMING_CONT ]),
387                                                  CONT_SCAN_EVENT_SCAN_COMPLETE );
388}
389
390/**
391 * \author Ronen Kalish\n
392 * \date 02-Jan-2005\n
393 * \brief SM action - handles a scan complete event (by releasing the SCR and calling the scan complete CB).
394 *
395 * Function Scope \e Public.\n
396 * \param hScanCncn - handle to the scan concentrator object.\n
397 * \return OK if successful, NOK otherwise.\n
398 */
399TI_STATUS scanConcentratorRoamingContSM_scanComplete( TI_HANDLE hScanCncn )
400{
401    scanConcentrator_t* pScanConcentrator = (scanConcentrator_t*)hScanCncn;
402
403    WLAN_REPORT_INFORMATION( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG,
404                             ("CONT SM: Scan is complete.\n") );
405
406	/* unregister at the MLME for scan result frames */
407    mlmeParser_unregisterForBeaconAndProbeResp( pScanConcentrator->hMlme );
408
409    /* mark that this scan is no longer running */
410    pScanConcentrator->currentRunningScanClient = SCAN_SCC_NO_CLIENT;
411
412    /* release the SCR */
413    scr_clientComplete( pScanConcentrator->hSCR, SCR_CID_CONT_SCAN );
414
415    /* notify the scan complete to the scan mngr */
416    if ( FALSE == pScanConcentrator->bInRequest )
417    {
418        pScanConcentrator->scanResultCB[ SCAN_SCC_ROAMING_CONT ]( pScanConcentrator->scanResultCBObj[ SCAN_SCC_ROAMING_CONT ],
419                                                                  pScanConcentrator->scanResult[ SCAN_SCC_ROAMING_CONT ],
420                                                                  NULL, pScanConcentrator->SPSScanResult );
421    }
422
423    return OK;
424}
425
426/**
427 * \author Ronen Kalish\n
428 * \date 02-Jan-2005\n
429 * \brief SM action - handles a scan reject event (abort scan before scan actually started)\n
430 *
431 * Function Scope \e Public.\n
432 * \param hScanCncn - handle to the scan concentrator object.\n
433 * \return OK if successful, NOK otherwise.\n
434 */
435TI_STATUS scanConcentratorRoamingContSM_scanRejected( TI_HANDLE hScanCncn )
436{
437    scanConcentrator_t* pScanConcentrator = (scanConcentrator_t*)hScanCncn;
438
439    WLAN_REPORT_INFORMATION( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG,
440                             ("CONT SM: Scan is rejected.\n") );
441
442    /* release the SCR */
443    scr_clientComplete( pScanConcentrator->hSCR, SCR_CID_CONT_SCAN );
444
445    /* notify the scan complete to the scan mngr */
446    if ( FALSE == pScanConcentrator->bInRequest )
447    {
448        pScanConcentrator->scanResultCB[ SCAN_SCC_ROAMING_CONT ]( pScanConcentrator->scanResultCBObj[ SCAN_SCC_ROAMING_CONT ],
449                                                                  pScanConcentrator->scanResult[ SCAN_SCC_ROAMING_CONT ],
450                                                                  NULL, pScanConcentrator->SPSScanResult );
451    }
452
453    return OK;
454}
455
456/**
457 * \author Ronen Kalish\n
458 * \date 11-Jan-2005\n
459 * \brief Handles an unexpected event.\n
460 *
461 * Function Scope \e Private.\n
462 * \param hScanCncn - handle to the scan concentrator object.\n
463 * \return always OK.\n
464 */
465TI_STATUS actionUnexpected( TI_HANDLE hScanCncn )
466{
467    scanConcentrator_t* pScanConcentrator = (scanConcentrator_t*)hScanCncn;
468
469    WLAN_REPORT_ERROR( pScanConcentrator->hReport, SCAN_CNCN_MODULE_LOG, ("Continuous scan for roaming state machine error, unexpected Event, state=%d\n\n",
470																		  pScanConcentrator->clientSMState[SCAN_SCC_ROAMING_CONT]) );
471
472    return OK;
473}
474
475/**
476 * \author Ronen Kalish\n
477 * \date 10-Jan-2005\n
478 * \brief Handles an event that doesn't require any action.\n
479 *
480 * Function Scope \e Private.\n
481 * \param hScanCncn - handle to the scan concentrator object.\n
482 * \return always OK.\n
483 */
484TI_STATUS actionNop( TI_HANDLE hScanCncn )
485{
486    return OK;
487}
488
489