Revert "bcmdhd_88: add DHD_ERROR for nv_logger"
Bibhay Ranjan [Wed, 4 Jan 2017 06:58:50 +0000 (11:58 +0530)]
This reverts commit 83275c2716e3f838a278b5ecfdb46fbe1b552d73.

Bug 200231321

Change-Id: I3bbf9ea2aaff4b421326d4b25c8e4c7ad741a493
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/1279947
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

drivers/net/wireless/bcmdhd_88/dhd_dbg.h
drivers/net/wireless/bcmdhd_88/nv_logger.c
drivers/net/wireless/bcmdhd_88/nv_logger.h

index c429b6c..0ee773f 100644 (file)
 #ifndef _dhd_dbg_
 #define _dhd_dbg_
 
-#include <nv_logger.h>
-
 #define USE_NET_RATELIMIT              net_ratelimit()
 
 #if defined(DHD_DEBUG)
 
 #define DHD_ERROR(args)                do {if ((dhd_msg_level & DHD_ERROR_VAL) && USE_NET_RATELIMIT) \
-                                                               printf args; nv_sprintf args;} while (0)
+                                                               printf args;} while (0)
 #define DHD_TRACE(args)                do {if (dhd_msg_level & DHD_TRACE_VAL) printf args;} while (0)
 #define DHD_INFO(args)         do {if (dhd_msg_level & DHD_INFO_VAL) printf args;} while (0)
 #define DHD_DATA(args)         do {if (dhd_msg_level & DHD_DATA_VAL) printf args;} while (0)
index 9360a24..2b765d1 100644 (file)
@@ -21,7 +21,6 @@
 atomic_t list1_val = ATOMIC_INIT(1);
 atomic_t list2_val = ATOMIC_INIT(1);
 char logbuf[MAX_LOGLIMIT + 128];
-char nv_error_buffer[MAX_ERROR_SIZE];
 bool enable_file_logging;
 struct list_head list1;
 struct list_head list2;
@@ -99,7 +98,7 @@ int write_log(int event, const char *buf, const char *info)
        struct tm date_time;
 
        mutex_lock(&suspend_lock);
-       if (!enable_file_logging) {
+       if (!enable_file_logging || logger_wqueue == NULL) {
                mutex_unlock(&suspend_lock);
                return -1;
        }
index 056812d..5aa7e2f 100644 (file)
 
 #define MAX_LOGLIMIT 1024
 #define TIMESTAMPSIZE 40
-#define MAX_ERROR_SIZE 512
-#define nv_sprintf(fmt, args...) \
-do { \
-       snprintf(nv_error_buffer, MAX_ERROR_SIZE-1, fmt , ## args); \
-       write_log(0, nv_error_buffer, NULL ); \
-} while(0)
-
 extern struct workqueue_struct  *logger_wqueue;
 extern bool enable_file_logging;
 int write_log(int, const char *, const char *);
@@ -56,5 +49,4 @@ static int dhd_log_netlink_init();
 static void dhd_log_netlink_deinit();
 s32 dhd_log_netlink_send_msg(int pid, int type, int seq,
                        void *data, size_t size);
-extern char nv_error_buffer[MAX_ERROR_SIZE];
 #endif