Browse Source

qcacld-3.0: sap: Remove excessive logs

Below API's logs failure with caller information,
So no need logs at caller.
qdf_mem_malloc_atomic()
qdf_mem_malloc()
wmi_buf_alloc()
qdf_nbuf_alloc()
wmi_unified_cmd_send()

Change-Id: I392fd31f2ae1e46a0d7ceaa657b77fad4efd31eb
CRs-Fixed: 2327098
Arif Hussain 6 years ago
parent
commit
256cc28720
3 changed files with 15 additions and 38 deletions
  1. 7 15
      core/sap/src/sap_ch_select.c
  2. 5 13
      core/sap/src/sap_fsm.c
  3. 3 10
      core/sap/src/sap_module.c

+ 7 - 15
core/sap/src/sap_ch_select.c

@@ -601,16 +601,10 @@ static bool sap_chan_sel_init(tHalHandle halHandle,
 		pMac->scan.base_channels.numChannels;
 
 	/* Allocate memory for weight computation of 2.4GHz */
-	pSpectCh =
-		(tSapSpectChInfo *)qdf_mem_malloc(
-					(pSpectInfoParams->numSpectChans) *
-					sizeof(*pSpectCh));
-
-	if (pSpectCh == NULL) {
-		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
-			  "In %s, QDF_MALLOC_ERR", __func__);
+	pSpectCh = qdf_mem_malloc((pSpectInfoParams->numSpectChans) *
+			sizeof(*pSpectCh));
+	if (!pSpectCh)
 		return false;
-	}
 
 	/* Initialize the pointers in the DfsParams to the allocated memory */
 	pSpectInfoParams->pSpectCh = pSpectCh;
@@ -1545,9 +1539,9 @@ static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams,
 		pSpectInfoParams->numSpectChans;
 
 	pBeaconStruct = qdf_mem_malloc(sizeof(tSirProbeRespBeacon));
-	if (NULL == pBeaconStruct) {
+	if (!pBeaconStruct)
 		return;
-	}
+
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "In %s, Computing spectral weight", __func__);
 
@@ -1883,11 +1877,9 @@ static void sap_sort_chl_weight_ht80(tSapChSelSpectInfo *pSpectInfoParams)
 	chan_bonding_bitmap *channel_bitmap;
 
 	channel_bitmap = qdf_mem_malloc(sizeof(chan_bonding_bitmap));
-	if (NULL == channel_bitmap) {
-		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
-			"%s: Failed to allocate memory", __func__);
+	if (!channel_bitmap)
 		return;
-	}
+
 	pSpectInfo = pSpectInfoParams->pSpectCh;
 	/* for each HT80 channel, calculate the combined weight of the
 	   four 20MHz weight */

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

@@ -1081,11 +1081,8 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context)
 #endif
 
 	req = qdf_mem_malloc(sizeof(*req));
-	if (!req) {
-		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
-			  FL("Failed to allocate memory"));
+	if (!req)
 		return QDF_STATUS_E_NOMEM;
-	}
 
 	pdev_id = wlan_objmgr_pdev_get_pdev_id(mac_ctx->pdev);
 	self_mac = sap_context->self_mac_addr;
@@ -2961,11 +2958,9 @@ sapconvert_to_csr_profile(tsap_config_t *pconfig_params, eCsrRoamBssType bssType
 	if (pconfig_params->RSNWPAReqIELength) {
 		profile->pRSNReqIE =
 			qdf_mem_malloc(pconfig_params->RSNWPAReqIELength);
-		if (NULL == profile->pRSNReqIE) {
-			QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
-				  " %s Fail to alloc memory", __func__);
+		if (!profile->pRSNReqIE)
 			return eSAP_STATUS_FAILURE;
-		}
+
 		qdf_mem_copy(profile->pRSNReqIE, pconfig_params->RSNWPAReqIE,
 			     pconfig_params->RSNWPAReqIELength);
 		profile->nRSNReqIELength = pconfig_params->RSNWPAReqIELength;
@@ -3346,11 +3341,8 @@ static QDF_STATUS sap_get_channel_list(struct sap_context *sap_ctx,
 	}
 
 	/* Allocate the max number of channel supported */
-	list = (uint8_t *) qdf_mem_malloc(NUM_5GHZ_CHANNELS +
-						NUM_24GHZ_CHANNELS);
-	if (NULL == list) {
-		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
-			  FL("Unable to allocate channel list"));
+	list = qdf_mem_malloc(NUM_5GHZ_CHANNELS + NUM_24GHZ_CHANNELS);
+	if (!list) {
 		*num_ch = 0;
 		*ch_list = NULL;
 		return QDF_STATUS_E_NOMEM;

+ 3 - 10
core/sap/src/sap_module.c

@@ -254,12 +254,8 @@ struct sap_context *sap_create_ctx(void)
 
 	/* dynamically allocate the sapContext */
 	sap_ctx = qdf_mem_malloc(sizeof(*sap_ctx));
-
-	if (NULL == sap_ctx) {
-		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Invalid SAP pointer from p_cds_gctx", __func__);
+	if (!sap_ctx)
 		return NULL;
-	}
 
 	/* Clean up SAP control block, initialize all values */
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG, FL("Enter"));
@@ -2165,12 +2161,9 @@ wlansap_update_sap_config_add_ie(tsap_config_t *pConfig,
 		if (additionIELength > 0) {
 			bufferLength = additionIELength;
 			pBuffer = qdf_mem_malloc(bufferLength);
-			if (NULL == pBuffer) {
-				QDF_TRACE(QDF_MODULE_ID_SAP,
-					  QDF_TRACE_LEVEL_ERROR,
-					  FL("Could not allocate the buffer "));
+			if (!pBuffer)
 				return QDF_STATUS_E_NOMEM;
-			}
+
 			qdf_mem_copy(pBuffer, pAdditionIEBuffer, bufferLength);
 			bufferValid = true;
 			QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,