Преглед на файлове

qcacmn: Clean up spectral, tif and umac component prints

Clean up spectral, tif and umac component prints by correcting trace
levels for regularly occurring prints and removing newlines from
converged print APIs since qdf_trace_msg appends them by default.

Change-Id: Ib10f1b1c54ecbcb9f4076be7c2c4708359d488e0
CRs-Fixed: 2243843
Aditya Sathish преди 6 години
родител
ревизия
f78a3d8ca5

+ 2 - 17
target_if/spectral/target_if_spectral.h

@@ -39,28 +39,13 @@
 #endif
 #endif
 
-#define spectral_log(level, args...) \
-QDF_PRINT_INFO(QDF_PRINT_IDX_SHARED, QDF_MODULE_ID_SPECTRAL, level, ## args)
-
-#define spectral_logfl(level, format, args...) \
-		spectral_log(level, FL(format), ## args)
-
-#define spectral_fatal(format, args...) \
-	spectral_logfl(QDF_TRACE_LEVEL_FATAL, format, ## args)
-#define spectral_err(format, args...) \
-	spectral_logfl(QDF_TRACE_LEVEL_ERROR, format, ## args)
-#define spectral_warn(format, args...) \
-	spectral_logfl(QDF_TRACE_LEVEL_WARN, format, ## args)
-#define spectral_info(format, args...) \
-	spectral_logfl(QDF_TRACE_LEVEL_INFO, format, ## args)
-#define spectral_debug(format, args...) \
-	spectral_logfl(QDF_TRACE_LEVEL_DEBUG, format, ## args)
+#include <spectral_defs_i.h>
 
 #define STATUS_PASS       1
 #define STATUS_FAIL       0
 #undef spectral_dbg_line
 #define spectral_dbg_line() \
-	spectral_debug("----------------------------------------------------\n")
+	spectral_debug("----------------------------------------------------")
 
 #undef spectral_ops_not_registered
 #define spectral_ops_not_registered(str) \

+ 3 - 2
target_if/spectral/target_if_spectral_phyerr.c

@@ -1598,8 +1598,9 @@ int target_if_spectral_process_report_gen3(
 
 	if (spectral_debug_level & (DEBUG_SPECTRAL2 | DEBUG_SPECTRAL4)) {
 		spectral_debug("Printing the spectral phyerr buffer for debug");
-		spectral_debug("Datalength of buffer = 0x%x(%d) bufptr = 0x%pK",
-			       payload->dbr_len, payload->dbr_len,
+		spectral_debug("Datalength of buffer = 0x%zx(%zd) bufptr = 0x%pK",
+			       payload->dbr_len,
+			       payload->dbr_len,
 			       payload->vaddr);
 #ifdef CONFIG_WIN
 		RAWSIM_PKT_HEXDUMP((unsigned char *)payload->vaddr, 1024);

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

@@ -45,8 +45,8 @@ static void aes_ccm_auth_start(void *aes, size_t M, size_t L,
 	wlan_crypto_aes_encrypt(aes, b, x); /* X_1 = E(K, B_0) */
 
 	if (!aad_len) {
-		qdf_print("%s[%d] aad length should be non zero\n",
-						__func__, __LINE__);
+		qdf_print("%s[%d] aad length should be non zero",
+			  __func__, __LINE__);
 		return;
 	}
 

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

@@ -91,7 +91,7 @@ uint8_t *wlan_crypto_ccmp_decrypt(const uint8_t *tk,
 
 	plain = qdf_mem_malloc(data_len + AES_BLOCK_SIZE);
 	if (plain == NULL) {
-		qdf_print("%s[%d] mem alloc failed\n", __func__, __LINE__);
+		qdf_print("%s[%d] mem alloc failed", __func__, __LINE__);
 		return NULL;
 	}
 
@@ -151,7 +151,7 @@ uint8_t *wlan_crypto_ccmp_encrypt(const uint8_t *tk, uint8_t *frame,
 	crypt = qdf_mem_malloc(hdrlen + CCMP_IV_SIZE + plen
 				+ WLAN_CRYPTO_MIC_LEN + AES_BLOCK_SIZE);
 	if (crypt == NULL) {
-		qdf_print("%s[%d] mem alloc failed\n", __func__, __LINE__);
+		qdf_print("%s[%d] mem alloc failed", __func__, __LINE__);
 		return NULL;
 	}
 
@@ -196,7 +196,7 @@ uint8_t *wlan_crypto_ccmp_256_decrypt(const uint8_t *tk,
 
 	plain = qdf_mem_malloc(data_len + AES_BLOCK_SIZE);
 	if (plain == NULL) {
-		qdf_print("%s[%d] mem alloc failed\n", __func__, __LINE__);
+		qdf_print("%s[%d] mem alloc failed", __func__, __LINE__);
 		return NULL;
 	}
 
@@ -245,7 +245,7 @@ uint8_t *wlan_crypto_ccmp_256_encrypt(const uint8_t *tk, uint8_t *frame,
 	crypt = qdf_mem_malloc(hdrlen + CCMP_IV_SIZE + plen
 				+ WLAN_CRYPTO_MIC256_LEN + AES_BLOCK_SIZE);
 	if (crypt == NULL) {
-		qdf_print("%s[%d] mem alloc failed\n", __func__, __LINE__);
+		qdf_print("%s[%d] mem alloc failed", __func__, __LINE__);
 		return NULL;
 	}
 

+ 35 - 39
umac/cmn_services/crypto/src/wlan_crypto_fils.c

@@ -39,6 +39,8 @@
 #include "wlan_crypto_aes_siv_i.h"
 #endif /* WLAN_SUPPORT_FILS */
 
+#include <qdf_trace.h>
+
 #define ASSOC_RESP_FIXED_FIELDS_LEN  6 /* cap info + status + assoc id */
 #define ASSOC_REQ_FIXED_FIELDS_LEN   4 /* cap info + listen interval */
 #define REASSOC_REQ_FIXED_FIELDS_LEN 10 /* cap info + listen interval + BSSID */
@@ -75,8 +77,8 @@ fils_parse_ie(qdf_nbuf_t wbuf, uint8_t hdrlen, uint8_t **cap_info,
 	pktlen_left = qdf_nbuf_len(wbuf);
 
 	if (pktlen_left < hdrlen) {
-		qdf_print(FL("Parse error.pktlen_left:%d Framehdr size:%d\n"),
-			  pktlen_left, hdrlen);
+		qdf_err("Parse error.pktlen_left:%d Framehdr size:%d",
+			pktlen_left, hdrlen);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -90,8 +92,7 @@ fils_parse_ie(qdf_nbuf_t wbuf, uint8_t hdrlen, uint8_t **cap_info,
 	    subtype == WLAN_FC0_STYPE_REASSOC_RESP) {
 		/* assoc resp frame - capability (2), status (2), associd (2) */
 		if (pktlen_left < ASSOC_RESP_FIXED_FIELDS_LEN) {
-			qdf_print(
-			FL("Parse error.pktlen_left:%d Fixed Fields len:%d\n"),
+			qdf_err("Parse error.pktlen_left:%d Fixed Fields len:%d",
 				pktlen_left, ASSOC_RESP_FIXED_FIELDS_LEN);
 			return QDF_STATUS_E_INVAL;
 		}
@@ -101,8 +102,7 @@ fils_parse_ie(qdf_nbuf_t wbuf, uint8_t hdrlen, uint8_t **cap_info,
 	} else if (subtype == WLAN_FC0_STYPE_ASSOC_REQ) {
 		/* assoc req frame - capability(2), listen interval (2) */
 		if (pktlen_left < ASSOC_REQ_FIXED_FIELDS_LEN) {
-			qdf_print(
-			FL("Parse Error.pktlen_left:%d Fixed Fields len:%d\n"),
+			qdf_err("Parse Error.pktlen_left:%d Fixed Fields len:%d",
 				pktlen_left, ASSOC_REQ_FIXED_FIELDS_LEN);
 			return QDF_STATUS_E_INVAL;
 		}
@@ -115,8 +115,7 @@ fils_parse_ie(qdf_nbuf_t wbuf, uint8_t hdrlen, uint8_t **cap_info,
 		 * Current AP address(6)
 		 */
 		if (pktlen_left < REASSOC_REQ_FIXED_FIELDS_LEN) {
-			qdf_print(
-			FL("Parse Error.pktlen_left:%d Fixed Fields len:%d\n"),
+			qdf_err("Parse Error.pktlen_left:%d Fixed Fields len:%d",
 				pktlen_left, REASSOC_REQ_FIXED_FIELDS_LEN);
 			return QDF_STATUS_E_INVAL;
 		}
@@ -138,9 +137,9 @@ fils_parse_ie(qdf_nbuf_t wbuf, uint8_t hdrlen, uint8_t **cap_info,
 		/* for extension element, check the sub element ID */
 		if (elem_id == WLAN_ELEMID_EXTN_ELEM) {
 			if ((len + 1) > pktlen_left) {
-				qdf_print(FL("Parse Error.pktlen_left:%did:%d"),
-					  pktlen_left, elem_id);
-				qdf_print("len:%dextid:%d\n", len, *frm);
+				qdf_err("Parse Error.pktlen_left:%did:%d",
+					pktlen_left, elem_id);
+				qdf_err("len:%dextid:%d", len, *frm);
 				return QDF_STATUS_E_INVAL;
 			}
 
@@ -153,8 +152,7 @@ fils_parse_ie(qdf_nbuf_t wbuf, uint8_t hdrlen, uint8_t **cap_info,
 		}
 
 		if (len > pktlen_left) {
-			qdf_print(
-			FL("Parse Error.pktlen_left:%did:%dlen:%dextid:%d\n"),
+			qdf_err("Parse Error.pktlen_left:%did:%dlen:%dextid:%d",
 				pktlen_left, elem_id, len, *frm);
 			return QDF_STATUS_E_INVAL;
 		}
@@ -165,7 +163,7 @@ fils_parse_ie(qdf_nbuf_t wbuf, uint8_t hdrlen, uint8_t **cap_info,
 	}
 
 	if (!fils_found) {
-		qdf_print(FL("FILS session element not found. Parse failed\n"));
+		qdf_err("FILS session element not found. Parse failed");
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -187,13 +185,13 @@ static QDF_STATUS fils_aead_setkey(struct wlan_crypto_key *key)
 	struct wlan_crypto_fils_aad_key *fils_key;
 
 	if (!key || !key->private) {
-		qdf_print(FL("Failed to set FILS key\n"));
+		qdf_err("Failed to set FILS key");
 		return QDF_STATUS_E_INVAL;
 	}
 	req_key = key->private;
 	fils_key = qdf_mem_malloc(sizeof(struct wlan_crypto_fils_aad_key));
 	if (!fils_key) {
-		qdf_print(FL("FILS key alloc failed\n"));
+		qdf_err("FILS key alloc failed");
 		return QDF_STATUS_E_NOMEM;
 	}
 	qdf_mem_copy(fils_key, &req_key->filsaad,
@@ -231,24 +229,24 @@ fils_aead_encap(struct wlan_crypto_key *key, qdf_nbuf_t wbuf,
 	uint8_t subtype = 0;
 
 	if (!key) {
-		qdf_print(FL("Invalid Input\n"));
+		qdf_err("Invalid Input");
 		return QDF_STATUS_E_FAILURE;
 	}
 
 	fils_key = (struct wlan_crypto_fils_aad_key *)key->private;
 	if (!fils_key) {
-		qdf_print(FL("Key is not set\n"));
+		qdf_err("Key is not set");
 		return QDF_STATUS_E_FAILURE;
 	}
 
 	if (!fils_key->kek_len) {
-		qdf_print(FL("Key len is zero. Returning error\n"));
+		qdf_err("Key len is zero. Returning error");
 		return QDF_STATUS_E_FAILURE;
 	}
 
 	hdr = (struct ieee80211_hdr *)qdf_nbuf_data(wbuf);
 	if (!hdr) {
-		qdf_print(FL("Invalid header\n"));
+		qdf_err("Invalid header");
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -259,7 +257,7 @@ fils_aead_encap(struct wlan_crypto_key *key, qdf_nbuf_t wbuf,
 
 	if (fils_parse_ie(wbuf, hdrlen, &cap_info, &fils_session, &ie_start)
 			!= QDF_STATUS_SUCCESS) {
-		qdf_print(FL("FILS Parsing failed\n"));
+		qdf_err("FILS Parsing failed");
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -285,7 +283,7 @@ fils_aead_encap(struct wlan_crypto_key *key, qdf_nbuf_t wbuf,
 					+ AES_BLOCK_SIZE;
 	buf = qdf_mem_malloc(bufsize);
 	if (!buf) {
-		qdf_print(FL("temp buf allocation failed\n"));
+		qdf_err("temp buf allocation failed");
 		return QDF_STATUS_E_NOMEM;
 	}
 	qdf_mem_copy(buf, ie_start, bufsize);
@@ -294,13 +292,13 @@ fils_aead_encap(struct wlan_crypto_key *key, qdf_nbuf_t wbuf,
 					fils_session, crypt_len, 5, address,
 					length, buf + (fils_session - ie_start))
 					< 0) {
-		qdf_print(FL("aes siv_encryption failed\n"));
+		qdf_err("aes siv_encryption failed");
 		qdf_mem_free(buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
 	if (!qdf_nbuf_put_tail(wbuf, AES_BLOCK_SIZE))
-		qdf_print(FL("Unable to put data in nbuf\n"));
+		qdf_err("Unable to put data in nbuf");
 
 	qdf_mem_copy(ie_start, buf, bufsize);
 	qdf_mem_free(buf);
@@ -333,30 +331,30 @@ fils_aead_decap(struct wlan_crypto_key *key, qdf_nbuf_t wbuf,
 	uint32_t bufsize = 0;
 
 	if (!key) {
-		qdf_print(FL("Invalid Input\n"));
+		qdf_err("Invalid Input");
 		return QDF_STATUS_E_FAILURE;
 	}
 
 	fils_key = (struct wlan_crypto_fils_aad_key *)key->private;
 	if (!fils_key) {
-		qdf_print(FL("Key is not set\n"));
+		qdf_err("Key is not set");
 		return QDF_STATUS_E_FAILURE;
 	}
 
 	if (!fils_key->kek_len) {
-		qdf_print(FL("Key len is zero. Returning error\n"));
+		qdf_err("Key len is zero. Returning error");
 		return QDF_STATUS_E_FAILURE;
 	}
 
 	if (fils_parse_ie(wbuf, hdrlen, &cap_info, &fils_session, &ie_start)
 			!= QDF_STATUS_SUCCESS) {
-		qdf_print(FL("IE parse failed\n"));
+		qdf_err("IE parse failed");
 		return QDF_STATUS_E_FAILURE;
 	}
 
 	hdr = (struct ieee80211_hdr *)qdf_nbuf_data(wbuf);
 	if (!hdr) {
-		qdf_print(FL("Invalid header\n"));
+		qdf_err("Invalid header");
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -379,11 +377,9 @@ fils_aead_decap(struct wlan_crypto_key *key, qdf_nbuf_t wbuf,
 	crypt_len = ((uint8_t *)hdr + (uint32_t)qdf_nbuf_len(wbuf))
 				- fils_session;
 	if (crypt_len < AES_BLOCK_SIZE) {
-		qdf_print(FL(
-			"Not enough room for AES-SIV data after FILS Session"));
-		qdf_print(
-		" element in (Re)Association Request frame from %pM\n",
-						hdr->addr1);
+		qdf_err("Not enough room for AES-SIV data after FILS Session");
+		qdf_err(" element in (Re)Association Request frame from %pM",
+			hdr->addr1);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -391,7 +387,7 @@ fils_aead_decap(struct wlan_crypto_key *key, qdf_nbuf_t wbuf,
 	bufsize = (uint8_t *)hdr + (uint32_t)qdf_nbuf_len(wbuf) - ie_start;
 	buf = qdf_mem_malloc(bufsize);
 	if (!buf) {
-		qdf_print(FL("temp buf allocation failed\n"));
+		qdf_err("temp buf allocation failed");
 		return QDF_STATUS_E_NOMEM;
 	}
 	qdf_mem_copy(buf, ie_start, bufsize);
@@ -400,8 +396,8 @@ fils_aead_decap(struct wlan_crypto_key *key, qdf_nbuf_t wbuf,
 					fils_session, crypt_len, 5, address,
 					length, buf + (fils_session - ie_start))
 					< 0) {
-		qdf_print(FL("AES decrypt of assocreq frame from %s failed\n"),
-			  ether_sprintf(hdr->addr1));
+		qdf_err("AES decrypt of assocreq frame from %s failed",
+			ether_sprintf(hdr->addr1));
 		qdf_mem_free(buf);
 		return QDF_STATUS_E_FAILURE;
 	}
@@ -418,13 +414,13 @@ void wlan_crypto_fils_delkey(struct wlan_objmgr_peer *peer)
 	struct wlan_crypto_key *key = NULL;
 
 	if (!peer) {
-		qdf_print(FL("Invalid Input\n"));
+		qdf_err("Invalid Input");
 		return;
 	}
 
 	crypto_priv = wlan_get_peer_crypto_obj(peer);
 	if (!crypto_priv) {
-		qdf_print(FL("crypto_priv NULL\n"));
+		qdf_err("crypto_priv NULL");
 		return;
 	}
 

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

@@ -84,7 +84,7 @@ uint8_t *wlan_crypto_gcmp_decrypt(const uint8_t *tk, size_t tk_len,
 
 	plain = qdf_mem_malloc(data_len + AES_BLOCK_SIZE);
 	if (plain == NULL) {
-		qdf_print("%s[%d] mem alloc failed\n", __func__, __LINE__);
+		qdf_print("%s[%d] mem alloc failed", __func__, __LINE__);
 		return NULL;
 	}
 
@@ -129,7 +129,7 @@ uint8_t *wlan_crypto_gcmp_encrypt(const uint8_t *tk, size_t tk_len,
 
 	crypt = qdf_mem_malloc(hdrlen + 8 + plen + 16 + AES_BLOCK_SIZE);
 	if (crypt == NULL) {
-		qdf_print("%s[%d] mem alloc failed\n", __func__, __LINE__);
+		qdf_print("%s[%d] mem alloc failed", __func__, __LINE__);
 		return NULL;
 	}
 

+ 121 - 121
umac/cmn_services/crypto/src/wlan_crypto_global_api.c

@@ -53,7 +53,7 @@ static struct wlan_crypto_params *wlan_crypto_vdev_get_comp_params(
 	*crypto_priv = (struct wlan_crypto_comp_priv *)
 					wlan_get_vdev_crypto_obj(vdev);
 	if (*crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return NULL;
 	}
 
@@ -75,7 +75,7 @@ static struct wlan_crypto_params *wlan_crypto_peer_get_comp_params(
 	*crypto_priv = (struct wlan_crypto_comp_priv *)
 					wlan_get_peer_crypto_obj(peer);
 	if (*crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return NULL;
 	}
 
@@ -151,7 +151,7 @@ QDF_STATUS wlan_crypto_set_vdev_param(struct wlan_objmgr_vdev *vdev,
 					wlan_get_vdev_crypto_obj(vdev);
 
 	if (crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -184,7 +184,7 @@ QDF_STATUS wlan_crypto_set_peer_param(struct wlan_objmgr_peer *peer,
 							&crypto_priv);
 
 	if (crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -257,7 +257,7 @@ int32_t wlan_crypto_get_param(struct wlan_objmgr_vdev *vdev,
 				wlan_get_vdev_crypto_obj(vdev);
 
 	if (crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -286,7 +286,7 @@ int32_t wlan_crypto_get_peer_param(struct wlan_objmgr_peer *peer,
 							&crypto_priv);
 
 	if (crypto_params == NULL) {
-		qdf_print("%s[%d] crypto_params NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_params NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 	value = wlan_crypto_get_param_value(param, crypto_params);
@@ -310,7 +310,7 @@ uint8_t wlan_crypto_is_htallowed(struct wlan_objmgr_vdev *vdev,
 	int32_t ucast_cipher;
 
 	if (!(vdev || peer)) {
-		qdf_print("%s[%d] Invalid params\n", __func__, __LINE__);
+		qdf_print("%s[%d] Invalid params", __func__, __LINE__);
 		return 0;
 	}
 
@@ -355,8 +355,8 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
 	uint8_t igtk_idx = 0;
 
 	if (!vdev || !req_key || req_key->keylen > (sizeof(req_key->keydata))) {
-		qdf_print("%s[%d] Invalid params vdev%pK, req_key%pK\n",
-				__func__, __LINE__, vdev, req_key);
+		qdf_print("%s[%d] Invalid params vdev%pK, req_key%pK",
+			  __func__, __LINE__, vdev, req_key);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -373,14 +373,14 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
 				!isbcast);
 			return QDF_STATUS_SUCCESS;
 		}
-		qdf_print("%s[%d] req_key len zero\n", __func__, __LINE__);
+		qdf_print("%s[%d] req_key len zero", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 
 	cipher = wlan_crypto_cipher_ops[req_key->type];
 
 	if (!cipher && !IS_MGMT_CIPHER(req_key->type)) {
-		qdf_print("%s[%d] cipher invalid\n", __func__, __LINE__);
+		qdf_print("%s[%d] cipher invalid", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -388,13 +388,13 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
 	    (!IS_MGMT_CIPHER(req_key->type)) &&
 	    ((req_key->keylen != (cipher->keylen / CRYPTO_NBBY)) &&
 	    (req_key->type != WLAN_CRYPTO_CIPHER_WEP))) {
-		qdf_print("%s[%d] cipher invalid\n", __func__, __LINE__);
+		qdf_print("%s[%d] cipher invalid", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	} else if ((req_key->type == WLAN_CRYPTO_CIPHER_WEP) &&
 		!((req_key->keylen == WLAN_CRYPTO_KEY_WEP40_LEN)
 		|| (req_key->keylen == WLAN_CRYPTO_KEY_WEP104_LEN)
 		|| (req_key->keylen == WLAN_CRYPTO_KEY_WEP128_LEN))) {
-		qdf_print("%s[%d] wep key len invalid\n", __func__, __LINE__);
+		qdf_print("%s[%d] wep key len invalid", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -423,7 +423,7 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
 	psoc = wlan_vdev_get_psoc(vdev);
 	if (!psoc) {
 		wlan_vdev_obj_unlock(vdev);
-		qdf_print("%s[%d] psoc NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] psoc NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 	wlan_vdev_obj_unlock(vdev);
@@ -439,22 +439,22 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
 		crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 								&crypto_priv);
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
 		if (IS_MGMT_CIPHER(req_key->type)) {
 			igtk_idx = req_key->keyix - WLAN_CRYPTO_MAXKEYIDX;
 			if (igtk_idx >= WLAN_CRYPTO_MAXIGTKKEYIDX) {
-				qdf_print("%s[%d] igtk key invalid keyid %d \n",
-						  __func__, __LINE__, igtk_idx);
+				qdf_print("%s[%d] igtk key invalid keyid %d ",
+					  __func__, __LINE__, igtk_idx);
 				return QDF_STATUS_E_INVAL;
 			}
 			key = qdf_mem_malloc(sizeof(struct wlan_crypto_key));
 			if (key == NULL) {
-				qdf_print("%s[%d] igtk key alloc failed\n",
-						__func__, __LINE__);
+				qdf_print("%s[%d] igtk key alloc failed",
+					  __func__, __LINE__);
 				return QDF_STATUS_E_NOMEM;
 			}
 
@@ -466,7 +466,7 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
 			crypto_priv->def_igtk_tx_keyid = igtk_idx;
 		} else {
 			if (IS_FILS_CIPHER(req_key->type)) {
-				qdf_print("FILS key is not for BroadCast pkt");
+				qdf_err("FILS key is not for BroadCast pkt");
 				return QDF_STATUS_E_INVAL;
 			}
 			if (!HAS_MCAST_CIPHER(crypto_params, req_key->type)
@@ -487,8 +487,8 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
 			if (!(peer && (QDF_STATUS_SUCCESS
 				== wlan_objmgr_peer_try_get_ref(peer,
 							WLAN_CRYPTO_ID)))) {
-				qdf_print("%s[%d] peer %pK failed\n",
-						__func__, __LINE__, peer);
+				qdf_print("%s[%d] peer %pK failed",
+					  __func__, __LINE__, peer);
 				if (IS_MGMT_CIPHER(req_key->type)) {
 					crypto_priv->igtk_key[igtk_idx] = NULL;
 					crypto_priv->igtk_key_type
@@ -516,7 +516,7 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
 					WLAN_CRYPTO_ID);
 
 		if (peer == NULL) {
-			qdf_print("%s[%d] peer NULL\n", __func__, __LINE__);
+			qdf_print("%s[%d] peer NULL", __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -526,21 +526,21 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
 		wlan_objmgr_peer_release_ref(peer, WLAN_CRYPTO_ID);
 
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 		if (IS_MGMT_CIPHER(req_key->type)) {
 			igtk_idx = req_key->keyix - WLAN_CRYPTO_MAXKEYIDX;
 			if (igtk_idx >= WLAN_CRYPTO_MAXIGTKKEYIDX) {
-				qdf_print("%s[%d] igtk key invalid keyid %d \n",
-						  __func__, __LINE__, igtk_idx);
+				qdf_print("%s[%d] igtk key invalid keyid %d ",
+					  __func__, __LINE__, igtk_idx);
 				return QDF_STATUS_E_INVAL;
 			}
 			key = qdf_mem_malloc(sizeof(struct wlan_crypto_key));
 			if (key == NULL) {
-				qdf_print("%s[%d] igtk key alloc failed\n",
-						__func__, __LINE__);
+				qdf_print("%s[%d] igtk key alloc failed",
+					  __func__, __LINE__);
 				return QDF_STATUS_E_NOMEM;
 			}
 			if (crypto_priv->igtk_key[igtk_idx])
@@ -554,8 +554,8 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
 			if (kid == WLAN_CRYPTO_KEYIX_NONE)
 				kid = 0;
 			if (kid >= WLAN_CRYPTO_MAXKEYIDX) {
-				qdf_print("%s[%d] invalid keyid %d \n",
-						  __func__, __LINE__, kid);
+				qdf_print("%s[%d] invalid keyid %d ",
+					  __func__, __LINE__, kid);
 				return QDF_STATUS_E_INVAL;
 			}
 			if (!crypto_priv->key[kid]) {
@@ -696,7 +696,7 @@ struct wlan_crypto_key *wlan_crypto_vdev_getkey(struct wlan_objmgr_vdev *vdev,
 	crypto_params = wlan_crypto_vdev_get_comp_params(vdev, &crypto_priv);
 
 	if (crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return NULL;
 	}
 
@@ -730,7 +730,7 @@ struct wlan_crypto_key *wlan_crypto_peer_getkey(struct wlan_objmgr_peer *peer,
 	crypto_params = wlan_crypto_peer_get_comp_params(peer, &crypto_priv);
 
 	if (crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return NULL;
 	}
 
@@ -767,8 +767,8 @@ QDF_STATUS wlan_crypto_getkey(struct wlan_objmgr_vdev *vdev,
 
 	if ((req_key->keyix != WLAN_CRYPTO_KEYIX_NONE) &&
 		(req_key->keyix >= WLAN_CRYPTO_MAXKEYIDX)) {
-		qdf_print("%s[%d] invalid keyix %d\n", __func__, __LINE__,
-							req_key->keyix);
+		qdf_print("%s[%d] invalid keyix %d", __func__, __LINE__,
+			  req_key->keyix);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -777,7 +777,7 @@ QDF_STATUS wlan_crypto_getkey(struct wlan_objmgr_vdev *vdev,
 	psoc = wlan_vdev_get_psoc(vdev);
 	if (!psoc) {
 		wlan_vdev_obj_unlock(vdev);
-		qdf_print("%s[%d] psoc NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] psoc NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 	wlan_vdev_obj_unlock(vdev);
@@ -800,7 +800,7 @@ QDF_STATUS wlan_crypto_getkey(struct wlan_objmgr_vdev *vdev,
 					WLAN_CRYPTO_ID);
 		if (peer == NULL) {
 			QDF_TRACE(QDF_MODULE_ID_CRYPTO, QDF_TRACE_LEVEL_ERROR,
-				"%s[%d] peer NULL\n", __func__, __LINE__);
+				"%s[%d] peer NULL", __func__, __LINE__);
 			return QDF_STATUS_E_NOENT;
 		}
 		key = wlan_crypto_peer_getkey(peer, req_key->keyix);
@@ -864,9 +864,9 @@ QDF_STATUS wlan_crypto_delkey(struct wlan_objmgr_vdev *vdev,
 		(key_idx >=
 			(WLAN_CRYPTO_MAXKEYIDX + WLAN_CRYPTO_MAXIGTKKEYIDX))) {
 			QDF_TRACE(QDF_MODULE_ID_CRYPTO, QDF_TRACE_LEVEL_ERROR,
-				"%s[%d] Invalid params vdev %pK, macaddr %pK"
-					"keyidx %d\n", __func__, __LINE__, vdev,
-					macaddr, key_idx);
+				  "%s[%d] Invalid params vdev %pK, macaddr %pK, keyidx %d",
+				  __func__, __LINE__, vdev,
+				  macaddr, key_idx);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -875,7 +875,7 @@ QDF_STATUS wlan_crypto_delkey(struct wlan_objmgr_vdev *vdev,
 	psoc = wlan_vdev_get_psoc(vdev);
 	if (!psoc) {
 		wlan_vdev_obj_unlock(vdev);
-		qdf_print("%s[%d] psoc NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] psoc NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 	wlan_vdev_obj_unlock(vdev);
@@ -884,8 +884,8 @@ QDF_STATUS wlan_crypto_delkey(struct wlan_objmgr_vdev *vdev,
 		crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 								&crypto_priv);
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 	} else {
@@ -906,8 +906,8 @@ QDF_STATUS wlan_crypto_delkey(struct wlan_objmgr_vdev *vdev,
 								&crypto_priv);
 		wlan_objmgr_peer_release_ref(peer, WLAN_CRYPTO_ID);
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 	}
@@ -915,8 +915,8 @@ QDF_STATUS wlan_crypto_delkey(struct wlan_objmgr_vdev *vdev,
 	if (key_idx >= WLAN_CRYPTO_MAXKEYIDX) {
 		uint8_t igtk_idx = key_idx - WLAN_CRYPTO_MAXKEYIDX;
 		if (igtk_idx >= WLAN_CRYPTO_MAXIGTKKEYIDX) {
-			qdf_print("%s[%d] Igtk key invalid keyid %d\n",
-			__func__, __LINE__, igtk_idx);
+			qdf_print("%s[%d] Igtk key invalid keyid %d",
+				  __func__, __LINE__, igtk_idx);
 			return QDF_STATUS_E_INVAL;
 		}
 		key = crypto_priv->igtk_key[igtk_idx];
@@ -967,9 +967,9 @@ QDF_STATUS wlan_crypto_default_key(struct wlan_objmgr_vdev *vdev,
 	uint8_t bssid_mac[WLAN_ALEN];
 
 	if (!vdev || !macaddr || (key_idx >= WLAN_CRYPTO_MAXKEYIDX)) {
-		qdf_print("%s[%d] Invalid params vdev %pK, macaddr %pK"
-				"keyidx %d\n", __func__, __LINE__,
-				vdev, macaddr, key_idx);
+		qdf_print("%s[%d] Invalid params vdev %pK, macaddr %pK keyidx %d",
+			  __func__, __LINE__,
+			  vdev, macaddr, key_idx);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -978,7 +978,7 @@ QDF_STATUS wlan_crypto_default_key(struct wlan_objmgr_vdev *vdev,
 	psoc = wlan_vdev_get_psoc(vdev);
 	if (!psoc) {
 		wlan_vdev_obj_unlock(vdev);
-		qdf_print("%s[%d] psoc NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] psoc NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 	wlan_vdev_obj_unlock(vdev);
@@ -987,8 +987,8 @@ QDF_STATUS wlan_crypto_default_key(struct wlan_objmgr_vdev *vdev,
 		crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 								&crypto_priv);
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1008,15 +1008,15 @@ QDF_STATUS wlan_crypto_default_key(struct wlan_objmgr_vdev *vdev,
 				WLAN_CRYPTO_ID);
 
 		if (peer == NULL) {
-			qdf_print("%s[%d] peer NULL\n", __func__, __LINE__);
+			qdf_print("%s[%d] peer NULL", __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 		crypto_params = wlan_crypto_peer_get_comp_params(peer,
 								&crypto_priv);
 		wlan_objmgr_peer_release_ref(peer, WLAN_CRYPTO_ID);
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1069,7 +1069,7 @@ QDF_STATUS wlan_crypto_encap(struct wlan_objmgr_vdev *vdev,
 	psoc = wlan_vdev_get_psoc(vdev);
 	if (!psoc) {
 		wlan_vdev_obj_unlock(vdev);
-		qdf_print("%s[%d] psoc NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] psoc NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 	wlan_vdev_obj_unlock(vdev);
@@ -1091,8 +1091,8 @@ QDF_STATUS wlan_crypto_encap(struct wlan_objmgr_vdev *vdev,
 		crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 								&crypto_priv);
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1111,8 +1111,8 @@ QDF_STATUS wlan_crypto_encap(struct wlan_objmgr_vdev *vdev,
 							  WLAN_CRYPTO_ID);
 
 		if (peer == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 		crypto_params = wlan_crypto_peer_get_comp_params(peer,
@@ -1120,8 +1120,8 @@ QDF_STATUS wlan_crypto_encap(struct wlan_objmgr_vdev *vdev,
 		wlan_objmgr_peer_release_ref(peer, WLAN_CRYPTO_ID);
 
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1178,7 +1178,7 @@ QDF_STATUS wlan_crypto_decap(struct wlan_objmgr_vdev *vdev,
 	psoc = wlan_vdev_get_psoc(vdev);
 	if (!psoc) {
 		wlan_vdev_obj_unlock(vdev);
-		qdf_print("%s[%d] psoc NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] psoc NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 	wlan_vdev_obj_unlock(vdev);
@@ -1211,8 +1211,8 @@ QDF_STATUS wlan_crypto_decap(struct wlan_objmgr_vdev *vdev,
 		crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 								&crypto_priv);
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1230,7 +1230,7 @@ QDF_STATUS wlan_crypto_decap(struct wlan_objmgr_vdev *vdev,
 					psoc, pdev_id, bssid_mac,
 					mac_addr, WLAN_CRYPTO_ID);
 		if (peer == NULL) {
-			qdf_print("%s[%d] peer NULL\n", __func__, __LINE__);
+			qdf_print("%s[%d] peer NULL", __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1239,8 +1239,8 @@ QDF_STATUS wlan_crypto_decap(struct wlan_objmgr_vdev *vdev,
 		wlan_objmgr_peer_release_ref(peer, WLAN_CRYPTO_ID);
 
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1288,7 +1288,7 @@ QDF_STATUS wlan_crypto_enmic(struct wlan_objmgr_vdev *vdev,
 	psoc = wlan_vdev_get_psoc(vdev);
 	if (!psoc) {
 		wlan_vdev_obj_unlock(vdev);
-		qdf_print("%s[%d] psoc NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] psoc NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 	wlan_vdev_obj_unlock(vdev);
@@ -1297,8 +1297,8 @@ QDF_STATUS wlan_crypto_enmic(struct wlan_objmgr_vdev *vdev,
 		crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 								&crypto_priv);
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1316,8 +1316,8 @@ QDF_STATUS wlan_crypto_enmic(struct wlan_objmgr_vdev *vdev,
 					psoc, pdev_id, bssid_mac,
 					mac_addr, WLAN_CRYPTO_ID);
 		if (peer == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1326,8 +1326,8 @@ QDF_STATUS wlan_crypto_enmic(struct wlan_objmgr_vdev *vdev,
 		wlan_objmgr_peer_release_ref(peer, WLAN_CRYPTO_ID);
 
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1388,7 +1388,7 @@ QDF_STATUS wlan_crypto_demic(struct wlan_objmgr_vdev *vdev,
 	psoc = wlan_vdev_get_psoc(vdev);
 	if (!psoc) {
 		wlan_vdev_obj_unlock(vdev);
-		qdf_print("%s[%d] psoc NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] psoc NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 	wlan_vdev_obj_unlock(vdev);
@@ -1397,8 +1397,8 @@ QDF_STATUS wlan_crypto_demic(struct wlan_objmgr_vdev *vdev,
 		crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 								&crypto_priv);
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1416,7 +1416,7 @@ QDF_STATUS wlan_crypto_demic(struct wlan_objmgr_vdev *vdev,
 					psoc, pdev_id, bssid_mac,
 					mac_addr, WLAN_CRYPTO_ID);
 		if (peer == NULL) {
-			qdf_print("%s[%d] peer NULL\n", __func__, __LINE__);
+			qdf_print("%s[%d] peer NULL", __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1425,8 +1425,8 @@ QDF_STATUS wlan_crypto_demic(struct wlan_objmgr_vdev *vdev,
 		wlan_objmgr_peer_release_ref(peer, WLAN_CRYPTO_ID);
 
 		if (crypto_priv == NULL) {
-			qdf_print("%s[%d] crypto_priv NULL\n",
-							__func__, __LINE__);
+			qdf_print("%s[%d] crypto_priv NULL",
+				  __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 
@@ -1460,7 +1460,7 @@ bool wlan_crypto_vdev_is_pmf_enabled(struct wlan_objmgr_vdev *vdev)
 	vdev_crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 							&crypto_priv);
 	if (crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -1494,14 +1494,14 @@ bool wlan_crypto_is_pmf_enabled(struct wlan_objmgr_vdev *vdev,
 	vdev_crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 							&crypto_priv);
 	if (crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 
 	peer_crypto_params = wlan_crypto_peer_get_comp_params(peer,
 							&crypto_priv);
 	if (crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 	if (((vdev_crypto_params->rsn_caps &
@@ -1550,26 +1550,26 @@ uint8_t *wlan_crypto_add_mmie(struct wlan_objmgr_vdev *vdev,
 	int32_t ret = -1;
 
 	if (!bfrm) {
-		qdf_print("%s[%d] frame is NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] frame is NULL", __func__, __LINE__);
 		return NULL;
 	}
 
 	crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 							&crypto_priv);
 	if (crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return NULL;
 	}
 
 	if (crypto_priv->def_igtk_tx_keyid >= WLAN_CRYPTO_MAXIGTKKEYIDX) {
-		qdf_print("%s[%d] igtk key invalid keyid %d \n",
-			__func__, __LINE__, crypto_priv->def_igtk_tx_keyid);
+		qdf_print("%s[%d] igtk key invalid keyid %d ",
+			  __func__, __LINE__, crypto_priv->def_igtk_tx_keyid);
 		return NULL;
 	}
 
 	key = crypto_priv->igtk_key[crypto_priv->def_igtk_tx_keyid];
 	if (!key) {
-		qdf_print("%s[%d] No igtk key present\n", __func__, __LINE__);
+		qdf_print("%s[%d] No igtk key present", __func__, __LINE__);
 		return NULL;
 	}
 	mic_len = (crypto_priv->igtk_key_type
@@ -1608,7 +1608,7 @@ uint8_t *wlan_crypto_add_mmie(struct wlan_objmgr_vdev *vdev,
 
 	buf = qdf_mem_malloc(len - hdrlen + 20);
 	if (!buf) {
-		qdf_print("%s[%d] malloc failed\n", __func__, __LINE__);
+		qdf_print("%s[%d] malloc failed", __func__, __LINE__);
 		return NULL;
 	}
 	qdf_mem_zero(buf, len - hdrlen + 20);
@@ -1654,7 +1654,7 @@ uint8_t *wlan_crypto_add_mmie(struct wlan_objmgr_vdev *vdev,
 	}
 	qdf_mem_free(buf);
 	if (ret < 0) {
-		qdf_print("%s[%d] add mmie failed\n", __func__, __LINE__);
+		qdf_print("%s[%d] add mmie failed", __func__, __LINE__);
 		return NULL;
 	}
 
@@ -1687,14 +1687,14 @@ bool wlan_crypto_is_mmie_valid(struct wlan_objmgr_vdev *vdev,
 	/* check if frame is illegal length */
 	if (!frm || !efrm || (efrm < frm)
 			|| ((efrm - frm) < sizeof(struct ieee80211_hdr))) {
-		qdf_print("%s[%d] Invalid params\n", __func__, __LINE__);
+		qdf_print("%s[%d] Invalid params", __func__, __LINE__);
 		return false;
 	}
 	len = efrm - frm;
 	crypto_priv = (struct wlan_crypto_comp_priv *)
 				wlan_get_vdev_crypto_obj(vdev);
 	if (crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return false;
 	}
 
@@ -1713,33 +1713,33 @@ bool wlan_crypto_is_mmie_valid(struct wlan_objmgr_vdev *vdev,
 
 	/* check Elem ID*/
 	if ((mmie == NULL) || (mmie->element_id != WLAN_ELEMID_MMIE)) {
-		qdf_print("%s[%d] IE is not MMIE\n", __func__, __LINE__);
+		qdf_print("%s[%d] IE is not MMIE", __func__, __LINE__);
 		return false;
 	}
 
 	if (mmie->key_id >= (WLAN_CRYPTO_MAXKEYIDX +
 				WLAN_CRYPTO_MAXIGTKKEYIDX) ||
 				(mmie->key_id < WLAN_CRYPTO_MAXKEYIDX)) {
-		qdf_print("%s[%d] keyid not valid\n", __func__, __LINE__);
+		qdf_print("%s[%d] keyid not valid", __func__, __LINE__);
 		return false;
 	}
 
 	key = crypto_priv->igtk_key[mmie->key_id - WLAN_CRYPTO_MAXKEYIDX];
 	if (!key) {
-		qdf_print("%s[%d] No igtk key present\n", __func__, __LINE__);
+		qdf_print("%s[%d] No igtk key present", __func__, __LINE__);
 		return false;
 	}
 
 	/* validate ipn */
 	ipn = mmie->sequence_number;
 	if (qdf_mem_cmp(ipn, key->keyrsc, 6) <= 0) {
-		qdf_print("%s[%d] replay error\n", __func__, __LINE__);
+		qdf_print("%s[%d] replay error", __func__, __LINE__);
 		return false;
 	}
 
 	buf = qdf_mem_malloc(len - hdrlen + 20);
 	if (!buf) {
-		qdf_print("%s[%d] malloc failed\n", __func__, __LINE__);
+		qdf_print("%s[%d] malloc failed", __func__, __LINE__);
 		return false;
 	}
 	aad = buf;
@@ -1782,19 +1782,19 @@ bool wlan_crypto_is_mmie_valid(struct wlan_objmgr_vdev *vdev,
 	qdf_mem_free(buf);
 
 	if (ret < 0) {
-		qdf_print("%s[%d] genarate mmie failed\n", __func__, __LINE__);
+		qdf_print("%s[%d] genarate mmie failed", __func__, __LINE__);
 		return false;
 	}
 
 	if (qdf_mem_cmp(mic, mmie->mic, mic_len) != 0) {
-		qdf_print("%s[%d] mmie mismatch\n", __func__, __LINE__);
+		qdf_print("%s[%d] mmie mismatch", __func__, __LINE__);
 		/* MMIE MIC mismatch */
 		return false;
 	}
 
 	/* Update the receive sequence number */
 	qdf_mem_copy(key->keyrsc, ipn, 6);
-	qdf_print("%s[%d] mmie matched\n", __func__, __LINE__);
+	qdf_print("%s[%d] mmie matched", __func__, __LINE__);
 
 	return true;
 }
@@ -2733,14 +2733,14 @@ uint8_t *wlan_crypto_build_wapiie(struct wlan_objmgr_vdev *vdev,
 
 	frm = iebuf;
 	if (!frm) {
-		qdf_print("%s[%d] ie buffer NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] ie buffer NULL", __func__, __LINE__);
 		return NULL;
 	}
 
 	crypto_params = wlan_crypto_vdev_get_comp_params(vdev, &crypto_priv);
 
 	if (!crypto_params) {
-		qdf_print("%s[%d] crypto_params NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_params NULL", __func__, __LINE__);
 		return NULL;
 	}
 
@@ -2854,7 +2854,7 @@ QDF_STATUS wlan_crypto_set_peer_wep_keys(struct wlan_objmgr_vdev *vdev,
 		return QDF_STATUS_E_NULL_VALUE;
 
 	if (!peer) {
-		qdf_print("%s[%d] peer NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] peer NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -2862,7 +2862,7 @@ QDF_STATUS wlan_crypto_set_peer_wep_keys(struct wlan_objmgr_vdev *vdev,
 	psoc = wlan_vdev_get_psoc(vdev);
 
 	if (!psoc) {
-		qdf_print("%s[%d] psoc NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] psoc NULL", __func__, __LINE__);
 		return QDF_STATUS_E_NULL_VALUE;
 	}
 
@@ -2873,7 +2873,7 @@ QDF_STATUS wlan_crypto_set_peer_wep_keys(struct wlan_objmgr_vdev *vdev,
 	crypto_params = wlan_crypto_vdev_get_comp_params(vdev,
 							&crypto_priv);
 	if (crypto_priv == NULL) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return QDF_STATUS_E_NULL_VALUE;
 	}
 
@@ -2884,14 +2884,14 @@ QDF_STATUS wlan_crypto_set_peer_wep_keys(struct wlan_objmgr_vdev *vdev,
 	if (opmode == QDF_STA_MODE) {
 		peer = wlan_vdev_get_bsspeer(vdev);
 		if (!peer) {
-			qdf_print("%s[%d] peer NULL\n", __func__, __LINE__);
+			qdf_print("%s[%d] peer NULL", __func__, __LINE__);
 			return QDF_STATUS_E_INVAL;
 		}
 	}
 
 	wlan_crypto_peer_get_comp_params(peer, &sta_crypto_priv);
 	if (sta_crypto_priv == NULL) {
-		qdf_print("%s[%d] sta priv is null\n", __func__, __LINE__);
+		qdf_print("%s[%d] sta priv is null", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -2908,8 +2908,8 @@ QDF_STATUS wlan_crypto_set_peer_wep_keys(struct wlan_objmgr_vdev *vdev,
 				sta_key = qdf_mem_malloc(
 						sizeof(struct wlan_crypto_key));
 				if (!sta_key) {
-					qdf_print("%s[%d] key alloc failed\n",
-							__func__, __LINE__);
+					qdf_print("%s[%d] key alloc failed",
+						  __func__, __LINE__);
 					return QDF_STATUS_E_NOMEM;
 				}
 				sta_crypto_priv->key[i] = sta_key;
@@ -3090,13 +3090,13 @@ uint8_t wlan_crypto_get_peer_fils_aead(struct wlan_objmgr_peer *peer)
 	struct wlan_crypto_comp_priv *crypto_priv = NULL;
 
 	if (!peer) {
-		qdf_print("Invalid Input");
+		qdf_err("Invalid Input");
 		return 0;
 	}
 
 	crypto_priv = wlan_get_peer_crypto_obj(peer);
 	if (!crypto_priv) {
-		qdf_print("crypto_priv NULL");
+		qdf_err("crypto_priv NULL");
 		return 0;
 	}
 
@@ -3109,13 +3109,13 @@ wlan_crypto_set_peer_fils_aead(struct wlan_objmgr_peer *peer, uint8_t value)
 	struct wlan_crypto_comp_priv *crypto_priv = NULL;
 
 	if (!peer) {
-		qdf_print("Invalid Input");
+		qdf_err("Invalid Input");
 		return;
 	}
 
 	crypto_priv = wlan_get_peer_crypto_obj(peer);
 	if (!crypto_priv) {
-		qdf_print("crypto_priv NULL");
+		qdf_err("crypto_priv NULL");
 		return;
 	}
 
@@ -3245,7 +3245,7 @@ static void crypto_plumb_peer_keys(struct wlan_objmgr_vdev *vdev,
 
 	if ((NULL == peer) || (NULL == vdev) || (NULL == psoc)) {
 		QDF_TRACE(QDF_MODULE_ID_CRYPTO, QDF_TRACE_LEVEL_ERROR,
-			  "%s[%d] Peer or vdev or psoc objects are null!\n",
+			  "%s[%d] Peer or vdev or psoc objects are null!",
 			  __func__, __LINE__);
 		return;
 	}
@@ -3255,7 +3255,7 @@ static void crypto_plumb_peer_keys(struct wlan_objmgr_vdev *vdev,
 
 	if (!crypto_priv) {
 		QDF_TRACE(QDF_MODULE_ID_CRYPTO, QDF_TRACE_LEVEL_ERROR,
-			  "%s[%d] crypto_priv NULL\n",
+			  "%s[%d] crypto_priv NULL",
 			  __func__, __LINE__);
 		return;
 	}
@@ -3299,13 +3299,13 @@ void wlan_crypto_restore_keys(struct wlan_objmgr_vdev *vdev)
 	psoc = wlan_vdev_get_psoc(vdev);
 	if (NULL == pdev) {
 		QDF_TRACE(QDF_MODULE_ID_CRYPTO, QDF_TRACE_LEVEL_ERROR,
-			  "%s[%d] pdev is NULL\n",
+			  "%s[%d] pdev is NULL",
 			  __func__, __LINE__);
 		return;
 	}
 	if (NULL == psoc) {
 		QDF_TRACE(QDF_MODULE_ID_CRYPTO, QDF_TRACE_LEVEL_ERROR,
-			  "%s[%d] psoc is NULL\n",
+			  "%s[%d] psoc is NULL",
 			  __func__, __LINE__);
 		return;
 	}
@@ -3323,7 +3323,7 @@ void wlan_crypto_restore_keys(struct wlan_objmgr_vdev *vdev)
 			if (!crypto_priv) {
 				QDF_TRACE(QDF_MODULE_ID_CRYPTO,
 					  QDF_TRACE_LEVEL_ERROR,
-					  "%s[%d] crypto_priv is NULL\n",
+					  "%s[%d] crypto_priv is NULL",
 					  __func__, __LINE__);
 				return;
 			}

+ 7 - 7
umac/cmn_services/crypto/src/wlan_crypto_obj_mgr.c

@@ -163,8 +163,8 @@ static QDF_STATUS wlan_crypto_peer_obj_create_handler(
 					wlan_peer_get_vdev(peer), peer);
 		}
 	} else {
-		qdf_print("%s[%d] peer obj failed status %d\n",
-					__func__, __LINE__, status);
+		qdf_print("%s[%d] peer obj failed status %d",
+			  __func__, __LINE__, status);
 		qdf_mem_free(crypto_priv);
 	}
 
@@ -176,7 +176,7 @@ static void wlan_crypto_free_key(struct wlan_crypto_comp_priv *crypto_priv)
 	uint8_t i;
 
 	if (!crypto_priv) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return;
 	}
 
@@ -202,7 +202,7 @@ static QDF_STATUS wlan_crypto_vdev_obj_destroy_handler(
 	struct wlan_crypto_comp_priv *crypto_priv;
 
 	if (!vdev) {
-		qdf_print("%s[%d] Vdev NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] Vdev NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -210,7 +210,7 @@ static QDF_STATUS wlan_crypto_vdev_obj_destroy_handler(
 				wlan_get_vdev_crypto_obj(vdev);
 
 	if (!crypto_priv) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 	wlan_objmgr_vdev_component_obj_detach(vdev,
@@ -228,13 +228,13 @@ static QDF_STATUS wlan_crypto_peer_obj_destroy_handler(
 	struct wlan_crypto_comp_priv *crypto_priv;
 
 	if (!peer) {
-		qdf_print("%s[%d] Peer NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] Peer NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 	crypto_priv = (struct wlan_crypto_comp_priv *)
 				wlan_get_peer_crypto_obj(peer);
 	if (!crypto_priv) {
-		qdf_print("%s[%d] crypto_priv NULL\n", __func__, __LINE__);
+		qdf_print("%s[%d] crypto_priv NULL", __func__, __LINE__);
 		return QDF_STATUS_E_INVAL;
 	}
 

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

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
  */
 /*
  * Wired Equivalent Privacy (WEP)
@@ -67,7 +67,7 @@ uint8_t *wlan_crypto_wep_encrypt(const uint8_t *key, uint16_t key_len,
 	uint32_t icv;
 
 	if (data_len < 4 + 4) {
-		qdf_print("%s[%d] invalid len\n", __func__, __LINE__);
+		qdf_print("%s[%d] invalid len", __func__, __LINE__);
 		return NULL;
 	}
 
@@ -84,7 +84,7 @@ uint8_t *wlan_crypto_wep_decrypt(const uint8_t *key, uint16_t key_len,
 	uint32_t icv, rx_icv;
 
 	if (data_len < 4 + 4) {
-		qdf_print("%s[%d] invalid len\n", __func__, __LINE__);
+		qdf_print("%s[%d] invalid len", __func__, __LINE__);
 		return NULL;
 	}
 
@@ -96,7 +96,7 @@ uint8_t *wlan_crypto_wep_decrypt(const uint8_t *key, uint16_t key_len,
 	wlan_crypto_try_wep(k, 3 + key_len, data + 4, data_len - 4, &icv);
 
 	if (icv != rx_icv) {
-		qdf_print("%s[%d] iv mismatch\n", __func__, __LINE__);
+		qdf_print("%s[%d] iv mismatch", __func__, __LINE__);
 		return NULL;
 	}
 

+ 5 - 5
utils/pktlog/linux_ac.c

@@ -422,7 +422,7 @@ static int pktlog_attach(struct hif_opaque_softc *scn)
 		pl_info_lnx = kmalloc(sizeof(*pl_info_lnx), GFP_KERNEL);
 		if (pl_info_lnx == NULL) {
 			QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-				 "%s: Allocation failed for pl_info\n",
+				 "%s: Allocation failed for pl_info",
 				 __func__);
 			goto attach_fail1;
 		}
@@ -560,7 +560,7 @@ static int __pktlog_open(struct inode *i, struct file *f)
 	scn = cds_get_context(QDF_MODULE_ID_HIF);
 	if (!scn) {
 		pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
-		qdf_print("%s: Invalid scn context\n", __func__);
+		qdf_print("%s: Invalid scn context", __func__);
 		ASSERT(0);
 		return -EINVAL;
 	}
@@ -569,7 +569,7 @@ static int __pktlog_open(struct inode *i, struct file *f)
 
 	if (!pl_dev) {
 		pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
-		qdf_print("%s: Invalid pktlog handle\n", __func__);
+		qdf_print("%s: Invalid pktlog handle", __func__);
 		ASSERT(0);
 		return -ENODEV;
 	}
@@ -625,7 +625,7 @@ static int __pktlog_release(struct inode *i, struct file *f)
 	scn = cds_get_context(QDF_MODULE_ID_HIF);
 	if (!scn) {
 		pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
-		qdf_print("%s: Invalid scn context\n", __func__);
+		qdf_print("%s: Invalid scn context", __func__);
 		ASSERT(0);
 		return -EINVAL;
 	}
@@ -634,7 +634,7 @@ static int __pktlog_release(struct inode *i, struct file *f)
 
 	if (!pl_dev) {
 		pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
-		qdf_print("%s: Invalid pktlog handle\n", __func__);
+		qdf_print("%s: Invalid pktlog handle", __func__);
 		ASSERT(0);
 		return -ENODEV;
 	}

+ 31 - 32
utils/pktlog/pktlog_ac.c

@@ -176,7 +176,7 @@ wdi_pktlog_subscribe(struct cdp_pdev *cdp_pdev, int32_t log_state)
 #endif
 
 	if (!cdp_pdev) {
-		qdf_print("Invalid pdev in %s\n", __func__);
+		qdf_print("Invalid pdev in %s", __func__);
 		return A_ERROR;
 	}
 
@@ -246,7 +246,7 @@ void pktlog_callback(void *pdev, enum WDI_EVENT event, void *log_data,
 		 * process TX message
 		 */
 		if (process_tx_info(pdev, log_data)) {
-			qdf_print("Unable to process TX info\n");
+			qdf_print("Unable to process TX info");
 			return;
 		}
 		break;
@@ -257,7 +257,7 @@ void pktlog_callback(void *pdev, enum WDI_EVENT event, void *log_data,
 		 * process RX message for local frames
 		 */
 		if (process_rx_info(pdev, log_data)) {
-			qdf_print("Unable to process RX info\n");
+			qdf_print("Unable to process RX info");
 			return;
 		}
 		break;
@@ -268,7 +268,7 @@ void pktlog_callback(void *pdev, enum WDI_EVENT event, void *log_data,
 		 * process RX message for remote frames
 		 */
 		if (process_rx_info_remote(pdev, log_data)) {
-			qdf_print("Unable to process RX info\n");
+			qdf_print("Unable to process RX info");
 			return;
 		}
 		break;
@@ -279,7 +279,7 @@ void pktlog_callback(void *pdev, enum WDI_EVENT event, void *log_data,
 		 * process RATE_FIND message
 		 */
 		if (process_rate_find(pdev, log_data)) {
-			qdf_print("Unable to process RC_FIND info\n");
+			qdf_print("Unable to process RC_FIND info");
 			return;
 		}
 		break;
@@ -290,7 +290,7 @@ void pktlog_callback(void *pdev, enum WDI_EVENT event, void *log_data,
 		 * process RATE_UPDATE message
 		 */
 		if (process_rate_update(pdev, log_data)) {
-			qdf_print("Unable to process RC_UPDATE\n");
+			qdf_print("Unable to process RC_UPDATE");
 			return;
 		}
 		break;
@@ -301,7 +301,7 @@ void pktlog_callback(void *pdev, enum WDI_EVENT event, void *log_data,
 		 * process SW EVENT message
 		 */
 		if (process_sw_event(pdev, log_data)) {
-			qdf_print("Unable to process SW_EVENT\n");
+			qdf_print("Unable to process SW_EVENT");
 			return;
 		}
 		break;
@@ -319,7 +319,7 @@ lit_pktlog_callback(void *context, enum WDI_EVENT event, void *log_data,
 	case WDI_EVENT_RX_DESC:
 	{
 		if (process_rx_desc_remote(context, log_data)) {
-			qdf_print("Unable to process RX info\n");
+			qdf_print("Unable to process RX info");
 			return;
 		}
 		break;
@@ -328,7 +328,7 @@ lit_pktlog_callback(void *context, enum WDI_EVENT event, void *log_data,
 	{
 		if (process_pktlog_lite(context, log_data,
 					PKTLOG_TYPE_LITE_T2H)) {
-			qdf_print("Unable to process lite_t2h\n");
+			qdf_print("Unable to process lite_t2h");
 			return;
 		}
 		break;
@@ -337,7 +337,7 @@ lit_pktlog_callback(void *context, enum WDI_EVENT event, void *log_data,
 	{
 		if (process_pktlog_lite(context, log_data,
 					PKTLOG_TYPE_LITE_RX)) {
-			qdf_print("Unable to process lite_rx\n");
+			qdf_print("Unable to process lite_rx");
 			return;
 		}
 		break;
@@ -452,14 +452,14 @@ int pktlog_disable(struct hif_opaque_softc *scn)
 
 	if (pktlog_wma_post_msg(0, WMI_PDEV_PKTLOG_DISABLE_CMDID, 0, 0)) {
 		pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
-		qdf_print("Failed to disable pktlog in target\n");
+		qdf_print("Failed to disable pktlog in target");
 		return -EINVAL;
 	}
 
 	if (pl_dev->is_pktlog_cb_subscribed &&
 		wdi_pktlog_unsubscribe(txrx_pdev, pl_info->log_state)) {
 		pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
-		qdf_print("Cannot unsubscribe pktlog from the WDI\n");
+		qdf_print("Cannot unsubscribe pktlog from the WDI");
 		return -EINVAL;
 	}
 	pl_dev->is_pktlog_cb_subscribed = false;
@@ -477,7 +477,7 @@ void pktlog_init(struct hif_opaque_softc *scn)
 	struct ath_pktlog_info *pl_info;
 
 	if (pl_dev == NULL || pl_dev->pl_info == NULL) {
-		qdf_print("pl_dev or pl_info is invalid\n");
+		qdf_print("pl_dev or pl_info is invalid");
 		return;
 	}
 
@@ -526,28 +526,28 @@ static int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
 	int error;
 
 	if (!scn) {
-		qdf_print("%s: Invalid scn context\n", __func__);
+		qdf_print("%s: Invalid scn context", __func__);
 		ASSERT(0);
 		return -EINVAL;
 	}
 
 	pl_dev = get_pktlog_handle();
 	if (!pl_dev) {
-		qdf_print("%s: Invalid pktlog context\n", __func__);
+		qdf_print("%s: Invalid pktlog context", __func__);
 		ASSERT(0);
 		return -EINVAL;
 	}
 
 	cdp_pdev = get_txrx_context();
 	if (!cdp_pdev) {
-		qdf_print("%s: Invalid txrx context\n", __func__);
+		qdf_print("%s: Invalid txrx context", __func__);
 		ASSERT(0);
 		return -EINVAL;
 	}
 
 	pl_info = pl_dev->pl_info;
 	if (!pl_info) {
-		qdf_print("%s: Invalid pl_info context\n", __func__);
+		qdf_print("%s: Invalid pl_info context", __func__);
 		ASSERT(0);
 		return -EINVAL;
 	}
@@ -564,7 +564,7 @@ static int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
 	if (is_iwpriv_command == 0 && log_state == 0 &&
 	    pl_dev->vendor_cmd_send == false) {
 		pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
-		qdf_print("%s: pktlog operation not in progress\n", __func__);
+		qdf_print("%s: pktlog operation not in progress", __func__);
 		return 0;
 	}
 
@@ -575,16 +575,16 @@ static int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
 			if (error != 0) {
 				pl_info->curr_pkt_state =
 					PKTLOG_OPR_NOT_IN_PROGRESS;
-				qdf_print("%s: pktlog buff alloc failed\n",
-					__func__);
+				qdf_print("%s: pktlog buff alloc failed",
+					  __func__);
 				return -ENOMEM;
 			}
 
 			if (!pl_info->buf) {
 				pl_info->curr_pkt_state =
 					PKTLOG_OPR_NOT_IN_PROGRESS;
-				qdf_print("%s: pktlog buf alloc failed\n",
-				       __func__);
+				qdf_print("%s: pktlog buf alloc failed",
+					  __func__);
 				ASSERT(0);
 				return -ENOMEM;
 			}
@@ -614,13 +614,13 @@ static int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
 			if (error) {
 				pl_info->curr_pkt_state =
 						PKTLOG_OPR_NOT_IN_PROGRESS;
-				qdf_print("Unable to subscribe to the WDI %s\n",
-					__func__);
+				qdf_print("Unable to subscribe to the WDI %s",
+					  __func__);
 				return -EINVAL;
 			}
 		} else {
 			pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
-			qdf_print("Unable to subscribe %d to the WDI %s\n",
+			qdf_print("Unable to subscribe %d to the WDI %s",
 				  log_state, __func__);
 			return -EINVAL;
 		}
@@ -628,7 +628,7 @@ static int __pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
 		if (pktlog_enable_tgt(scn, log_state, ini_triggered,
 				user_triggered)) {
 			pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
-			qdf_print("Device cannot be enabled, %s\n", __func__);
+			qdf_print("Device cannot be enabled, %s", __func__);
 			return -EINVAL;
 		}
 		pl_dev->is_pktlog_cb_subscribed = true;
@@ -714,10 +714,9 @@ static int __pktlog_setsize(struct hif_opaque_softc *scn, int32_t size)
 	pl_info->curr_pkt_state = PKTLOG_OPR_IN_PROGRESS;
 
 	if (size < ONE_MEGABYTE || size > MAX_ALLOWED_PKTLOG_SIZE) {
-		qdf_print("%s: Cannot Set Pktlog Buffer size of %d bytes."
-			"Min required is %d MB and Max allowed is %d MB.\n",
-			__func__, size, (ONE_MEGABYTE/ONE_MEGABYTE),
-			(MAX_ALLOWED_PKTLOG_SIZE/ONE_MEGABYTE));
+		qdf_print("%s: Cannot Set Pktlog Buffer size of %d bytes.Min required is %d MB and Max allowed is %d MB.",
+			  __func__, size, (ONE_MEGABYTE / ONE_MEGABYTE),
+			  (MAX_ALLOWED_PKTLOG_SIZE / ONE_MEGABYTE));
 		pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
 		qdf_print("%s: Invalid requested buff size", __func__);
 		return -EINVAL;
@@ -743,7 +742,7 @@ static int __pktlog_setsize(struct hif_opaque_softc *scn, int32_t size)
 			wdi_pktlog_unsubscribe(pdev, pl_info->log_state)) {
 			pl_info->curr_pkt_state =
 				PKTLOG_OPR_NOT_IN_PROGRESS;
-			qdf_print("Cannot unsubscribe pktlog from the WDI\n");
+			qdf_print("Cannot unsubscribe pktlog from the WDI");
 			spin_unlock_bh(&pl_info->log_lock);
 			return -EFAULT;
 		}
@@ -753,7 +752,7 @@ static int __pktlog_setsize(struct hif_opaque_softc *scn, int32_t size)
 	}
 
 	if (size != 0) {
-		qdf_print("%s: New Pktlog Buff Size is %d\n", __func__, size);
+		qdf_print("%s: New Pktlog Buff Size is %d", __func__, size);
 		pl_info->buf_size = size;
 	}
 	pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;

+ 17 - 17
utils/pktlog/pktlog_internal.c

@@ -294,7 +294,7 @@ fill_ieee80211_hdr_data(struct cdp_pdev *pdev,
 		}
 		if (tx_desc_id >= txrx_pdev->tx_desc.pool_size) {
 			QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_DEBUG,
-				"%s: drop due to invalid msdu id = %x\n",
+				"%s: drop due to invalid msdu id = %x",
 				__func__, tx_desc_id);
 			return;
 		}
@@ -307,7 +307,7 @@ fill_ieee80211_hdr_data(struct cdp_pdev *pdev,
 		qdf_nbuf_peek_header(netbuf, &addr, &len);
 
 		if (len < (2 * IEEE80211_ADDR_LEN)) {
-			qdf_print("TX frame does not have a valid address\n");
+			qdf_print("TX frame does not have a valid address");
 			return;
 		}
 		/* Adding header information for the TX data frames */
@@ -383,7 +383,7 @@ A_STATUS process_tx_info(struct cdp_pdev *txrx_pdev, void *data)
 		       (ATH_PKTLOG_HDR_SIZE_OFFSET + 1)) ||
 		len < (sizeof(uint32_t) *
 		       (ATH_PKTLOG_HDR_TYPE_SPECIFIC_DATA_OFFSET + 1))) {
-		qdf_print("Invalid msdu len in %s\n", __func__);
+		qdf_print("Invalid msdu len in %s", __func__);
 		qdf_assert(0);
 		return A_ERROR;
 	}
@@ -469,7 +469,7 @@ A_STATUS process_tx_info(struct cdp_pdev *txrx_pdev, void *data)
 	uint32_t len;
 
 	if (!txrx_pdev) {
-		qdf_print("Invalid pdev in %s\n", __func__);
+		qdf_print("Invalid pdev in %s", __func__);
 		return A_ERROR;
 	}
 
@@ -493,7 +493,7 @@ A_STATUS process_tx_info(struct cdp_pdev *txrx_pdev, void *data)
 		       (ATH_PKTLOG_HDR_SIZE_OFFSET + 1)) ||
 		len < (sizeof(uint32_t) *
 		       (ATH_PKTLOG_HDR_TYPE_SPECIFIC_DATA_OFFSET + 1))) {
-		qdf_print("Invalid msdu len in %s\n", __func__);
+		qdf_print("Invalid msdu len in %s", __func__);
 		qdf_assert(0);
 		return A_ERROR;
 	}
@@ -736,7 +736,7 @@ A_STATUS process_rx_info(void *pdev, void *data)
 		       (ATH_PKTLOG_HDR_SIZE_OFFSET + 1)) ||
 		len < (sizeof(uint32_t) *
 		       (ATH_PKTLOG_HDR_TYPE_SPECIFIC_DATA_OFFSET + 1))) {
-		qdf_print("Invalid msdu len in %s\n", __func__);
+		qdf_print("Invalid msdu len in %s", __func__);
 		qdf_assert(0);
 		return A_ERROR;
 	}
@@ -812,7 +812,7 @@ A_STATUS process_rx_info(void *pdev, void *data)
 		       (ATH_PKTLOG_HDR_SIZE_OFFSET + 1)) ||
 		len < (sizeof(uint32_t) *
 		       (ATH_PKTLOG_HDR_TYPE_SPECIFIC_DATA_OFFSET + 1))) {
-		qdf_print("Invalid msdu len in %s\n", __func__);
+		qdf_print("Invalid msdu len in %s", __func__);
 		qdf_assert(0);
 		return A_ERROR;
 	}
@@ -886,7 +886,7 @@ A_STATUS process_rate_find(void *pdev, void *data)
 		       (ATH_PKTLOG_HDR_SIZE_OFFSET + 1)) ||
 		len < (sizeof(uint32_t) *
 		       (ATH_PKTLOG_HDR_TYPE_SPECIFIC_DATA_OFFSET + 1))) {
-		qdf_print("Invalid msdu len in %s\n", __func__);
+		qdf_print("Invalid msdu len in %s", __func__);
 		qdf_assert(0);
 		return A_ERROR;
 	}
@@ -966,7 +966,7 @@ A_STATUS process_rate_find(void *pdev, void *data)
 		       (ATH_PKTLOG_HDR_SIZE_OFFSET + 1)) ||
 		len < (sizeof(uint32_t) *
 		       (ATH_PKTLOG_HDR_TYPE_SPECIFIC_DATA_OFFSET + 1))) {
-		qdf_print("Invalid msdu len in %s\n", __func__);
+		qdf_print("Invalid msdu len in %s", __func__);
 		qdf_assert(0);
 		return A_ERROR;
 	}
@@ -1027,11 +1027,11 @@ A_STATUS process_sw_event(void *pdev, void *data)
 	uint32_t *pl_tgt_hdr;
 
 	if (!pdev) {
-		qdf_print("Invalid pdev in %s\n", __func__);
+		qdf_print("Invalid pdev in %s", __func__);
 		return A_ERROR;
 	}
 	if (!data) {
-		qdf_print("Invalid data in %s\n", __func__);
+		qdf_print("Invalid data in %s", __func__);
 		return A_ERROR;
 	}
 	if (!pl_dev) {
@@ -1053,7 +1053,7 @@ A_STATUS process_sw_event(void *pdev, void *data)
 		       (ATH_PKTLOG_HDR_SIZE_OFFSET + 1)) ||
 		len < (sizeof(uint32_t) *
 		       (ATH_PKTLOG_HDR_TYPE_SPECIFIC_DATA_OFFSET + 1))) {
-		qdf_print("Invalid msdu len in %s\n", __func__);
+		qdf_print("Invalid msdu len in %s", __func__);
 		qdf_assert(0);
 		return A_ERROR;
 	}
@@ -1115,11 +1115,11 @@ A_STATUS process_sw_event(void *pdev, void *data)
 	uint32_t *pl_tgt_hdr;
 
 	if (!pdev) {
-		qdf_print("Invalid pdev in %s\n", __func__);
+		qdf_print("Invalid pdev in %s", __func__);
 		return A_ERROR;
 	}
 	if (!data) {
-		qdf_print("Invalid data in %s\n", __func__);
+		qdf_print("Invalid data in %s", __func__);
 		return A_ERROR;
 	}
 	if (!pl_dev) {
@@ -1139,7 +1139,7 @@ A_STATUS process_sw_event(void *pdev, void *data)
 		       (ATH_PKTLOG_HDR_SIZE_OFFSET + 1)) ||
 		len < (sizeof(uint32_t) *
 		       (ATH_PKTLOG_HDR_TYPE_SPECIFIC_DATA_OFFSET + 1))) {
-		qdf_print("Invalid msdu len in %s\n", __func__);
+		qdf_print("Invalid msdu len in %s", __func__);
 		qdf_assert(0);
 		return A_ERROR;
 	}
@@ -1208,7 +1208,7 @@ A_STATUS process_rate_update(void *pdev, void *data)
 		       (ATH_PKTLOG_HDR_SIZE_OFFSET + 1)) ||
 		len < (sizeof(uint32_t) *
 		       (ATH_PKTLOG_HDR_TYPE_SPECIFIC_DATA_OFFSET + 1))) {
-		qdf_print("Invalid msdu len in %s\n", __func__);
+		qdf_print("Invalid msdu len in %s", __func__);
 		qdf_assert(0);
 		return A_ERROR;
 	}
@@ -1286,7 +1286,7 @@ A_STATUS process_rate_update(void *pdev, void *data)
 		       (ATH_PKTLOG_HDR_SIZE_OFFSET + 1)) ||
 		len < (sizeof(uint32_t) *
 		       (ATH_PKTLOG_HDR_TYPE_SPECIFIC_DATA_OFFSET + 1))) {
-		qdf_print("Invalid msdu len in %s\n", __func__);
+		qdf_print("Invalid msdu len in %s", __func__);
 		qdf_assert(0);
 		return A_ERROR;
 	}