Sfoglia il codice sorgente

qcacld-3.0: Use dfs api to convert chan to freq

center frequency of 40/80/160 are not valid frequency
for regulatory component, so regulatory api's may not
covert freq to channel or chan to freq. use dfs api’s
to covert the same.

Change-Id: I3bb7d4997d0dbcbd757537fe3fee9ad5f7f97904
CRs-Fixed: 2017481
Arif Hussain 8 anni fa
parent
commit
4e9afac0cf
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      core/sap/src/sap_fsm.c

+ 5 - 2
core/sap/src/sap_fsm.c

@@ -1209,10 +1209,10 @@ static void sap_get_cac_dur_dfs_region(ptSapContext sap_ctx,
 void sap_dfs_set_current_channel(void *ctx)
 {
 	ptSapContext sap_ctx = (ptSapContext) ctx;
-	uint16_t ic_freq = 0;
 	uint32_t ic_flags = 0;
 	uint16_t ic_flagext = 0;
 	uint8_t ic_ieee = sap_ctx->channel;
+	uint16_t ic_freq = utils_dfs_chan_to_freq(sap_ctx->channel);
 	uint8_t vht_seg0 = sap_ctx->csr_roamProfile.ch_params.center_freq_seg0;
 	uint8_t vht_seg1 = sap_ctx->csr_roamProfile.ch_params.center_freq_seg1;
 	struct wlan_objmgr_pdev *pdev;
@@ -1257,7 +1257,10 @@ void sap_dfs_set_current_channel(void *ctx)
 		return;
 	}
 
-	ic_freq = wlan_reg_chan_to_freq(pdev, sap_ctx->channel);
+	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
+		  FL("freq=%d, channel=%d, seg0=%d, seg1=%d, flags=%d"),
+		  ic_freq, ic_ieee, vht_seg0, vht_seg1, ic_flags);
+
 	tgt_dfs_set_current_channel(pdev, ic_freq, ic_flags,
 			ic_flagext, ic_ieee, vht_seg0, vht_seg1);
 }