Ver código fonte

qcacmn: Fix regdb compilation error

Compiler does not allow very large local variable/array.
Error: 'the frame size of 1512 bytes is larger than 1190 bytes'

Change-Id: Ic74543c25fcb46596d49e9c0bb60f1f3c6f3f16c
CRs-Fixed: 2047212
Baila, Shashikala Prabhu 7 anos atrás
pai
commit
4140c76598
1 arquivos alterados com 8 adições e 1 exclusões
  1. 8 1
      umac/regulatory/core/src/reg_services.c

+ 8 - 1
umac/regulatory/core/src/reg_services.c

@@ -1512,7 +1512,7 @@ static void call_chan_change_cbks(struct wlan_objmgr_psoc *psoc,
 	struct chan_change_cbk_entry *cbk_list;
 	struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;
 	struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
-	struct regulatory_channel cur_chan_list[NUM_CHANNELS];
+	struct regulatory_channel *cur_chan_list;
 	uint32_t ctr;
 	reg_chan_change_callback callback;
 
@@ -1528,6 +1528,12 @@ static void call_chan_change_cbks(struct wlan_objmgr_psoc *psoc,
 		return;
 	}
 
+	cur_chan_list = qdf_mem_malloc(NUM_CHANNELS * sizeof(*cur_chan_list));
+	if (NULL == cur_chan_list) {
+		reg_alert("Mem alloc failed for current channel list");
+		return;
+	}
+
 	qdf_mem_copy(cur_chan_list,
 		     pdev_priv_obj->cur_chan_list,
 		     NUM_CHANNELS *
@@ -1545,6 +1551,7 @@ static void call_chan_change_cbks(struct wlan_objmgr_psoc *psoc,
 			callback(psoc, pdev, cur_chan_list,
 				 cbk_list[ctr].arg);
 	}
+	qdf_mem_free(cur_chan_list);
 }
 
 static struct reg_sched_payload