|
@@ -970,185 +970,6 @@ QDF_STATUS csr_neighbor_roam_merge_channel_lists(tpAniSirGlobal pMac,
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * csr_neighbor_roam_create_chan_list_from_neighbor_report()
|
|
|
- *
|
|
|
- * @mac_ctx: Pointer to Global MAC structure
|
|
|
- * @session_id: Session ID
|
|
|
- *
|
|
|
- * This function is invoked when neighbor report is received for the
|
|
|
- * neighbor request. Based on the channels present in the neighbor report,
|
|
|
- * it generates channel list which will be used in REPORT_SCAN state to
|
|
|
- * scan for these neighbor APs
|
|
|
- *
|
|
|
- * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE otherwise
|
|
|
- */
|
|
|
-QDF_STATUS csr_neighbor_roam_create_chan_list_from_neighbor_report(tpAniSirGlobal pMac,
|
|
|
- uint8_t sessionId)
|
|
|
-{
|
|
|
- tpRrmNeighborReportDesc pNeighborBssDesc;
|
|
|
- tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
|
|
|
- &pMac->roam.neighborRoamInfo[sessionId];
|
|
|
- uint8_t numChannels = 0;
|
|
|
- uint8_t i = 0;
|
|
|
- uint8_t channelList[MAX_BSS_IN_NEIGHBOR_RPT];
|
|
|
- uint8_t mergedOutputNumOfChannels = 0;
|
|
|
-
|
|
|
- /* This should always start from 0 whenever we create a channel list out of neighbor AP list */
|
|
|
- pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport = 0;
|
|
|
-
|
|
|
- pNeighborBssDesc = sme_rrm_get_first_bss_entry_from_neighbor_cache(pMac);
|
|
|
-
|
|
|
- while (pNeighborBssDesc) {
|
|
|
- if (pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport >=
|
|
|
- MAX_BSS_IN_NEIGHBOR_RPT)
|
|
|
- break;
|
|
|
-
|
|
|
- /* Update the neighbor BSS Info in the 11r FT Roam Info */
|
|
|
- pNeighborRoamInfo->FTRoamInfo.
|
|
|
- neighboReportBssInfo[pNeighborRoamInfo->FTRoamInfo.
|
|
|
- numBssFromNeighborReport].channelNum =
|
|
|
- pNeighborBssDesc->pNeighborBssDescription->channel;
|
|
|
- pNeighborRoamInfo->FTRoamInfo.
|
|
|
- neighboReportBssInfo[pNeighborRoamInfo->FTRoamInfo.
|
|
|
- numBssFromNeighborReport].
|
|
|
- neighborScore = (uint8_t) pNeighborBssDesc->roamScore;
|
|
|
- qdf_mem_copy(pNeighborRoamInfo->FTRoamInfo.
|
|
|
- neighboReportBssInfo[pNeighborRoamInfo->FTRoamInfo.
|
|
|
- numBssFromNeighborReport].
|
|
|
- neighborBssId,
|
|
|
- pNeighborBssDesc->pNeighborBssDescription->bssId,
|
|
|
- sizeof(tSirMacAddr));
|
|
|
- pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport++;
|
|
|
-
|
|
|
- /* Saving the channel list non-redundantly */
|
|
|
- for (i = 0; (i < numChannels && i < MAX_BSS_IN_NEIGHBOR_RPT);
|
|
|
- i++) {
|
|
|
- if (pNeighborBssDesc->pNeighborBssDescription->
|
|
|
- channel == channelList[i])
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- if (i == numChannels) {
|
|
|
- if (pNeighborBssDesc->pNeighborBssDescription->channel) {
|
|
|
- if (CSR_IS_ROAM_INTRA_BAND_ENABLED(pMac)) {
|
|
|
- /* Make sure to add only if its the same band */
|
|
|
- if (get_rf_band
|
|
|
- (pNeighborRoamInfo->
|
|
|
- currAPoperationChannel) ==
|
|
|
- get_rf_band(pNeighborBssDesc->
|
|
|
- pNeighborBssDescription->
|
|
|
- channel)) {
|
|
|
- QDF_TRACE(QDF_MODULE_ID_SME,
|
|
|
- QDF_TRACE_LEVEL_INFO,
|
|
|
- "%s: [INFOLOG] Adding %d to Neighbor channel list (Same band)\n",
|
|
|
- __func__,
|
|
|
- pNeighborBssDesc->
|
|
|
- pNeighborBssDescription->
|
|
|
- channel);
|
|
|
- channelList[numChannels] =
|
|
|
- pNeighborBssDesc->
|
|
|
- pNeighborBssDescription->
|
|
|
- channel;
|
|
|
- numChannels++;
|
|
|
- }
|
|
|
- } else {
|
|
|
- QDF_TRACE(QDF_MODULE_ID_SME,
|
|
|
- QDF_TRACE_LEVEL_INFO,
|
|
|
- "%s: [INFOLOG] Adding %d to Neighbor channel list\n",
|
|
|
- __func__,
|
|
|
- pNeighborBssDesc->
|
|
|
- pNeighborBssDescription->
|
|
|
- channel);
|
|
|
- channelList[numChannels] =
|
|
|
- pNeighborBssDesc->
|
|
|
- pNeighborBssDescription->channel;
|
|
|
- numChannels++;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- pNeighborBssDesc =
|
|
|
- sme_rrm_get_next_bss_entry_from_neighbor_cache(pMac,
|
|
|
- pNeighborBssDesc);
|
|
|
- }
|
|
|
-
|
|
|
- if (pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
|
|
|
- ChannelList) {
|
|
|
- qdf_mem_free(pNeighborRoamInfo->roamChannelInfo.
|
|
|
- currentChannelListInfo.ChannelList);
|
|
|
- }
|
|
|
-
|
|
|
- pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList =
|
|
|
- NULL;
|
|
|
- pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
|
|
|
- numOfChannels = 0;
|
|
|
- /* Store the obtained channel list to the Neighbor Control data structure */
|
|
|
- if (numChannels)
|
|
|
- pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
|
|
|
- ChannelList =
|
|
|
- qdf_mem_malloc((numChannels) * sizeof(uint8_t));
|
|
|
- if (NULL ==
|
|
|
- pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
|
|
|
- ChannelList) {
|
|
|
- sms_log(pMac, LOGE,
|
|
|
- FL
|
|
|
- ("Memory allocation for Channel list failed.. TL event ignored"));
|
|
|
- return QDF_STATUS_E_NOMEM;
|
|
|
- }
|
|
|
-
|
|
|
- qdf_mem_copy(pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
|
|
|
- ChannelList, channelList, (numChannels) * sizeof(uint8_t));
|
|
|
- pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
|
|
|
- numOfChannels = numChannels;
|
|
|
- /*
|
|
|
- * Create a Union of occupied channel list learnt by the DUT along with the Neighbor
|
|
|
- * report Channels. This increases the chances of the DUT to get a candidate AP while
|
|
|
- * roaming even if the Neighbor Report is not able to provide sufficient information.
|
|
|
- * */
|
|
|
- if (pMac->scan.occupiedChannels[sessionId].numChannels) {
|
|
|
- csr_neighbor_roam_merge_channel_lists(pMac,
|
|
|
- &pMac->scan.
|
|
|
- occupiedChannels[sessionId].
|
|
|
- channelList[0],
|
|
|
- pMac->scan.
|
|
|
- occupiedChannels[sessionId].
|
|
|
- numChannels,
|
|
|
- &pNeighborRoamInfo->
|
|
|
- roamChannelInfo.
|
|
|
- currentChannelListInfo.
|
|
|
- ChannelList[0],
|
|
|
- pNeighborRoamInfo->
|
|
|
- roamChannelInfo.
|
|
|
- currentChannelListInfo.
|
|
|
- numOfChannels,
|
|
|
- &mergedOutputNumOfChannels);
|
|
|
- pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
|
|
|
- numOfChannels = mergedOutputNumOfChannels;
|
|
|
-
|
|
|
- }
|
|
|
- /*Indicate the firmware about the update only if any new channels are added.
|
|
|
- * Otherwise, the firmware would already be knowing the non-IAPPneighborlist
|
|
|
- * channels. There is no need to update.*/
|
|
|
- if (numChannels) {
|
|
|
- sms_log(pMac, LOG1,
|
|
|
- FL("IAPP Neighbor list callback received as expected"
|
|
|
- "in state %s."),
|
|
|
- mac_trace_get_neighbour_roam_state(pNeighborRoamInfo->
|
|
|
- neighborRoamState));
|
|
|
- pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived =
|
|
|
- true;
|
|
|
- if (csr_roam_is_roam_offload_scan_enabled(pMac)) {
|
|
|
- csr_roam_offload_scan(pMac, sessionId,
|
|
|
- ROAM_SCAN_OFFLOAD_UPDATE_CFG,
|
|
|
- REASON_CHANNEL_LIST_CHANGED);
|
|
|
- }
|
|
|
- }
|
|
|
- pNeighborRoamInfo->roamChannelInfo.currentChanIndex = 0;
|
|
|
-
|
|
|
- return QDF_STATUS_SUCCESS;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* csr_neighbor_roam_is_ssid_and_security_match() - to match ssid/security
|
|
|
* @pMac: Pointer to mac context
|