diff options
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. |