summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/sme/src/csr/csr_api_scan.c53
1 files changed, 40 insertions, 13 deletions
diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c
index e9fb7daff066..3d37700ae843 100644
--- a/core/sme/src/csr/csr_api_scan.c
+++ b/core/sme/src/csr/csr_api_scan.c
@@ -1615,24 +1615,17 @@ static bool csr_is_better_bss(tpAniSirGlobal mac_ctx,
return ret;
}
-/* Add the channel to the occupiedChannels array */
-static void csr_scan_add_to_occupied_channels(tpAniSirGlobal pMac,
- struct tag_csrscan_result *pResult,
- uint8_t sessionId,
- tCsrChannel *occupied_ch,
- tDot11fBeaconIEs *pIes,
- bool is_init_list)
+/* Add special channel to the occupiedChannels array */
+static void csr_add_to_occupied_channels(tpAniSirGlobal pMac,
+ uint8_t ch,
+ uint8_t sessionId,
+ tCsrChannel *occupied_ch,
+ bool is_init_list)
{
QDF_STATUS status;
- uint8_t ch;
uint8_t num_occupied_ch = occupied_ch->numChannels;
uint8_t *occupied_ch_lst = occupied_ch->channelList;
- ch = pResult->Result.BssDescriptor.channelId;
- if (!csr_neighbor_roam_connected_profile_match(pMac,
- sessionId, pResult, pIes))
- return;
-
if (is_init_list)
pMac->scan.roam_candidate_count[sessionId]++;
@@ -1653,6 +1646,29 @@ static void csr_scan_add_to_occupied_channels(tpAniSirGlobal pMac,
}
}
+/* Add the channel to the occupiedChannels array */
+static void csr_scan_add_to_occupied_channels(
+ tpAniSirGlobal pMac,
+ struct tag_csrscan_result *pResult,
+ uint8_t sessionId,
+ tCsrChannel *occupied_ch,
+ tDot11fBeaconIEs *pIes,
+ bool is_init_list)
+{
+ uint8_t ch;
+
+ ch = pResult->Result.BssDescriptor.channelId;
+ if (!csr_neighbor_roam_connected_profile_match(pMac, sessionId,
+ pResult, pIes))
+ return;
+ csr_add_to_occupied_channels(
+ pMac,
+ ch,
+ sessionId,
+ occupied_ch,
+ is_init_list);
+}
+
/* Put the BSS into the scan result list */
/* pIes can not be NULL */
static void csr_scan_add_result(tpAniSirGlobal pMac, struct tag_csrscan_result
@@ -8027,6 +8043,7 @@ void csr_init_occupied_channels_list(tpAniSirGlobal pMac, uint8_t sessionId)
tDot11fBeaconIEs *pIes = NULL;
tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
&pMac->roam.neighborRoamInfo[sessionId];
+ tCsrRoamConnectedProfile *profile = NULL;
if (0 != pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels) {
/*
@@ -8046,10 +8063,20 @@ void csr_init_occupied_channels_list(tpAniSirGlobal pMac, uint8_t sessionId)
return;
}
+ profile = &pMac->roam.roamSession[sessionId].connectedProfile;
+ if (!profile)
+ return;
+
/* Empty occupied channels here */
pMac->scan.occupiedChannels[sessionId].numChannels = 0;
pMac->scan.roam_candidate_count[sessionId] = 0;
+ csr_add_to_occupied_channels(
+ pMac, profile->operationChannel,
+ sessionId,
+ &pMac->scan.occupiedChannels[sessionId],
+ false);
+
csr_ll_lock(&pMac->scan.scanResultList);
pEntry = csr_ll_peek_head(&pMac->scan.scanResultList, LL_ACCESS_NOLOCK);
while (pEntry) {