Browse Source

qcacmn: Use qdf_mem_zero for zero initialization, dp part

Use qdf_mem_zero for zero initialization, dp part.

Change-Id: I8cd5d43b554bf355dfcff0463ba4acb6d22ba254
CRs-Fixed: 2378005
hangtian 6 years ago
parent
commit
fe681a5c2d
6 changed files with 51 additions and 51 deletions
  1. 2 2
      dp/wifi3.0/dp_htt.c
  2. 3 3
      dp/wifi3.0/dp_internal.h
  3. 10 10
      dp/wifi3.0/dp_main.c
  4. 1 1
      dp/wifi3.0/dp_peer.c
  5. 29 29
      dp/wifi3.0/dp_stats.c
  6. 6 6
      dp/wifi3.0/dp_tx.c

+ 2 - 2
dp/wifi3.0/dp_htt.c

@@ -3288,8 +3288,8 @@ htt_htc_soc_attach(struct htt_soc *soc)
 	QDF_STATUS status;
 	struct dp_soc *dpsoc = soc->dp_soc;
 
-	qdf_mem_set(&connect, sizeof(connect), 0);
-	qdf_mem_set(&response, sizeof(response), 0);
+	qdf_mem_zero(&connect, sizeof(connect));
+	qdf_mem_zero(&response, sizeof(response));
 
 	connect.pMetaData = NULL;
 	connect.MetaDataLength = 0;

+ 3 - 3
dp/wifi3.0/dp_internal.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -73,10 +73,10 @@ while (0)
 		fmt, ## args)
 
 #define DP_STATS_INIT(_handle) \
-	qdf_mem_set(&((_handle)->stats), sizeof((_handle)->stats), 0x0)
+	qdf_mem_zero(&((_handle)->stats), sizeof((_handle)->stats))
 
 #define DP_STATS_CLR(_handle) \
-	qdf_mem_set(&((_handle)->stats), sizeof((_handle)->stats), 0x0)
+	qdf_mem_zero(&((_handle)->stats), sizeof((_handle)->stats))
 
 #ifndef DISABLE_DP_STATS
 #define DP_STATS_INC(_handle, _field, _delta) \

+ 10 - 10
dp/wifi3.0/dp_main.c

@@ -5513,7 +5513,7 @@ static QDF_STATUS dp_reset_monitor_mode(struct cdp_pdev *pdev_handle)
 
 	qdf_spin_lock_bh(&pdev->mon_lock);
 
-	qdf_mem_set(&(htt_tlv_filter), sizeof(htt_tlv_filter), 0x0);
+	qdf_mem_zero(&(htt_tlv_filter), sizeof(htt_tlv_filter));
 
 	for (mac_id = 0; mac_id < NUM_RXDMA_RINGS_PER_PDEV; mac_id++) {
 		int mac_for_pdev = dp_get_mac_id_for_pdev(mac_id, pdev_id);
@@ -5616,7 +5616,7 @@ static QDF_STATUS dp_pdev_configure_monitor_rings(struct dp_pdev *pdev)
 		pdev->mo_mgmt_filter, pdev->mo_ctrl_filter,
 		pdev->mo_data_filter);
 
-	qdf_mem_set(&(htt_tlv_filter), sizeof(htt_tlv_filter), 0x0);
+	qdf_mem_zero(&(htt_tlv_filter), sizeof(htt_tlv_filter));
 
 	htt_tlv_filter.mpdu_start = 1;
 	htt_tlv_filter.msdu_start = 1;
@@ -5659,7 +5659,7 @@ static QDF_STATUS dp_pdev_configure_monitor_rings(struct dp_pdev *pdev)
 		}
 	}
 
-	qdf_mem_set(&(htt_tlv_filter), sizeof(htt_tlv_filter), 0x0);
+	qdf_mem_zero(&(htt_tlv_filter), sizeof(htt_tlv_filter));
 
 	htt_tlv_filter.mpdu_start = 1;
 	htt_tlv_filter.msdu_start = 0;
