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
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 @@
 {
     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) {
+        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;
     }
-    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***********");
 }
 
 /* Firmware sends RSSI value without noise floor.