From 9f72df00fd1a3d27c4557db63c3f2e8d9d65473b Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Mon, 23 Jul 2018 19:20:04 +0530 Subject: [PATCH] qcacld-3.0: Add mtrace logging for P2P module We are transitioning to new logging infrastructure by using existing mtrace functionality. Add new logging for complete P2P module. Change-Id: If49d66ea42a48be0ac6c7a8b4c91d69ebd5fcef9 CRs-Fixed: 2308618 --- core/hdd/inc/wlan_hdd_trace.h | 3 ++- core/hdd/src/wlan_hdd_p2p.c | 8 ++++++++ core/mac/src/pe/lim/lim_send_management_frames.c | 4 ++-- core/sme/src/common/sme_api.c | 3 --- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_trace.h b/core/hdd/inc/wlan_hdd_trace.h index ecb97c8f730c..41d12a321605 100644 --- a/core/hdd/inc/wlan_hdd_trace.h +++ b/core/hdd/inc/wlan_hdd_trace.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2018 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 @@ -100,6 +100,7 @@ ENUM(TRACE_CODE_HDD_CFG80211_SCHED_SCAN_START) \ ENUM(TRACE_CODE_HDD_CFG80211_SCHED_SCAN_STOP) \ ENUM(TRACE_CODE_HDD_CFG80211_DEL_PMKSA) \ + ENUM(TRACE_CODE_HDD_SEND_MGMT_TX) \ /* * New CFG80211 enums to be added before this comment. * TRACE_CODE_HDD_RX_SME_MSG is used as code for MTRACE commands. diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index 7fdfd868348e..a7cd3c2fa3fd 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -251,6 +251,10 @@ static int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, if ((adapter->device_mode == QDF_STA_MODE) && (type == SIR_MAC_MGMT_FRAME && sub_type == SIR_MAC_MGMT_AUTH)) { + qdf_mtrace(QDF_MODULE_ID_HDD, QDF_MODULE_ID_SME, + TRACE_CODE_HDD_SEND_MGMT_TX, + wlan_vdev_get_id(adapter->vdev), 0); + qdf_status = sme_send_mgmt_tx(hdd_ctx->mac_handle, adapter->session_id, buf, len); @@ -260,6 +264,10 @@ static int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, return -EINVAL; } + qdf_mtrace(QDF_MODULE_ID_HDD, QDF_MODULE_ID_OS_IF, + TRACE_CODE_HDD_SEND_MGMT_TX, + wlan_vdev_get_id(adapter->vdev), 0); + status = wlan_cfg80211_mgmt_tx(adapter->vdev, chan, offchan, wait, buf, len, no_cck, dont_wait_for_ack, cookie); hdd_debug("mgmt tx, status:%d, cookie:0x%llx", status, *cookie); diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index a38fcbb9ade6..5164db91dfeb 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -4981,8 +4981,8 @@ static void lim_tx_mgmt_frame(tpAniSirGlobal mac_ctx, return; } - MTRACE(qdf_trace(QDF_MODULE_ID_PE, TRACE_CODE_TX_MGMT, - session->peSessionId, fc->subType)); + qdf_mtrace(QDF_MODULE_ID_PE, QDF_MODULE_ID_WMA, TRACE_CODE_TX_MGMT, + session->peSessionId, 0); mac_ctx->auth_ack_status = LIM_AUTH_ACK_NOT_RCD; min_rid = lim_get_min_session_txrate(session); diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index da3c8da647d8..d0b5bc557e73 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -5161,9 +5161,6 @@ QDF_STATUS sme_send_mgmt_tx(tHalHandle hal, uint8_t session_id, QDF_STATUS status = QDF_STATUS_SUCCESS; tpAniSirGlobal mac = PMAC_STRUCT(hal); - MTRACE(qdf_trace(QDF_MODULE_ID_SME, - TRACE_CODE_SME_RX_HDD_SEND_MGMT_TX, session_id, 0)); - status = sme_acquire_global_lock(&mac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { status = sme_prepare_mgmt_tx(hal, session_id, buf, len);