@@ -5786,7 +5786,7 @@ dp_pdev_set_advance_monitor_filter(struct cdp_pdev *pdev_handle,
 		pdev->mo_mgmt_filter, pdev->mo_ctrl_filter,
 		pdev->mo_data_filter);
 
-	qdf_mem_set(&(htt_tlv_filter), sizeof(htt_tlv_filter), 0x0);
+	qdf_mem_zero(&(htt_tlv_filter), sizeof(htt_tlv_filter));
 
 	for (mac_id = 0; mac_id < NUM_RXDMA_RINGS_PER_PDEV; mac_id++) {
 		int mac_for_pdev = dp_get_mac_id_for_pdev(mac_id, pdev_id);
@@ -5846,7 +5846,7 @@ dp_pdev_set_advance_monitor_filter(struct cdp_pdev *pdev_handle,
 		}
 	}
 
-	qdf_mem_set(&(htt_tlv_filter), sizeof(htt_tlv_filter), 0x0);
+	qdf_mem_zero(&(htt_tlv_filter), sizeof(htt_tlv_filter));
 
 	htt_tlv_filter.mpdu_start = 1;
 	htt_tlv_filter.msdu_start = 0;
@@ -6124,9 +6124,9 @@ static inline void dp_aggregate_pdev_stats(struct dp_pdev *pdev)
 		return;
 	}
 
-	qdf_mem_set(&(pdev->stats.tx), sizeof(pdev->stats.tx), 0x0);
-	qdf_mem_set(&(pdev->stats.rx), sizeof(pdev->stats.rx), 0x0);
-	qdf_mem_set(&(pdev->stats.tx_i), sizeof(pdev->stats.tx_i), 0x0);
+	qdf_mem_zero(&pdev->stats.tx, sizeof(pdev->stats.tx));
+	qdf_mem_zero(&pdev->stats.rx, sizeof(pdev->stats.rx));
+	qdf_mem_zero(&pdev->stats.tx_i, sizeof(pdev->stats.tx_i));
 
 	if (pdev->mcopy_mode)
 		DP_UPDATE_STATS(pdev, pdev->invalid_peer);
@@ -7580,7 +7580,7 @@ dp_ppdu_ring_reset(struct dp_pdev *pdev)
 	struct htt_rx_ring_tlv_filter htt_tlv_filter;
 	int mac_id;
 
