wlan: vos mem alloc debug API to return NULL in interrupt context

VOSS memory allocation API does not return memory
in interrupt context, modify the debug version of
the API to behave in same way.

CRs-Fixed: 538052
Change-Id: Ibae2cfac5f12190c747bf99af00aebc9b7bed830
diff --git a/CORE/VOSS/src/vos_memory.c b/CORE/VOSS/src/vos_memory.c
index 79506fe..82e7157 100644
--- a/CORE/VOSS/src/vos_memory.c
+++ b/CORE/VOSS/src/vos_memory.c
@@ -173,12 +173,12 @@
                "%s: called with arg > 1024K; passed in %d !!!", __func__,size); 
        return NULL;
    }
+
    if (in_interrupt())
    {
-       VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, 
-               "%s is being called in interrupt context, using GPF_ATOMIC.", __func__);
-       return kmalloc(size, GFP_ATOMIC);
-      
+       VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s cannot be "
+                 "called from interrupt context!!!", __func__);
+       return NULL;
    }
 
    new_size = size + sizeof(struct s_vos_mem_struct) + 8; 
@@ -212,6 +212,14 @@
 
 v_VOID_t vos_mem_free( v_VOID_t *ptr )
 {
+
+    if (in_interrupt())
+    {
+        VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s cannot be "
+                  "called from interrupt context!!!", __func__);
+        return;
+    }
+
     if (ptr != NULL)
     {
         VOS_STATUS vosStatus;