Browse Source

qcacmn: passing correct argument to qdf_mem_set api

qdf_mem_set api parameter switched!
old
qdf_mem_set(void *ptr, uint32_t value, uint32_t num_bytes)

new
qdf_mem_set(void *ptr, uint32_t num_bytes, uint32_t value)

Change-Id: I4ebbc222d32e6fe18c28f2446102c95bfc734c8e
nobelj 7 years ago
parent
commit
2c3db26446

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

@@ -1436,7 +1436,7 @@ qdf_nbuf_t dp_tx_extract_mesh_meta_data(struct dp_vdev *vdev, qdf_nbuf_t nbuf,
 
 	mhdr = (struct meta_hdr_s *)qdf_nbuf_data(nbuf);
 
-	qdf_mem_set(meta_data, 0, sizeof(struct htt_tx_msdu_desc_ext2_t));
+	qdf_mem_set(meta_data, sizeof(struct htt_tx_msdu_desc_ext2_t), 0);
 
 	meta_data->host_tx_desc_pool = 1;
 

+ 1 - 1
qdf/linux/src/qdf_crypto.c

@@ -208,7 +208,7 @@ int qdf_aes_s2v(const uint8_t *key, unsigned int key_len, const uint8_t *s[],
 		/* len(Sn) < 128 */
 		/* T = qdf_update_dbl(D) xor pad(Sn) */
 		qdf_update_dbl(d);
-		qdf_mem_set(buf, 0, AES_BLOCK_SIZE);
+		qdf_mem_set(buf, AES_BLOCK_SIZE, 0);
 		qdf_mem_copy(buf, s[i], s_len[i]);
 		buf[s_len[i]] = 0x80;
 		xor(d, s[i], AES_BLOCK_SIZE);

+ 2 - 2
umac/cmn_services/crypto/src/wlan_crypto_aes_gcm.c

@@ -184,7 +184,7 @@ static void *aes_gcm_init_hash_subkey(const uint8_t *key, size_t key_len,
 		return NULL;
 
 	/* Generate hash subkey H = AES_K(0^128) */
-	qdf_mem_set(H, 0, AES_BLOCK_SIZE);
+	qdf_mem_set(H, AES_BLOCK_SIZE, 0);
 	wlan_crypto_aes_encrypt(aes, H, H);
 	wpa_hexdump_key(MSG_EXCESSIVE, "Hash subkey H for GHASH",
 			H, AES_BLOCK_SIZE);
@@ -199,7 +199,7 @@ static void aes_gcm_prepare_j0(const uint8_t *iv, size_t iv_len,
 	if (iv_len == 12) {
 		/* Prepare block J_0 = IV || 0^31 || 1 [len(IV) = 96] */
 		qdf_mem_copy(J0, iv, iv_len);
-		qdf_mem_set(J0 + iv_len, 0, AES_BLOCK_SIZE - iv_len);
+		qdf_mem_set(J0 + iv_len, AES_BLOCK_SIZE - iv_len, 0);
 		J0[AES_BLOCK_SIZE - 1] = 0x01;
 	} else {
 		/*

+ 4 - 4
umac/cmn_services/crypto/src/wlan_crypto_ccmp_sw.c

@@ -96,7 +96,7 @@ uint8_t *wlan_crypto_ccmp_decrypt(const uint8_t *tk,
 
 	mlen = data_len - 8 - 8;
 
-	qdf_mem_set(aad, 0, sizeof(aad));
+	qdf_mem_set(aad, sizeof(aad), 0);
 	ccmp_aad_nonce(hdr, data, aad, &aad_len, nonce);
 	wpa_hexdump(MSG_EXCESSIVE, "CCMP AAD", aad, aad_len);
 	wpa_hexdump(MSG_EXCESSIVE, "CCMP nonce", nonce, 13);
@@ -155,7 +155,7 @@ uint8_t *wlan_crypto_ccmp_encrypt(const uint8_t *tk, uint8_t *frame,
 	hdr->frame_control |= qdf_cpu_to_le16(WLAN_FC_ISWEP);
 	pos = crypt + hdrlen + 8;
 
-	qdf_mem_set(aad, 0, sizeof(aad));
+	qdf_mem_set(aad, sizeof(aad), 0);
 	ccmp_aad_nonce(hdr, crypt + hdrlen, aad, &aad_len, nonce);
 	wpa_hexdump(MSG_EXCESSIVE, "CCMP AAD", aad, aad_len);
 	wpa_hexdump(MSG_EXCESSIVE, "CCMP nonce", nonce, 13);
@@ -194,7 +194,7 @@ uint8_t *wlan_crypto_ccmp_256_decrypt(const uint8_t *tk,
 
 	mlen = data_len - 8 - 16;
 
-	qdf_mem_set(aad, 0, sizeof(aad));
+	qdf_mem_set(aad, sizeof(aad), 0);
 	ccmp_aad_nonce(hdr, data, aad, &aad_len, nonce);
 	wpa_hexdump(MSG_EXCESSIVE, "CCMP-256 AAD", aad, aad_len);
 	wpa_hexdump(MSG_EXCESSIVE, "CCMP-256 nonce", nonce, 13);
@@ -250,7 +250,7 @@ uint8_t *wlan_crypto_ccmp_256_encrypt(const uint8_t *tk, uint8_t *frame,
 	*pos++ = pn[1]; /* PN4 */
 	*pos++ = pn[0]; /* PN5 */
 
-	qdf_mem_set(aad, 0, sizeof(aad));
+	qdf_mem_set(aad, sizeof(aad), 0);
 	ccmp_aad_nonce(hdr, crypt + hdrlen, aad, &aad_len, nonce);
 	wpa_hexdump(MSG_EXCESSIVE, "CCMP-256 AAD", aad, aad_len);
 	wpa_hexdump(MSG_EXCESSIVE, "CCMP-256 nonce", nonce, 13);

+ 2 - 2
umac/cmn_services/crypto/src/wlan_crypto_gcmp_sw.c

@@ -92,7 +92,7 @@ uint8_t *wlan_crypto_gcmp_decrypt(const uint8_t *tk, size_t tk_len,
 	m = data + 8;
 	mlen = data_len - 8 - 16;
 
-	qdf_mem_set(aad, 0, sizeof(aad));
+	qdf_mem_set(aad, sizeof(aad), 0);
 	gcmp_aad_nonce(hdr, data, aad, &aad_len, nonce);
 	wpa_hexdump(MSG_EXCESSIVE, "GCMP AAD", aad, aad_len);
 	wpa_hexdump(MSG_EXCESSIVE, "GCMP nonce", nonce, sizeof(nonce));
@@ -146,7 +146,7 @@ uint8_t *wlan_crypto_gcmp_encrypt(const uint8_t *tk, size_t tk_len,
 	*pos++ = pn[1]; /* PN4 */
 	*pos++ = pn[0]; /* PN5 */
 
-	qdf_mem_set(aad, 0, sizeof(aad));
+	qdf_mem_set(aad, sizeof(aad), 0);
 	gcmp_aad_nonce(hdr, crypt + hdrlen, aad, &aad_len, nonce);
 	wpa_hexdump(MSG_EXCESSIVE, "GCMP AAD", aad, aad_len);
 	wpa_hexdump(MSG_EXCESSIVE, "GCMP nonce", nonce, sizeof(nonce));

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

@@ -670,7 +670,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, 0, sizeof(*e));
+	qdf_mem_set(e, sizeof(*e), 0);
 	e->rssi = rs.rssi;
 	e->dur = rs.pulse_duration;
 	e->is_pri = 1; /* Always PRI for now */

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

@@ -141,7 +141,7 @@ int dfs_process_phyerr_owl(struct wlan_dfs *dfs,
 	return 0;
 
 	/* Fill out dfs_phy_err with the information we have at hand. */
-	qdf_mem_set(e, 0, sizeof(*e));
+	qdf_mem_set(e, sizeof(*e), 0);
 	e->rssi = rssi;
 	e->dur = dur;
 	e->is_pri = 1;
@@ -279,7 +279,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, 0, sizeof(*e));
+	qdf_mem_set(e, sizeof(*e), 0);
 	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, 0, sizeof(e));
+	qdf_mem_set(&e, sizeof(e), 0);
 
 	/*
 	 * This is a bit evil - instead of just passing in the chip version, the

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

@@ -582,7 +582,7 @@ void dfs_radar_enable(struct wlan_dfs *dfs, int no_cac, uint32_t opmode)
 			    (rs_ext != NULL))) {
 			struct wlan_dfs_phyerr_param pe;
 
-			qdf_mem_set(&pe, '\0', sizeof(pe));
+			qdf_mem_set(&pe, sizeof(pe), '\0');
 
 			if (index_pri != dfs->dfs_curchan_radindex)
 				dfs_reset_alldelaylines(dfs);