-	qdf_mem_set(&(htt_tlv_filter), sizeof(htt_tlv_filter), 0x0);
+	qdf_mem_zero(&(htt_tlv_filter), sizeof(htt_tlv_filter));
 
 	for (mac_id = 0; mac_id < NUM_RXDMA_RINGS_PER_PDEV; mac_id++) {
 		int mac_for_pdev = dp_get_mac_id_for_pdev(mac_id,
@@ -8133,7 +8133,7 @@ static void dp_txrx_reset_peer_stats(struct cdp_peer *peer_handle)
 
 	qdf_assert(peer);
 
-	qdf_mem_set(&peer->stats, sizeof(peer->stats), 0);
+	qdf_mem_zero(&peer->stats, sizeof(peer->stats));
 }
 
 /* dp_txrx_get_vdev_stats - Update buffer with cdp_vdev_stats

+ 1 - 1
dp/wifi3.0/dp_peer.c

@@ -2668,7 +2668,7 @@ dp_rx_sec_ind_handler(void *soc_handle, uint16_t peer_id,
 
 #ifdef notyet /* TODO: Check if this is required for wifi3.0 */
 	if (sec_type != cdp_sec_type_wapi) {
-		qdf_mem_set(peer->tids_last_pn_valid, _EXT_TIDS, 0x00);
+		qdf_mem_zero(peer->tids_last_pn_valid, _EXT_TIDS);
 	} else {
 		for (i = 0; i < DP_MAX_TIDS; i++) {
 			/*

+ 29 - 29
dp/wifi3.0/dp_stats.c

@@ -711,7 +711,7 @@ static inline void dp_print_tx_peer_rate_stats_tlv(uint32_t *tag_buf)
 			dp_stats_buf->ack_rssi);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_MCS_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -720,7 +720,7 @@ static inline void dp_print_tx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "tx_mcs = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_SU_MCS_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -728,7 +728,7 @@ static inline void dp_print_tx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	}
 	DP_TRACE_STATS(FATAL, "tx_su_mcs = %s ", str_buf);
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_MU_MCS_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -736,7 +736,7 @@ static inline void dp_print_tx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	}
 	DP_TRACE_STATS(FATAL, "tx_mu_mcs = %s ", str_buf);
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_NSS_LEN; i++) {
 		/* 0 stands for NSS 1, 1 stands for NSS 2, etc. */
 		index += qdf_snprint(&str_buf[index],
@@ -746,7 +746,7 @@ static inline void dp_print_tx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	}
 	DP_TRACE_STATS(FATAL, "tx_nss = %s ", str_buf);
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_BW_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -754,7 +754,7 @@ static inline void dp_print_tx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	}
 	DP_TRACE_STATS(FATAL, "tx_bw = %s ", str_buf);
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -762,7 +762,7 @@ static inline void dp_print_tx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	}
 	DP_TRACE_STATS(FATAL, "tx_stbc = %s ", str_buf);
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 
 	for (i = 0; i <  DP_HTT_TX_PREAM_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
@@ -783,7 +783,7 @@ static inline void dp_print_tx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	}
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_DCM_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -837,7 +837,7 @@ static inline void dp_print_rx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "rssi_comb = %d",
 			dp_stats_buf->rssi_comb);
 
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_RX_MCS_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -846,7 +846,7 @@ static inline void dp_print_rx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "rx_mcs = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_RX_NSS_LEN; i++) {
 		/* 0 stands for NSS 1, 1 stands for NSS 2, etc. */
 		index += qdf_snprint(&str_buf[index],
@@ -857,7 +857,7 @@ static inline void dp_print_rx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "rx_nss = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_RX_DCM_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -866,7 +866,7 @@ static inline void dp_print_rx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "rx_dcm = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -875,7 +875,7 @@ static inline void dp_print_rx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "rx_stbc = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_RX_BW_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -884,7 +884,7 @@ static inline void dp_print_rx_peer_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "rx_bw = %s ", str_buf);
 
 	for (j = 0; j < DP_HTT_PEER_NUM_SS; j++) {
-		qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+		qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 		index = 0;
 		for (i = 0; i <  HTT_RX_PEER_STATS_NUM_BW_COUNTERS; i++) {
 			index += qdf_snprint(&rssi_chain[j][index],
@@ -906,7 +906,7 @@ static inline void dp_print_rx_peer_rate_stats_tlv(uint32_t *tag_buf)
 		DP_TRACE_STATS(FATAL, "rx_gi[%d] = %s ", j, rx_gi[j]);
 	}
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_RX_PREAM_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -2448,7 +2448,7 @@ static inline void dp_print_tx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "ack_rssi = %d",
 			dp_stats_buf->ack_rssi);
 
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_MCS_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -2457,7 +2457,7 @@ static inline void dp_print_tx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "tx_mcs = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_SU_MCS_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -2466,7 +2466,7 @@ static inline void dp_print_tx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "tx_su_mcs = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_MU_MCS_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -2475,7 +2475,7 @@ static inline void dp_print_tx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "tx_mu_mcs = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_NSS_LEN; i++) {
 		/* 0 stands for NSS 1, 1 stands for NSS 2, etc. */
 		index += qdf_snprint(&str_buf[index],
@@ -2486,7 +2486,7 @@ static inline void dp_print_tx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "tx_nss = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_BW_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -2495,7 +2495,7 @@ static inline void dp_print_tx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "tx_bw = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -2504,7 +2504,7 @@ static inline void dp_print_tx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "tx_stbc = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_PREAM_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -2524,7 +2524,7 @@ static inline void dp_print_tx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	}
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_TX_DCM_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -2581,7 +2581,7 @@ static inline void dp_print_rx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "rssi_comb = %d",
 			dp_stats_buf->rssi_comb);
 
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_RX_MCS_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -2590,7 +2590,7 @@ static inline void dp_print_rx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "rx_mcs = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_RX_NSS_LEN; i++) {
 		/* 0 stands for NSS 1, 1 stands for NSS 2, etc. */
 		index += qdf_snprint(&str_buf[index],
@@ -2601,7 +2601,7 @@ static inline void dp_print_rx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "rx_nss = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_RX_DCM_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -2610,7 +2610,7 @@ static inline void dp_print_rx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "rx_dcm = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -2619,7 +2619,7 @@ static inline void dp_print_rx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	DP_TRACE_STATS(FATAL, "rx_stbc = %s ", str_buf);
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_RX_BW_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,
@@ -2650,7 +2650,7 @@ static inline void dp_print_rx_pdev_rate_stats_tlv(uint32_t *tag_buf)
 	}
 
 	index = 0;
-	qdf_mem_set(str_buf, DP_MAX_STRING_LEN, 0x0);
+	qdf_mem_zero(str_buf, DP_MAX_STRING_LEN);
 	for (i = 0; i <  DP_HTT_RX_PREAM_LEN; i++) {
 		index += qdf_snprint(&str_buf[index],
 				DP_MAX_STRING_LEN - index,

+ 6 - 6
dp/wifi3.0/dp_tx.c

@@ -1696,7 +1696,7 @@ qdf_nbuf_t dp_tx_extract_mesh_meta_data(struct dp_vdev *vdev, qdf_nbuf_t nbuf,
 
 	msdu_info->exception_fw = 1;
 
-	qdf_mem_set(meta_data, sizeof(struct htt_tx_msdu_desc_ext2_t), 0);
+	qdf_mem_zero(meta_data, sizeof(struct htt_tx_msdu_desc_ext2_t));
 
 	meta_data->host_tx_desc_pool = 1;
 	meta_data->update_peer_cache = 1;
@@ -1874,7 +1874,7 @@ qdf_nbuf_t dp_tx_send_exception(void *vap_dev, qdf_nbuf_t nbuf,
 	struct dp_vdev *vdev = (struct dp_vdev *) vap_dev;
 	struct dp_tx_msdu_info_s msdu_info;
 
-	qdf_mem_set(&msdu_info, sizeof(msdu_info), 0x0);
+	qdf_mem_zero(&msdu_info, sizeof(msdu_info));
 
 	msdu_info.tid = tx_exc_metadata->tid;
 
@@ -2049,8 +2049,8 @@ qdf_nbuf_t dp_tx_send(void *vap_dev, qdf_nbuf_t nbuf)
 	uint16_t peer_id = HTT_INVALID_PEER;
 	qdf_nbuf_t nbuf_mesh = NULL;
 
-	qdf_mem_set(&msdu_info, sizeof(msdu_info), 0x0);
-	qdf_mem_set(&seg_info, sizeof(seg_info), 0x0);
+	qdf_mem_zero(&msdu_info, sizeof(msdu_info));
+	qdf_mem_zero(&seg_info, sizeof(seg_info));
 
 	eh = (struct ether_header *)qdf_nbuf_data(nbuf);
 
@@ -2220,7 +2220,7 @@ void dp_tx_reinject_handler(struct dp_tx_desc_s *tx_desc, uint8_t *status)
 
 	qdf_assert(vdev);
 
-	qdf_mem_set(&msdu_info, sizeof(msdu_info), 0x0);
+	qdf_mem_zero(&msdu_info, sizeof(msdu_info));
 
 	dp_tx_get_queue(vdev, nbuf, &msdu_info.tx_queue);
 
@@ -3915,7 +3915,7 @@ dp_tx_me_send_convert_ucast(struct cdp_vdev *vdev_handle, qdf_nbuf_t nbuf,
 	uint8_t empty_entry_mac[DP_MAC_ADDR_LEN] = {0};
 	QDF_STATUS status;
 
-	qdf_mem_set(&msdu_info, sizeof(msdu_info), 0x0);
+	qdf_mem_zero(&msdu_info, sizeof(msdu_info));
 
 	dp_tx_get_queue(vdev, nbuf, &msdu_info.tx_queue);