Explorar o código

qcacld-3.0: Replace ChannelList with freq_list

Replace tCsrChannelInfo->ChannelList by freq_list in:
sap_module.c sme_api.c csr_api_roam.c csr_api_scan.c
csr_neighbor_roam.c

Change-Id: I6c8d2991242f2215fc7cc58220445025bd32fcdb
CRs-Fixed: 2501872
Liangwei Dong %!s(int64=5) %!d(string=hai) anos
pai
achega
4d8c7629b2

+ 1 - 1
core/sap/src/sap_module.c

@@ -1897,7 +1897,7 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
 	sap_ctx->csr_roamProfile.phyMode = phy_mode;
 
 	if (sap_ctx->csr_roamProfile.ChannelInfo.numOfChannels == 0 ||
-	    !sap_ctx->csr_roamProfile.ChannelInfo.ChannelList) {
+	    !sap_ctx->csr_roamProfile.ChannelInfo.freq_list) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			FL("Invalid channel list"));
 		return QDF_STATUS_E_FAULT;

+ 12 - 11
core/sme/src/common/sme_api.c

@@ -1757,11 +1757,11 @@ QDF_STATUS sme_set_ese_roam_scan_channel_list(mac_handle_t mac_handle,
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		return status;
 
-	if (curchnl_list_info->ChannelList) {
+	if (curchnl_list_info->freq_list) {
 		for (i = 0; i < curchnl_list_info->numOfChannels; i++) {
 			j += snprintf(oldChannelList + j,
 				sizeof(oldChannelList) - j, "%d",
-				curchnl_list_info->ChannelList[i]);
+				curchnl_list_info->freq_list[i]);
 		}
 	}
         ucfg_reg_get_band(mac->pdev, &band);
@@ -1769,12 +1769,12 @@ QDF_STATUS sme_set_ese_roam_scan_channel_list(mac_handle_t mac_handle,
 				pChannelList, numChannels,
 				band);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
-		if (curchnl_list_info->ChannelList) {
+		if (curchnl_list_info->freq_list) {
 			j = 0;
 			for (i = 0; i < curchnl_list_info->numOfChannels; i++) {
 				j += snprintf(newChannelList + j,
 					sizeof(newChannelList) - j, "%d",
-					curchnl_list_info->ChannelList[i]);
+					curchnl_list_info->freq_list[i]);
 			}
 		}
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
@@ -7200,13 +7200,13 @@ QDF_STATUS sme_change_roam_scan_channel_list(mac_handle_t mac_handle,
 	}
 	chan_info = &pNeighborRoamInfo->cfgParams.channelInfo;
 
-	if (chan_info->ChannelList) {
+	if (chan_info->freq_list) {
 		for (i = 0; i < chan_info->numOfChannels; i++) {
 			if (j < sizeof(oldChannelList))
 				j += snprintf(oldChannelList + j,
 					sizeof(oldChannelList) -
 					j, "%d",
-					chan_info->ChannelList[i]);
+					chan_info->freq_list[i]);
 			else
 				break;
 		}
@@ -7215,14 +7215,13 @@ QDF_STATUS sme_change_roam_scan_channel_list(mac_handle_t mac_handle,
 	csr_create_bg_scan_roam_channel_list(mac, sessionId, pChannelList,
 			numChannels);
 	sme_set_roam_scan_control(mac_handle, sessionId, 1);
-	if (chan_info->ChannelList) {
+	if (chan_info->freq_list) {
 		j = 0;
 		for (i = 0; i < chan_info->numOfChannels; i++) {
 			if (j < sizeof(newChannelList))
 				j += snprintf(newChannelList + j,
 					sizeof(newChannelList) -
-					j, " %d",
-					chan_info->ChannelList[i]);
+					j, " %d", chan_info->freq_list[i]);
 			else
 				break;
 		}
@@ -7272,7 +7271,7 @@ QDF_STATUS sme_get_roam_scan_channel_list(mac_handle_t mac_handle,
 	status = sme_acquire_global_lock(&mac->sme);
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		return status;
-	if (!pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) {
+	if (!pNeighborRoamInfo->cfgParams.channelInfo.freq_list) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_WARN,
 			FL("Roam Scan channel list is NOT yet initialized"));
 		*pNumChannels = 0;
@@ -7283,7 +7282,9 @@ QDF_STATUS sme_get_roam_scan_channel_list(mac_handle_t mac_handle,
 	*pNumChannels = pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels;
 	for (i = 0; i < (*pNumChannels); i++)
 		pOutPtr[i] =
-			pNeighborRoamInfo->cfgParams.channelInfo.ChannelList[i];
+		wlan_reg_freq_to_chan(
+			mac->pdev,
+			pNeighborRoamInfo->cfgParams.channelInfo.freq_list[i]);
 
 	pOutPtr[i] = '\0';
 	sme_release_global_lock(&mac->sme);

+ 86 - 39
core/sme/src/csr/csr_api_roam.c

@@ -1599,7 +1599,7 @@ QDF_STATUS csr_flush_cfg_bg_scan_roam_channel_list(struct mac_context *mac,
 		&mac->roam.neighborRoamInfo[sessionId];
 
 	/* Free up the memory first (if required) */
-	if (pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) {
+	if (pNeighborRoamInfo->cfgParams.channelInfo.freq_list) {
 		qdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.
 			     ChannelList);
 		pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL;
@@ -1971,12 +1971,13 @@ csr_fetch_ch_lst_from_received_list(struct mac_context *mac_ctx,
 {
 	uint8_t i = 0;
 	uint8_t num_channels = 0;
-	uint8_t *ch_lst = NULL;
+	uint32_t *freq_lst = NULL;
 	uint16_t  unsafe_chan[NUM_CHANNELS];
 	uint16_t  unsafe_chan_cnt = 0;
 	uint16_t  cnt = 0;
 	bool      is_unsafe_chan;
 	qdf_device_t qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
+	bool is_dfs_ch;
 
 	if (!qdf_ctx) {
 		cds_err("qdf_ctx is NULL");
@@ -1989,16 +1990,20 @@ csr_fetch_ch_lst_from_received_list(struct mac_context *mac_ctx,
 	if (curr_ch_lst_info->numOfChannels == 0)
 		return;
 
-	ch_lst = curr_ch_lst_info->ChannelList;
+	freq_lst = curr_ch_lst_info->freq_list;
 	for (i = 0; i < curr_ch_lst_info->numOfChannels; i++) {
+		is_dfs_ch = wlan_reg_is_dfs_ch(
+				mac_ctx->pdev,
+				wlan_reg_freq_to_chan(mac_ctx->pdev,
+						      *freq_lst));
 		if (((mac_ctx->mlme_cfg->lfr.roaming_dfs_channel ==
 			 ROAMING_DFS_CHANNEL_DISABLED) ||
 		     (mac_ctx->roam.configParam.sta_roam_policy.dfs_mode ==
 			 CSR_STA_ROAM_POLICY_DFS_DISABLED)) &&
-		     (wlan_reg_is_dfs_ch(mac_ctx->pdev, *ch_lst))) {
+		     is_dfs_ch) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
-				("ignoring dfs channel %d"), *ch_lst);
-			ch_lst++;
+				  ("ignoring dfs channel freq %d"), *freq_lst);
+			freq_lst++;
 			continue;
 		}
 
@@ -2007,23 +2012,25 @@ csr_fetch_ch_lst_from_received_list(struct mac_context *mac_ctx,
 				unsafe_chan_cnt) {
 			is_unsafe_chan = false;
 			for (cnt = 0; cnt < unsafe_chan_cnt; cnt++) {
-				if (unsafe_chan[cnt] == *ch_lst) {
+				if (unsafe_chan[cnt] ==
+				    wlan_reg_freq_to_chan(
+						mac_ctx->pdev, *freq_lst)) {
 					is_unsafe_chan = true;
 					break;
 				}
 			}
 			if (is_unsafe_chan) {
 				QDF_TRACE(QDF_MODULE_ID_SME,
-						QDF_TRACE_LEVEL_DEBUG,
-					("ignoring unsafe channel %d"),
-					*ch_lst);
-				ch_lst++;
+					  QDF_TRACE_LEVEL_DEBUG,
+					  ("ignoring unsafe channel freq %d"),
+					  *freq_lst);
+				freq_lst++;
 				continue;
 			}
 		}
 		req_buf->ConnectedNetwork.ChannelCache[num_channels++] =
-			*ch_lst;
-		ch_lst++;
+			wlan_reg_freq_to_chan(mac_ctx->pdev, *freq_lst);
+		freq_lst++;
 	}
 	req_buf->ConnectedNetwork.ChannelCount = num_channels;
 	req_buf->ChannelCacheType = CHANNEL_LIST_DYNAMIC;
@@ -4018,8 +4025,9 @@ QDF_STATUS csr_roam_prepare_bss_config_from_profile(
 
 	pBssConfig->band = mac->mlme_cfg->gen.band;
 	/* phymode */
-	if (pProfile->ChannelInfo.ChannelList)
-		operationChannel = pProfile->ChannelInfo.ChannelList[0];
+	if (pProfile->ChannelInfo.freq_list)
+		operationChannel = wlan_reg_freq_to_chan(
+			mac->pdev, pProfile->ChannelInfo.freq_list[0]);
 	pBssConfig->uCfgDot11Mode = csr_roam_get_phy_mode_band_for_bss(mac,
 						pProfile, operationChannel,
 						   &pBssConfig->band);
@@ -4574,8 +4582,9 @@ static void csr_set_cfg_rate_set_from_profile(struct mac_context *mac,
 	qdf_size_t ExtendedOperationalRatesLength = 0;
 	uint8_t operationChannel = 0;
 
-	if (pProfile->ChannelInfo.ChannelList)
-		operationChannel = pProfile->ChannelInfo.ChannelList[0];
+	if (pProfile->ChannelInfo.freq_list)
+		operationChannel = wlan_reg_freq_to_chan(
+			mac->pdev, pProfile->ChannelInfo.freq_list[0]);
 	cfgDot11Mode = csr_roam_get_phy_mode_band_for_bss(mac, pProfile,
 							operationChannel,
 							&band);
@@ -10816,8 +10825,8 @@ csr_roam_prepare_filter_from_profile(struct mac_context *mac_ctx,
 		}
 	}
 
-	if (!profile_ch_info->ChannelList
-	    || (profile_ch_info->ChannelList[0] == 0)) {
+	if (!profile_ch_info->freq_list ||
+	    profile_ch_info->freq_list[0] == 0) {
 		fltr_ch_info->numOfChannels = 0;
 		fltr_ch_info->ChannelList = NULL;
 		fltr_ch_info->freq_list = NULL;
@@ -10847,15 +10856,15 @@ csr_roam_prepare_filter_from_profile(struct mac_context *mac_ctx,
 		num_ch = 0;
 
 		for (idx = 0; idx < profile_ch_info->numOfChannels; idx++) {
-			if (csr_roam_is_channel_valid(mac_ctx,
-						      prof_ch_lst[idx])) {
+			if (csr_roam_is_chan_freq_valid(mac_ctx,
+							prof_freq_lst[idx])) {
 				flt_ch_lst[num_ch] = prof_ch_lst[idx];
 				flt_freq_lst[num_ch] = prof_freq_lst[idx];
 				num_ch++;
 			} else {
 				sme_debug(
-					"Channel (%d) is invalid",
-					profile_ch_info->ChannelList[idx]);
+					"Channel freq (%d) is invalid",
+					profile_ch_info->freq_list[idx]);
 			}
 		}
 
@@ -13471,6 +13480,13 @@ bool csr_roam_is_channel_valid(struct mac_context *mac, uint8_t channel)
 	return fValid;
 }
 
+bool csr_roam_is_chan_freq_valid(struct mac_context *mac, uint32_t freq)
+{
+	return csr_roam_is_channel_valid(
+		mac,
+		(uint8_t)wlan_reg_freq_to_chan(mac->pdev, freq));
+}
+
 /* This function check and validate whether the NIC can do CB (40MHz) */
 static ePhyChanBondState csr_get_cb_mode_from_ies(struct mac_context *mac,
 						  uint8_t chan,
@@ -13952,9 +13968,10 @@ csr_roam_get_bss_start_parms(struct mac_context *mac,
 	tSirMacRateSet *opr_rates = &pParam->operationalRateSet;
 	tSirMacRateSet *ext_rates = &pParam->extendedRateSet;
 
-	if (pProfile->ChannelInfo.numOfChannels
-	    && pProfile->ChannelInfo.ChannelList)
-		tmp_opr_ch = pProfile->ChannelInfo.ChannelList[0];
+	if (pProfile->ChannelInfo.numOfChannels &&
+	    pProfile->ChannelInfo.freq_list)
+		tmp_opr_ch = wlan_reg_freq_to_chan(
+			mac->pdev, pProfile->ChannelInfo.freq_list[0]);
 
 	pParam->uCfgDot11Mode = csr_roam_get_phy_mode_band_for_bss(mac,
 					 pProfile, tmp_opr_ch, &band);
@@ -17645,6 +17662,28 @@ csr_update_roam_scan_offload_request(struct mac_context *mac_ctx,
 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
 
 #if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
+/**
+ * csr_check_band_freq_match() - check if passed band and ch freq match
+ * @band: band to match with channel frequency
+ * @freq: freq to match with band
+ *
+ * Return: bool if match else false
+ */
+static bool
+csr_check_band_freq_match(enum band_info band, uint32_t freq)
+{
+	if (band == BAND_ALL)
+		return true;
+
+	if (band == BAND_2G && WLAN_REG_IS_24GHZ_CH_FREQ(freq))
+		return true;
+
+	if (band == BAND_5G && WLAN_REG_IS_5GHZ_CH_FREQ(freq))
+		return true;
+
+	return false;
+}
+
 /**
  * csr_check_band_channel_match() - check if passed band and channel match
  * parameters
@@ -17685,11 +17724,12 @@ csr_fetch_ch_lst_from_ini(struct mac_context *mac_ctx,
 	enum band_info band;
 	uint8_t i = 0;
 	uint8_t num_channels = 0;
-	uint8_t *ch_lst = roam_info->cfgParams.channelInfo.ChannelList;
+	uint32_t *freq_lst = roam_info->cfgParams.channelInfo.freq_list;
 	uint16_t  unsafe_chan[NUM_CHANNELS];
 	uint16_t  unsafe_chan_cnt = 0;
 	uint16_t  cnt = 0;
 	bool      is_unsafe_chan;
+	bool      is_dfs_ch;
 	qdf_device_t qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
 
 	if (!qdf_ctx) {
@@ -17715,17 +17755,21 @@ csr_fetch_ch_lst_from_ini(struct mac_context *mac_ctx,
 	}
 
 	for (i = 0; i < roam_info->cfgParams.channelInfo.numOfChannels; i++) {
-		if (!csr_check_band_channel_match(band, *ch_lst))
+		if (!csr_check_band_freq_match(
+			band, *freq_lst))
 			continue;
+		is_dfs_ch = wlan_reg_is_dfs_ch(
+			mac_ctx->pdev,
+			wlan_reg_freq_to_chan(mac_ctx->pdev, *freq_lst));
 		/* Allow DFS channels only if the DFS roaming is enabled */
 		if (((mac_ctx->mlme_cfg->lfr.roaming_dfs_channel ==
 			 ROAMING_DFS_CHANNEL_DISABLED) ||
 		     (mac_ctx->roam.configParam.sta_roam_policy.dfs_mode ==
 			 CSR_STA_ROAM_POLICY_DFS_DISABLED)) &&
-		    (wlan_reg_is_dfs_ch(mac_ctx->pdev, *ch_lst))) {
+		    is_dfs_ch) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
-				("ignoring dfs channel %d"), *ch_lst);
-			ch_lst++;
+				  ("ignoring dfs channel freq %d"), *freq_lst);
+			freq_lst++;
 			continue;
 		}
 
@@ -17734,23 +17778,25 @@ csr_fetch_ch_lst_from_ini(struct mac_context *mac_ctx,
 				unsafe_chan_cnt) {
 			is_unsafe_chan = false;
 			for (cnt = 0; cnt < unsafe_chan_cnt; cnt++) {
-				if (unsafe_chan[cnt] == *ch_lst) {
+				if (unsafe_chan[cnt] ==
+				    wlan_reg_freq_to_chan(mac_ctx->pdev,
+							  *freq_lst)) {
 					is_unsafe_chan = true;
 					break;
 				}
 			}
 			if (is_unsafe_chan) {
 				QDF_TRACE(QDF_MODULE_ID_SME,
-						QDF_TRACE_LEVEL_DEBUG,
-					("ignoring unsafe channel %d"),
-					*ch_lst);
-				ch_lst++;
+					  QDF_TRACE_LEVEL_DEBUG,
+					  ("ignoring unsafe channel %d"),
+					  *freq_lst);
+				freq_lst++;
 				continue;
 			}
 		}
 		req_buf->ConnectedNetwork.ChannelCache[num_channels++] =
-			*ch_lst;
-		ch_lst++;
+			wlan_reg_freq_to_chan(mac_ctx->pdev, *freq_lst);
+		freq_lst++;
 
 	}
 	req_buf->ConnectedNetwork.ChannelCount = num_channels;
@@ -19997,7 +20043,8 @@ QDF_STATUS csr_roam_channel_change_req(struct mac_context *mac,
 
 	msg->messageType = eWNI_SME_CHANNEL_CHANGE_REQ;
 	msg->messageLen = sizeof(tSirChanChangeRequest);
-	msg->targetChannel = profile->ChannelInfo.ChannelList[0];
+	msg->targetChannel = wlan_reg_freq_to_chan(
+		mac->pdev, profile->ChannelInfo.freq_list[0]);
 	msg->sec_ch_offset = ch_params->sec_ch_offset;
 	msg->ch_width = profile->ch_params.ch_width;
 	msg->dot11mode = csr_translate_to_wni_cfg_dot11_mode(mac,

+ 8 - 8
core/sme/src/csr/csr_api_scan.c

@@ -1324,7 +1324,7 @@ QDF_STATUS csr_scan_for_ssid(struct mac_context *mac_ctx, uint32_t session_id,
 	uint32_t num_ssid = profile->SSIDs.numOfSSIDs;
 	struct scan_start_request *req;
 	struct wlan_objmgr_vdev *vdev;
-	uint8_t i, chan, num_chan = 0;
+	uint8_t i, num_chan = 0;
 	uint8_t pdev_id;
 	wlan_scan_id scan_id;
 	struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
@@ -1411,10 +1411,11 @@ QDF_STATUS csr_scan_for_ssid(struct mac_context *mac_ctx, uint32_t session_id,
 	if (profile->ChannelInfo.numOfChannels) {
 		for (i = 0; i < profile->ChannelInfo.numOfChannels; i++) {
 			if (csr_roam_is_valid_channel(mac_ctx,
-				profile->ChannelInfo.ChannelList[i])) {
-				chan = profile->ChannelInfo.ChannelList[i];
+				wlan_reg_freq_to_chan(
+					mac_ctx->pdev,
+					profile->ChannelInfo.freq_list[i]))) {
 				req->scan_req.chan_list.chan[num_chan].freq =
-						wlan_chan_to_freq(chan);
+					profile->ChannelInfo.freq_list[i];
 				num_chan++;
 			}
 		}
@@ -2393,10 +2394,9 @@ static QDF_STATUS csr_prepare_scan_filter(struct mac_context *mac_ctx,
 		pFilter->ChannelInfo.numOfChannels;
 	if (filter->num_of_channels > QDF_MAX_NUM_CHAN)
 		filter->num_of_channels = QDF_MAX_NUM_CHAN;
-	qdf_mem_copy(filter->channel_list,
-			pFilter->ChannelInfo.ChannelList,
-			filter->num_of_channels);
-
+	sme_freq_to_chan_list(mac_ctx->pdev, filter->channel_list,
+			      pFilter->ChannelInfo.freq_list,
+			      filter->num_of_channels);
 	if (pFilter->realm_check) {
 		filter->fils_scan_filter.realm_check = true;
 		qdf_mem_copy(filter->fils_scan_filter.fils_realm,

+ 12 - 0
core/sme/src/csr/csr_inside_api.h

@@ -320,6 +320,18 @@ bool csr_is_phy_mode_match(struct mac_context *mac, uint32_t phyMode,
 			   tDot11fBeaconIEs *pIes);
 bool csr_roam_is_channel_valid(struct mac_context *mac, uint8_t channel);
 
+/**
+ * csr_roam_is_chan_freq_valid() - validate channel frequency
+ * @mac: mac context
+ * @freq: channel frequency
+ *
+ * This function validates channel frequency present in valid channel
+ * list or not.
+ *
+ * Return: true or false
+ */
+bool csr_roam_is_chan_freq_valid(struct mac_context *mac, uint32_t freq);
+
 /* pNumChan is a caller allocated space with the sizeof pChannels */
 QDF_STATUS csr_get_cfg_valid_channels(struct mac_context *mac, uint8_t *pChannels,
 				      uint32_t *pNumChan);

+ 16 - 14
core/sme/src/csr/csr_neighbor_roam.c

@@ -1388,6 +1388,8 @@ QDF_STATUS csr_neighbor_roam_init(struct mac_context *mac, uint8_t sessionId)
  */
 void csr_neighbor_roam_close(struct mac_context *mac, uint8_t sessionId)
 {
+	tCsrChannelInfo *current_channel_list_info;
+	tCsrNeighborRoamCfgParams *cfg_params;
 	tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
 		&mac->roam.neighborRoamInfo[sessionId];
 
@@ -1396,10 +1398,12 @@ void csr_neighbor_roam_close(struct mac_context *mac, uint8_t sessionId)
 		sme_warn("Neighbor Roam Algorithm Already Closed");
 		return;
 	}
+	cfg_params = &pNeighborRoamInfo->cfgParams;
 
-	if (pNeighborRoamInfo->cfgParams.channelInfo.ChannelList)
-		qdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.
-			     ChannelList);
+	if (cfg_params->channelInfo.ChannelList)
+		qdf_mem_free(cfg_params->channelInfo.ChannelList);
+	if (cfg_params->channelInfo.freq_list)
+		qdf_mem_free(cfg_params->channelInfo.freq_list);
 
 	pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL;
 	pNeighborRoamInfo->cfgParams.channelInfo.freq_list = NULL;
@@ -1411,20 +1415,18 @@ void csr_neighbor_roam_close(struct mac_context *mac, uint8_t sessionId)
 					&pNeighborRoamInfo->roamableAPList);
 	csr_ll_close(&pNeighborRoamInfo->roamableAPList);
 
-	if (pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
-	    ChannelList) {
-		qdf_mem_free(pNeighborRoamInfo->roamChannelInfo.
-			     currentChannelListInfo.ChannelList);
-	}
+	current_channel_list_info =
+		&pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo;
+	if (current_channel_list_info->ChannelList)
+		qdf_mem_free(current_channel_list_info->ChannelList);
+	if (current_channel_list_info->freq_list)
+		qdf_mem_free(current_channel_list_info->freq_list);
 
-	pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList =
-		NULL;
-	pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.freq_list =
-		NULL;
+	current_channel_list_info->ChannelList = NULL;
+	current_channel_list_info->freq_list = NULL;
 	pNeighborRoamInfo->roamChannelInfo.currentChanIndex =
 		CSR_NEIGHBOR_ROAM_INVALID_CHANNEL_INDEX;
-	pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
-	numOfChannels = 0;
+	current_channel_list_info->numOfChannels = 0;
 	pNeighborRoamInfo->roamChannelInfo.IAPPNeighborListReceived = false;
 
 	/* Free the profile.. */