Selaa lähdekoodia

qcacmn: Use qdf_mem_zero for zero initialization, umac part

Use qdf_mem_zero for zero initialization, umac part.

Change-Id: I78cf1c5cc1644e815b55131a7a08e19161fa4ea3
CRs-Fixed: 2378005
hangtian 6 vuotta sitten
vanhempi
sitoutus
147df6c9b9

+ 2 - 2
umac/dfs/core/src/filtering/dfs_phyerr_tlv.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012, 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 above
@@ -694,7 +694,7 @@ int dfs_process_phyerr_bb_tlv(struct wlan_dfs *dfs,
 	dfs_radar_summary_print(dfs, &rs);
 
 	/* Populate dfs_phy_err from rs. */
-	qdf_mem_set(e, sizeof(*e), 0);
+	qdf_mem_zero(e, sizeof(*e));
 	e->rssi = rs.rssi;
 	e->dur = rs.pulse_duration;
 	e->is_pri = 1; /* Always PRI for now */

+ 4 - 4
umac/dfs/core/src/filtering/dfs_process_phyerr.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
  * Copyright (c) 2002-2010, Atheros Communications Inc.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -143,7 +143,7 @@ int dfs_process_phyerr_owl(struct wlan_dfs *dfs,
 	}
 
 	/* Fill out dfs_phy_err with the information we have at hand. */
-	qdf_mem_set(e, sizeof(*e), 0);
+	qdf_mem_zero(e, sizeof(*e));
 	e->rssi = rssi;
 	e->dur = dur;
 	e->is_pri = 1;
@@ -281,7 +281,7 @@ int dfs_process_phyerr_sowl(struct wlan_dfs *dfs,
 		rssi = ext_rssi;
 
 	/* Fill out the rssi/duration fields from above. */
-	qdf_mem_set(e, sizeof(*e), 0);
+	qdf_mem_zero(e, sizeof(*e));
 	e->rssi = rssi;
 	e->dur = dur;
 	e->is_pri = pri_found;
@@ -591,7 +591,7 @@ void dfs_process_phyerr(struct wlan_dfs *dfs, void *buf, uint16_t datalen,
 	if (r_ext_rssi & 0x80)
 		r_ext_rssi = 0;
 
-	qdf_mem_set(&e, sizeof(e), 0);
+	qdf_mem_zero(&e, sizeof(e));
 
 	/*
 	 * This is a bit evil - instead of just passing in the chip version, the

+ 1 - 1
umac/dfs/core/src/misc/dfs_process_radar_found_ind.c

@@ -371,7 +371,7 @@ static uint8_t dfs_find_radar_affected_subchans(struct wlan_dfs *dfs,
 	struct dfs_channel *curchan = dfs->dfs_curchan;
 	struct freqs_offsets freq_offset;
 
-	qdf_mem_set(&freq_offset, sizeof(freq_offset), 0);
+	qdf_mem_zero(&freq_offset, sizeof(freq_offset));
 	flag = curchan->dfs_ch_flags;
 
 	for (i = 0; i < DFS_NUM_FREQ_OFFSET; i++)

+ 2 - 2
umac/regulatory/core/src/reg_utils.c

@@ -464,8 +464,8 @@ QDF_STATUS reg_cache_channel_state(struct wlan_objmgr_pdev *pdev,
 	}
 	if (pdev_priv_obj->num_cache_channels > 0) {
 		pdev_priv_obj->num_cache_channels = 0;
-		qdf_mem_set(&pdev_priv_obj->cache_disable_chan_list,
-			    sizeof(pdev_priv_obj->cache_disable_chan_list), 0);
+		qdf_mem_zero(&pdev_priv_obj->cache_disable_chan_list,
+			     sizeof(pdev_priv_obj->cache_disable_chan_list));
 	}
 
 	for (i = 0; i < num_channels; i++) {