wlan: add check for size of cache aligned skb->data

In receive path we check if the memory DMA'd is more
than the allocated memory. alloc_skb() can allocate
more memory than specified if the specified memory
size is not cache aligned, so check for the size
of cache aligned memory for deciding if the data
DMA's was more that allocated memory.

Change-Id: Iaf5b75b73d1f84d6d64ed0975414218a7bb6f591
CRs-Fixed: 717798
diff --git a/CORE/VOSS/inc/i_vos_packet.h b/CORE/VOSS/inc/i_vos_packet.h
index a6bc39e..e114102 100644
--- a/CORE/VOSS/inc/i_vos_packet.h
+++ b/CORE/VOSS/inc/i_vos_packet.h
@@ -96,6 +96,9 @@
 // dereferenced is really referencing a struct vos_pkt_t
 #define VPKT_MAGIC_NUMBER 0x56504B54  /* VPKT in ASCII */
 
+// while allocating the skb->data is cache aligned, so the memory allocated
+// is more than VPKT_SIZE_BUFFER
+#define VPKT_SIZE_BUFFER_ALIGNED SKB_DATA_ALIGN(VPKT_SIZE_BUFFER)
 /*--------------------------------------------------------------------------
   Type declarations
   ------------------------------------------------------------------------*/
diff --git a/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c b/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c
index dd6a7ce..27953ac 100644
--- a/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c
+++ b/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c
@@ -609,9 +609,10 @@
         ucMPDUHOffset = usMPDUDOffset;
       }
 
-      if(VPKT_SIZE_BUFFER < (usMPDULen+ucMPDUHOffset)){
-        DTI_TRACE( DTI_TRACE_LEVEL_FATAL,
-                   "Invalid Frame size, might memory corrupted");
+      if(VPKT_SIZE_BUFFER_ALIGNED < (usMPDULen+ucMPDUHOffset)){
+        WPAL_TRACE(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_FATAL,
+                   "Invalid Frame size, might memory corrupted(%d+%d/%d)",
+                   usMPDULen, ucMPDUHOffset, VPKT_SIZE_BUFFER_ALIGNED);
 
         /* Size of the packet tranferred by the DMA engine is
          * greater than the the memory allocated for the skb