qcacmn: Use atomic allocation for all scheduler context scan allocations

In low memory environments using GFP_KERNEL flag may cause
scheduler thread to sleep. Scheduler thread callback handlers
are expected to be atomic in nature to ensure timely execution
of different commands. Move all allocations done by scan module
in scheduler thread context to atomic allocation.

Change-Id: Iee3eafbc00a3afea0687ba67b3041ec0816094cc
CRs-Fixed: 2232553
diff --git a/umac/scan/dispatcher/src/wlan_scan_utils_api.c b/umac/scan/dispatcher/src/wlan_scan_utils_api.c
index 7983482..4e129f1 100644
--- a/umac/scan/dispatcher/src/wlan_scan_utils_api.c
+++ b/umac/scan/dispatcher/src/wlan_scan_utils_api.c
@@ -831,21 +831,21 @@
 	qdf_list_t *scan_list;
 	struct scan_cache_node *scan_node;
 
-	scan_list = qdf_mem_malloc(sizeof(*scan_list));
+	scan_list = qdf_mem_malloc_atomic(sizeof(*scan_list));
 	if (!scan_list) {
 		scm_err("failed to allocate scan_list");
 		return NULL;
 	}
 	qdf_list_create(scan_list, MAX_SCAN_CACHE_SIZE);
 
-	scan_entry = qdf_mem_malloc(sizeof(*scan_entry));
+	scan_entry = qdf_mem_malloc_atomic(sizeof(*scan_entry));
 	if (!scan_entry) {
 		scm_err("failed to allocate memory for scan_entry");
 		qdf_mem_free(scan_list);
 		return NULL;
 	}
 	scan_entry->raw_frame.ptr =
-			qdf_mem_malloc(frame_len);
+			qdf_mem_malloc_atomic(frame_len);
 	if (!scan_entry->raw_frame.ptr) {
 		scm_err("failed to allocate memory for frame");
 		qdf_mem_free(scan_entry);
@@ -960,7 +960,7 @@
 	if (qbss_load)
 		scan_entry->qbss_chan_load = qbss_load->qbss_chan_load;
 
-	scan_node = qdf_mem_malloc(sizeof(*scan_node));
+	scan_node = qdf_mem_malloc_atomic(sizeof(*scan_node));
 	if (!scan_node) {
 		qdf_mem_free(scan_entry->raw_frame.ptr);
 		qdf_mem_free(scan_entry);