qcacld-3.0: Use PLD APIs

Replace CNSS/ICNSS APIs with PLD APIs.

Change-Id: Ic0be1ff00dd7b4fc0b125e625f5d3977f4580c5e
CRs-Fixed: 1014363
diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c
index 4eeea7c..a66b58f 100644
--- a/core/sap/src/sap_ch_select.c
+++ b/core/sap/src/sap_ch_select.c
@@ -54,9 +54,7 @@
 #include "parser_api.h"
 #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
 
-#ifdef CONFIG_CNSS
-#include <net/cnss.h>
-#endif
+#include "pld_common.h"
 
 /*--------------------------------------------------------------------------
    Function definitions
@@ -367,12 +365,12 @@
    RETURN VALUE
     NULL
    ============================================================================*/
-#ifdef CONFIG_CNSS
 void sap_update_unsafe_channel_list(ptSapContext pSapCtx)
 {
 	uint16_t i, j;
 	uint16_t unsafe_channel_list[NUM_CHANNELS];
 	uint16_t unsafe_channel_count = 0;
+	qdf_device_t qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
 
 	/* Flush, default set all channel safe */
 	for (i = 0; i < NUM_CHANNELS; i++) {
@@ -395,8 +393,8 @@
 		}
 	}
 #endif
-
-	cnss_get_wlan_unsafe_channel(unsafe_channel_list,
+	pld_get_wlan_unsafe_channel(qdf_ctx->dev,
+				    unsafe_channel_list,
 				     &unsafe_channel_count,
 				     sizeof(unsafe_channel_list));
 
@@ -417,14 +415,6 @@
 
 	return;
 }
-#else
-void sap_update_unsafe_channel_list(ptSapContext pSapCtx)
-{
-	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Not implemented", __func__);
-	return;
-}
-#endif
 
 #endif /* FEATURE_WLAN_CH_AVOID */