diff options
Diffstat (limited to 'cmds/dumpstate')
-rw-r--r-- | cmds/dumpstate/Android.mk | 8 | ||||
-rw-r--r-- | cmds/dumpstate/dumpstate.c | 4 | ||||
-rw-r--r-- | cmds/dumpstate/dumpstate.h | 9 |
3 files changed, 19 insertions, 2 deletions
diff --git a/cmds/dumpstate/Android.mk b/cmds/dumpstate/Android.mk index f8b37a8..27891ec 100644 --- a/cmds/dumpstate/Android.mk +++ b/cmds/dumpstate/Android.mk @@ -3,9 +3,13 @@ ifneq ($(TARGET_SIMULATOR),true) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) -LOCAL_SRC_FILES:= dumpstate.c utils.c +ifdef BOARD_WLAN_DEVICE +LOCAL_CFLAGS := -DFWDUMP_$(BOARD_WLAN_DEVICE) +endif + +LOCAL_SRC_FILES := dumpstate.c utils.c -LOCAL_MODULE:= dumpstate +LOCAL_MODULE := dumpstate LOCAL_SHARED_LIBRARIES := libcutils diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index 5a485e4..236c0fe 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -78,6 +78,10 @@ static void dumpstate(int full) { PRINT(""); PRINT("Routes:"); DUMP("/proc/net/route"); +#ifdef FWDUMP_bcm4329 + PRINT("Dump wlan FW log"); + EXEC_XBIN6("su", "root","dhdutil","-i","eth0","upload","/data/local/tmp/wlan_crash.dump"); +#endif PRINT("------ SYSTEM PROPERTIES ------"); print_properties(); PRINT("------ KERNEL LOG ------"); diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h index b99b6d7..ed1f005 100644 --- a/cmds/dumpstate/dumpstate.h +++ b/cmds/dumpstate/dumpstate.h @@ -124,6 +124,15 @@ run_command(&c, TIMEOUT); \ } +#define EXEC_XBIN6(cmd, a1, a2, a3, a4, a5, a6) \ +{ \ + static struct Command c = { \ + "/system/xbin/" cmd, \ + { cmd, a1, a2, a3, a4, a5, a6, 0 } \ + }; \ + run_command(&c, TIMEOUT); \ +} + #define PROPERTY(name) print_property(name) struct Command { |