/** * * roamingMngr_smRoamTrigger * * \b Description: * * This procedure is called when an Roaming event occurs: BSS LOSS, LOW Quality etc. * Performs the following: * - If Roaming is disabled, ignore. * - Indicate Driver that Roaming process is starting * - Get the BSS list from the Scan Manager. * - If the list is not empty, start SELECTION * - If the list is empty, start SCANNING. The type of scan is decided * according to the Neigbor APs existence. * * \b ARGS: * * I - hRoamingMngr - roamingMngr SM context \n * * \b RETURNS: * * TI_OK if successful, TI_NOK otherwise. * * */ static void roamingMngr_smRoamTrigger(TI_HANDLE hRoamingMngr) { roamingMngr_t *pRoamingMngr; roamingMngr_smEvents roamingEvent; pRoamingMngr = (roamingMngr_t*)hRoamingMngr; TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smRoamTrigger, enableDisable = %d\n",pRoamingMngr->roamingMngrConfig.enableDisable); if (!pRoamingMngr->roamingMngrConfig.enableDisable) { /* Ignore any other Roaming event when Roaming is disabled */ TRACE0(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_smRoamTrigger, when Roaming is disabled\n"); return; } /* Indicate the driver that Roaming process is starting */ apConn_prepareToRoaming(pRoamingMngr->hAPConnection, pRoamingMngr->roamingTrigger); /* Get the current BSSIDs from ScanMngr */ pRoamingMngr->pListOfAPs = scanMngr_getBSSList(pRoamingMngr->hScanMngr); if ((pRoamingMngr->pListOfAPs != NULL) && (pRoamingMngr->pListOfAPs->numOfEntries > 0)) { /* No need to SCAN, start SELECTING */ roamingEvent = ROAMING_EVENT_SELECT; } else { /* check if list of APs exists in order to verify which scan to start */ roamingEvent = ROAMING_EVENT_SCAN; if (pRoamingMngr->neighborApsExist) { /* Scan only Neighbor APs */ pRoamingMngr->scanType = ROAMING_PARTIAL_SCAN; } else { /* Scan all channels */ pRoamingMngr->scanType = ROAMING_FULL_SCAN; } } TRACE1(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_smRoamTrigger, scanType = %d\n", pRoamingMngr->scanType); roamingMngr_smEvent(roamingEvent, pRoamingMngr); }
static void roamingMngr_smConnectedToScan (TI_HANDLE hRoamingMngr) { roamingMngr_t *pRoamingMngr = (roamingMngr_t*) hRoamingMngr; TI_STATUS status = TI_OK; status= apConn_prepareToRoaming(pRoamingMngr->hAPConnection, ROAMING_TRIGGER_NONE); if (status == TI_OK) { status = scanMngr_startImmediateScan (pRoamingMngr->hScanMngr,TI_FALSE); } else { roamingMngr_smEvent(ROAMING_MANUAL_EVENT_COMPLETE, hRoamingMngr); } }
static void roamingMngr_smConnectedToHandover(TI_HANDLE hRoamingMngr) { roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr; TI_STATUS status = TI_OK; pRoamingMngr->handoverWasPerformed = TI_TRUE; status= apConn_prepareToRoaming(pRoamingMngr->hAPConnection, pRoamingMngr->roamingTrigger); if (status == TI_OK) { apConn_connectToAP(pRoamingMngr->hAPConnection, &(pRoamingMngr->targetAP.newAP), &(pRoamingMngr->targetAP.connRequest), TI_TRUE); } else { roamingMngr_smEvent(ROAMING_MANUAL_EVENT_REJECT, hRoamingMngr); } }