summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hsu <ryanhsu@qca.qualcomm.com>2016-05-04 15:47:21 -0700
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-05-16 12:12:33 +0530
commitf3b97ad49685211ae8782fc57f7d71b79ca1f4ff (patch)
treef238dca33bc793dfcf7b9ad649953833316c3317
parente425fabbf405929d6f5fbfadceb1c17b324ccad5 (diff)
qcacld-2.0: Avoid potential recursive calls
vos_get_radio_index() would be used by wlan_log_to_user(), which would potentially cause recursive calls if gpVosContext is NULL. Since this print is not having much value here, just remove it. Also remove the print that would reveal the kernel address. Change-Id: Id190d471c91a4a0d87ae1bc43c771b71e60fb1f1 CRs-fixed: 1011854
-rw-r--r--CORE/SVC/src/nlink/wlan_nlink_srv.c3
-rw-r--r--CORE/VOSS/src/vos_api.c10
2 files changed, 6 insertions, 7 deletions
diff --git a/CORE/SVC/src/nlink/wlan_nlink_srv.c b/CORE/SVC/src/nlink/wlan_nlink_srv.c
index 61d5e096e1c5..96ae6c509993 100644
--- a/CORE/SVC/src/nlink/wlan_nlink_srv.c
+++ b/CORE/SVC/src/nlink/wlan_nlink_srv.c
@@ -74,8 +74,7 @@ int nl_srv_init(void *wiphy)
wiphy_ptr = wiphy;
radio_idx = cnss_logger_device_register(wiphy, THIS_MODULE->name);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: radio_index: %d, wiphy_ptr: %p",
- __func__, radio_idx, wiphy_ptr);
+ "%s: radio_index: %d", __func__, radio_idx);
if (radio_idx >= 0)
logger_initialized = true;
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index 6e5629589bd9..c9cb7630060d 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -2979,8 +2979,8 @@ inline void vos_pkt_stats_to_logger_thread(void *pl_hdr, void *pkt_dump,
int vos_get_radio_index(void)
{
if (gpVosContext == NULL) {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- FL("global voss context is NULL"));
+ /* this should never change to use VOS_TRACE interface */
+ pr_err("global voss context is NULL\n");
return -EINVAL;
}
return gpVosContext->radio_index;
@@ -2995,11 +2995,11 @@ int vos_get_radio_index(void)
int vos_set_radio_index(int radio_index)
{
if (gpVosContext == NULL) {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- FL("global voss context is NULL"));
+ /* this should never change to use VOS_TRACE interface */
+ pr_err("global voss context is NULL\n");
return -EINVAL;
}
- gpVosContext->radio_index = radio_index;
+ gpVosContext->radio_index = radio_index;
return 0;
}