Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b79bb8d authored by Jianmin Zhu's avatar Jianmin Zhu Committed by Gerrit - the friendly Code Review server
Browse files

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
parent 1a501b4e
Loading
Loading
Loading
Loading
+15 −10
Original line number Diff line number Diff line
@@ -356,19 +356,16 @@ QDF_STATUS csr_scan_result_purge(tpAniSirGlobal pMac,
}

/* Add the channel to the occupiedChannels array */
static void csr_scan_add_to_occupied_channels(tpAniSirGlobal pMac,
					struct scan_cache_entry *entry,
static void csr_add_to_occupied_channels(tpAniSirGlobal pMac,
					 uint8_t ch,
					 uint8_t sessionId,
					 struct csr_channel *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 = entry->channel.chan_idx;

	if (is_init_list)
		pMac->scan.roam_candidate_count[sessionId]++;

@@ -3139,6 +3136,7 @@ void csr_init_occupied_channels_list(tpAniSirGlobal mac_ctx,
	tpCsrNeighborRoamControlInfo neighbor_roam_info =
		&mac_ctx->roam.neighborRoamInfo[sessionId];
	tCsrRoamConnectedProfile *profile = NULL;
	uint8_t ch;

	if (!(mac_ctx && mac_ctx->roam.roamSession &&
	      CSR_IS_SESSION_VALID(mac_ctx, sessionId))) {
@@ -3196,6 +3194,12 @@ void csr_init_occupied_channels_list(tpAniSirGlobal mac_ctx,
	/* Empty occupied channels here */
	mac_ctx->scan.occupiedChannels[sessionId].numChannels = 0;
	mac_ctx->scan.roam_candidate_count[sessionId] = 0;

	csr_add_to_occupied_channels(
			mac_ctx, profile->operationChannel,
			sessionId,
			&mac_ctx->scan.occupiedChannels[sessionId],
			true);
	list = ucfg_scan_get_result(pdev, filter);
	if (list)
		sme_debug("num_entries %d", qdf_list_size(list));
@@ -3212,8 +3216,9 @@ void csr_init_occupied_channels_list(tpAniSirGlobal mac_ctx,
	while (cur_lst) {
		cur_node = qdf_container_of(cur_lst, struct scan_cache_node,
					    node);
		csr_scan_add_to_occupied_channels(
				mac_ctx, cur_node->entry,
		ch = cur_node->entry->channel.chan_idx;
		csr_add_to_occupied_channels(
				mac_ctx, ch,
				sessionId,
				&mac_ctx->scan.occupiedChannels[sessionId],
				true);