diff options
author | Subhani Shaik <subhanis@codeaurora.org> | 2016-07-25 12:37:41 +0530 |
---|---|---|
committer | Ecco Park <eccopark@google.com> | 2016-07-26 10:32:52 -0700 |
commit | 8b6e81c711f65a8d44e5405a348c0027e2696a57 (patch) | |
tree | c6d76b9a59338f5fa9cdbf661d327b41c2996608 /qcwcn | |
parent | 0919dfde526ab1f2996334835cbd176906e89d0e (diff) | |
download | wlan-8b6e81c711f65a8d44e5405a348c0027e2696a57.tar.gz |
WiFi-HAL: Donot dump empty vendor data buffer
While creating nl messge with the help of
WifiVendorCommand.create(), there is a log to dump the data
being sent. This log is getting printed for most of the wifihal
messages.
But actual data gets filled in the nl message later. So don't
dump if the buffer is empty.
BUG: 28825972
Change-Id: Ifac90b092e63fc5456f13e9f94ed0143b008b5ec
Diffstat (limited to 'qcwcn')
-rw-r--r-- | qcwcn/wifi_hal/common.cpp | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/qcwcn/wifi_hal/common.cpp b/qcwcn/wifi_hal/common.cpp index 68b9130..324363c 100644 --- a/qcwcn/wifi_hal/common.cpp +++ b/qcwcn/wifi_hal/common.cpp @@ -243,24 +243,29 @@ void hexdump(void *buf, u16 len) { int i=0; char *bytes = (char *)buf; - ALOGV("******HexDump len:%d*********", len); - for (i = 0; ((i + 7) < len); i+=8) { - ALOGV("%02x %02x %02x %02x %02x %02x %02x %02x", - bytes[i], bytes[i+1], - bytes[i+2], bytes[i+3], - bytes[i+4], bytes[i+5], - bytes[i+6], bytes[i+7]); - } - if ((len - i) >= 4) { - ALOGV("%02x %02x %02x %02x", - bytes[i], bytes[i+1], - bytes[i+2], bytes[i+3]); - i+=4; - } - for (;i < len;i++) { - ALOGV("%02x", bytes[i]); + + if (len) { + ALOGV("******HexDump len:%d*********", len); + for (i = 0; ((i + 7) < len); i+=8) { + ALOGV("%02x %02x %02x %02x %02x %02x %02x %02x", + bytes[i], bytes[i+1], + bytes[i+2], bytes[i+3], + bytes[i+4], bytes[i+5], + bytes[i+6], bytes[i+7]); + } + if ((len - i) >= 4) { + ALOGV("%02x %02x %02x %02x", + bytes[i], bytes[i+1], + bytes[i+2], bytes[i+3]); + i+=4; + } + for (;i < len;i++) { + ALOGV("%02x", bytes[i]); + } + ALOGV("******HexDump End***********"); + } else { + return; } - ALOGV("******HexDump End***********"); } /* Firmware sends RSSI value without noise floor. |