summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelvaraj, Sridhar <sselvara@codeaurora.org>2017-02-09 11:03:23 +0530
committerqcabuildsw <qcabuildsw@localhost>2017-02-24 00:58:48 -0800
commit91e9d7edca39ff88deb409261d14440550ee5eff (patch)
treeb5066ffb24d3e808d11a0a749b642c7cb7bb5023
parentc9dafea956a90f0778af1f568b18ac2f6ebe728a (diff)
qcacld-2.0: Remove Logger socket app msg init/deinit changes
Now all host and firmware logs are sent to multicast group id's and are not sent to particular process on userspace. Change-Id: I6fc9540de1313d6a2ad3564090e5fed281f54a62 CRs-Fixed: 1112784
-rw-r--r--CORE/SVC/src/logging/wlan_logging_sock_svc.c177
1 files changed, 0 insertions, 177 deletions
diff --git a/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
index e690e31d643c..748a129a1229 100644
--- a/CORE/SVC/src/logging/wlan_logging_sock_svc.c
+++ b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
@@ -178,65 +178,6 @@ static struct wlan_logging gwlan_logging;
static struct log_msg *gplog_msg;
static struct pkt_stats_msg *gpkt_stats_buffers;
-/* PID of the APP to log the message */
-static int gapp_pid = INVALID_PID;
-
-#ifndef CNSS_GENL
-/* Utility function to send a netlink message to an application
- * in user space
- */
-static int wlan_send_sock_msg_to_app(tAniHdr *wmsg, int radio,
- int src_mod, int pid)
-{
- int err = -1;
- int payload_len;
- int tot_msg_len;
- tAniNlHdr *wnl = NULL;
- struct sk_buff *skb;
- struct nlmsghdr *nlh;
- int wmsg_length = ntohs(wmsg->length);
- static int nlmsg_seq;
-
- if (radio < 0 || radio > ANI_MAX_RADIOS) {
- LOGGING_TRACE(VOS_TRACE_LEVEL_ERROR,
- "%s: invalid radio id [%d]",
- __func__, radio);
- return -EINVAL;
- }
-
- payload_len = wmsg_length + sizeof(wnl->radio) + sizeof(tAniHdr);
- tot_msg_len = NLMSG_SPACE(payload_len);
- skb = dev_alloc_skb(tot_msg_len);
- if (skb == NULL) {
- LOGGING_TRACE(VOS_TRACE_LEVEL_ERROR,
- "%s: dev_alloc_skb() failed for msg size[%d]",
- __func__, tot_msg_len);
- return -ENOMEM;
- }
- nlh = nlmsg_put(skb, pid, nlmsg_seq++, src_mod, payload_len,
- NLM_F_REQUEST);
- if (NULL == nlh) {
- LOGGING_TRACE(VOS_TRACE_LEVEL_ERROR,
- "%s: nlmsg_put() failed for msg size[%d]",
- __func__, tot_msg_len);
- kfree_skb(skb);
- return -ENOMEM;
- }
-
- wnl = (tAniNlHdr *) nlh;
- wnl->radio = radio;
- memcpy(&wnl->wmsg, wmsg, wmsg_length);
- err = nl_srv_ucast(skb, pid, MSG_DONTWAIT);
- if (err) {
- LOGGING_TRACE(VOS_TRACE_LEVEL_INFO,
- "%s: Failed sending Msg Type [0x%X] to pid[%d]\n",
- __func__, wmsg->type, pid);
- }
-
- return err;
-}
-#endif
-
/**
* is_data_path_module() - To check for a Datapath module
* @mod_id: Module id
@@ -853,125 +794,12 @@ static int wlan_logging_thread(void *Arg)
return 0;
}
-#ifdef CNSS_GENL
-/**
- * register_logging_sock_handler() - Logging sock handler registration
- *
- * Dummy API to register the command handler for logger socket app.
- *
- * Return: None
- */
-static void register_logging_sock_handler(void)
-{
-}
-
-/**
- * unregister_logging_sock_handler() - Logging sock handler unregistration
- *
- * Dummy API to unregister the command handler for logger socket app.
- *
- * Return: None
- */
-static void unregister_logging_sock_handler(void)
-{
-}
-
-#else
-/*
- * Process all the Netlink messages from Logger Socket app in user space
- */
-static int wlan_logging_proc_sock_rx_msg(struct sk_buff *skb)
-{
- tAniNlHdr *wnl;
- int radio;
- int type;
- int ret, len;
-
- wnl = (tAniNlHdr *) skb->data;
- radio = wnl->radio;
- type = wnl->nlh.nlmsg_type;
-
- if (radio < 0 || radio > ANI_MAX_RADIOS) {
- LOGGING_TRACE(VOS_TRACE_LEVEL_ERROR,
- "%s: invalid radio id [%d]\n",
- __func__, radio);
- return -EINVAL;
- }
-
- len = ntohs(wnl->wmsg.length) + sizeof(tAniNlHdr);
- if (len > skb_headlen(skb)) {
- LOGGING_TRACE(VOS_TRACE_LEVEL_ERROR,
- "%s: invalid length, msgLen:%x skb len:%x headLen: %d data_len: %d",
- __func__, len, skb->len, skb_headlen(skb),
- skb->data_len);
- return -EINVAL;
- }
-
- if (gapp_pid != INVALID_PID) {
- if (wnl->nlh.nlmsg_pid > gapp_pid) {
- gapp_pid = wnl->nlh.nlmsg_pid;
- }
-
- spin_lock_bh(&gwlan_logging.spin_lock);
- if (gwlan_logging.pcur_node->filled_length) {
- wlan_queue_logmsg_for_app();
- }
- spin_unlock_bh(&gwlan_logging.spin_lock);
- set_bit(HOST_LOG_DRIVER_MSG, &gwlan_logging.eventFlag);
- wake_up_interruptible(&gwlan_logging.wait_queue);
- } else {
- /* This is to set the default levels (WLAN logging
- * default values not the VOS trace default) when
- * logger app is registered for the first time.
- */
- gapp_pid = wnl->nlh.nlmsg_pid;
- }
-
- ret = wlan_send_sock_msg_to_app(&wnl->wmsg, 0,
- ANI_NL_MSG_LOG, wnl->nlh.nlmsg_pid);
- if (ret < 0) {
- LOGGING_TRACE(VOS_TRACE_LEVEL_ERROR,
- "wlan_send_sock_msg_to_app: failed");
- }
-
- return ret;
-}
-
-/**
- * register_logging_sock_handler() - Logging sock handler registration
- *
- * API to register the command handler for logger socket app. Registers
- * legacy handler
- *
- * Return: None
- */
-static void register_logging_sock_handler(void)
-{
- nl_srv_register(ANI_NL_MSG_LOG, wlan_logging_proc_sock_rx_msg);
-}
-
-/**
- * unregister_logging_sock_handler() - Logging sock handler unregistration
- *
- * API to unregister the command handler for logger socket app. Unregisters
- * legacy handler
- *
- * Return: None
- */
-static void unregister_logging_sock_handler(void)
-{
- nl_srv_unregister(ANI_NL_MSG_LOG, wlan_logging_proc_sock_rx_msg);
-}
-#endif
int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf)
{
int i, j, pkt_stats_size;
unsigned long irq_flag;
-
- gapp_pid = INVALID_PID;
-
gplog_msg = (struct log_msg *) vmalloc(
num_buf * sizeof(struct log_msg));
if (!gplog_msg) {
@@ -1054,7 +882,6 @@ int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf)
gwlan_logging.is_active = true;
gwlan_logging.is_flush_complete = false;
- register_logging_sock_handler();
return 0;
err3:
@@ -1084,9 +911,7 @@ int wlan_logging_sock_deactivate_svc(void)
if (!gplog_msg)
return 0;
- unregister_logging_sock_handler();
clear_default_logtoapp_log_level();
- gapp_pid = INVALID_PID;
INIT_COMPLETION(gwlan_logging.shutdown_comp);
gwlan_logging.exit = true;
@@ -1125,7 +950,6 @@ int wlan_logging_sock_init_svc(void)
{
spin_lock_init(&gwlan_logging.spin_lock);
spin_lock_init(&gwlan_logging.pkt_stats_lock);
- gapp_pid = INVALID_PID;
gwlan_logging.pcur_node = NULL;
gwlan_logging.pkt_stats_pcur_node = NULL;
return 0;
@@ -1135,7 +959,6 @@ int wlan_logging_sock_deinit_svc(void)
{
gwlan_logging.pcur_node = NULL;
gwlan_logging.pkt_stats_pcur_node = NULL;
- gapp_pid = INVALID_PID;
return 0;
}