diff options
| author | Jianmin Zhu <jianminz@codeaurora.org> | 2019-04-23 15:37:14 +0800 |
|---|---|---|
| committer | Jianmin Zhu <jianminz@codeaurora.org> | 2019-04-23 19:30:19 +0800 |
| commit | 93f8d7c1b2ec27bf8caac7ebd507a3749ececa74 (patch) | |
| tree | 4afe1bbfa4b3c25f4ed84a1eb2c378d3e9aff7bc | |
| parent | da61230ab7e07993c03302ac579a7060f7bab9ce (diff) | |
qcacld-3.0: Add home channel into roam scan channel map directly
After DUT STA connected, search connected ssid from scan cache,
get each channel and put into roam scan channel map. To make sure
current home channel is always included and don't set full
channel as channel map, add home channel into roam scan channel
map directly.
Change-Id: Ifb25562259a9b7f35849b39d8e0d238e754d4f96
CRs-Fixed: 2436200
| -rw-r--r-- | core/sme/src/csr/csr_api_scan.c | 53 |
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) { |
