diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index a59d166..c193e84 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -375,16 +375,25 @@ static int wpa_supplicant_wps_cred(void *ctx,
 
 	if ((wpa_s->conf->wps_cred_processing == 1 ||
 	     wpa_s->conf->wps_cred_processing == 2) && cred->cred_attr) {
+#ifdef CONFIG_MTK_MAP
+		size_t blen = (sizeof(struct wps_credential) - sizeof(size_t) - sizeof (const u8 *)) * 2 + 1;
+		size_t wps_cred_len = sizeof(struct wps_credential) - sizeof(size_t) - sizeof (const u8 *);
+#else
 		size_t blen = cred->cred_attr_len * 2 + 1;
+#endif
 		char *buf = os_malloc(blen);
 		if (buf) {
+#ifdef CONFIG_MTK_MAP
+			wpa_snprintf_hex(buf, blen,
+					 (u8 *)cred, wps_cred_len);
+#else
 			wpa_snprintf_hex(buf, blen,
 					 cred->cred_attr, cred->cred_attr_len);
+#endif
 			wpa_msg(wpa_s, MSG_INFO, "%s%s",
 				WPS_EVENT_CRED_RECEIVED, buf);
 			os_free(buf);
 		}
-
 		wpas_notify_wps_credential(wpa_s, cred);
 	} else
 		wpa_msg(wpa_s, MSG_INFO, WPS_EVENT_CRED_RECEIVED);
