qcacld-3.0: Use pre_auth_channel_freq to replace preAuthchannelNum

Add pre_auth_channel_freq into struct sSirFTPreAuthReq and replace
preAuthchannelNum.

Change-Id: I47f8a1e4057b4efd2a307b26c066a695e5338aa2
CRs-Fixed: 2568598
diff --git a/core/mac/src/pe/lim/lim_ft_preauth.c b/core/mac/src/pe/lim/lim_ft_preauth.c
index c140ba5..a588c8c 100644
--- a/core/mac/src/pe/lim/lim_ft_preauth.c
+++ b/core/mac/src/pe/lim/lim_ft_preauth.c
@@ -190,8 +190,8 @@
 	 * Dont need to suspend if APs are in same channel and DUT
 	 * is not in MCC state
 	 */
-	if ((wlan_reg_freq_to_chan(mac_ctx->pdev, session->curr_op_freq) !=
-	    session->ftPEContext.pFTPreAuthReq->preAuthchannelNum)
+	if ((session->curr_op_freq !=
+	     session->ftPEContext.pFTPreAuthReq->pre_auth_channel_freq)
 	    || lim_is_in_mcc(mac_ctx)) {
 		/* Need to suspend link only if the channels are different */
 		pe_debug("Performing pre-auth on diff channel(session %pK)",
@@ -468,11 +468,11 @@
 		ft_session->ht_config = pe_session->ht_config;
 		ft_session->limSmeState = eLIM_SME_WT_REASSOC_STATE;
 
-		if (IS_5G_CH(pe_session->ftPEContext.pFTPreAuthReq->
-			preAuthchannelNum))
-			ft_session->vdev_nss = mac->vdev_type_nss_5g.sta;
-		else
+		if (wlan_reg_is_24ghz_ch_freq(pe_session->ftPEContext.
+		    pFTPreAuthReq->pre_auth_channel_freq))
 			ft_session->vdev_nss = mac->vdev_type_nss_2g.sta;
+		else
+			ft_session->vdev_nss = mac->vdev_type_nss_5g.sta;
 
 		pe_debug("created session (%pK) with id = %d",
 			ft_session, ft_session->peSessionId);
@@ -483,18 +483,17 @@
 		lim_print_mac_addr(mac, pe_session->limReAssocbssId, LOGD);
 	}
 send_rsp:
-	if ((wlan_reg_freq_to_chan(mac->pdev, pe_session->curr_op_freq) !=
-	     pe_session->ftPEContext.pFTPreAuthReq->preAuthchannelNum) ||
+	if ((pe_session->curr_op_freq !=
+	     pe_session->ftPEContext.pFTPreAuthReq->pre_auth_channel_freq) ||
 	    lim_is_in_mcc(mac)) {
 		/* Need to move to the original AP channel */
 		lim_process_abort_scan_ind(mac, pe_session->smeSessionId,
 			pe_session->ftPEContext.pFTPreAuthReq->scan_id,
 			mac->lim.req_id | PREAUTH_REQUESTOR_ID);
 	} else {
-		pe_debug("Pre auth on same channel as connected AP channel %d\
-			and no mcc pe sessions exist",
-			pe_session->ftPEContext.pFTPreAuthReq->
-			preAuthchannelNum);
+		pe_debug("Pre auth on same freq as connected AP freq %d and no mcc pe sessions exist",
+			 pe_session->ftPEContext.pFTPreAuthReq->
+			 pre_auth_channel_freq);
 		lim_ft_process_pre_auth_result(mac, pe_session);
 	}
 }
@@ -718,7 +717,7 @@
 
 	req->scan_req.chan_list.num_chan = 1;
 	req->scan_req.chan_list.chan[0].freq =
-			cds_chan_to_freq(ft_preauth_req->preAuthchannelNum);
+			ft_preauth_req->pre_auth_channel_freq;
 
 	req->scan_req.dwell_time_active = LIM_FT_PREAUTH_SCAN_TIME;
 	req->scan_req.dwell_time_passive = LIM_FT_PREAUTH_SCAN_TIME;
diff --git a/core/mac/src/pe/lim/lim_send_frames_host_roam.c b/core/mac/src/pe/lim/lim_send_frames_host_roam.c
index 80eec50..fcbf26c 100644
--- a/core/mac/src/pe/lim/lim_send_frames_host_roam.c
+++ b/core/mac/src/pe/lim/lim_send_frames_host_roam.c
@@ -409,9 +409,8 @@
 			   (uint8_t *) frame, (bytes + ft_ies_length));
 
 	if ((pe_session->ftPEContext.pFTPreAuthReq) &&
-	    (lim_get_rf_band(
-	     pe_session->ftPEContext.pFTPreAuthReq->preAuthchannelNum)) ==
-							BAND_5G)
+	    (!wlan_reg_is_24ghz_ch_freq(
+	     pe_session->ftPEContext.pFTPreAuthReq->pre_auth_channel_freq)))
 		tx_flag |= HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME;
 	else if (wlan_reg_is_5ghz_ch_freq(pe_session->curr_op_freq) ||
 		 pe_session->opmode == QDF_P2P_CLIENT_MODE ||
diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c
index c859d77..2c6dbc5 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -2779,9 +2779,8 @@
 			   frame, frame_len);
 
 	if ((session->ftPEContext.pFTPreAuthReq) &&
-	    (lim_get_rf_band(
-	     session->ftPEContext.pFTPreAuthReq->preAuthchannelNum)) ==
-				BAND_5G)
+	    (!wlan_reg_is_24ghz_ch_freq(
+	     session->ftPEContext.pFTPreAuthReq->pre_auth_channel_freq)))
 		tx_flag |= HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME;
 	else if (wlan_reg_is_5ghz_ch_freq(session->curr_op_freq) ||
 		 session->opmode == QDF_P2P_CLIENT_MODE ||
@@ -2801,8 +2800,8 @@
 				      session, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
 
 	if (session->ftPEContext.pFTPreAuthReq)
-		ch_freq_tx_frame = cds_chan_to_freq(
-			session->ftPEContext.pFTPreAuthReq->preAuthchannelNum);
+		ch_freq_tx_frame = session->ftPEContext.
+				pFTPreAuthReq->pre_auth_channel_freq;
 
 	qdf_status = wma_tx_frameWithTxComplete(mac_ctx, packet,
 				 (uint16_t)frame_len,