qcacmn: Allocate lut based on number of DBR entry

CFR component allocate 140 luts but some of platform use 48 of them,
which allocate huge memory at one time and waste memory in some
platform. In low memory case, it may be failed to alloc luts at one
time. So, allocate lut based on number of DBR entry and split memory
allocation.

Change-Id: Id49c3f9a0f81cfa6d639cb72b62bb377911f0e77
CRs-Fixed: 2679470
Dieser Commit ist enthalten in:
Wu Gao
2020-05-13 21:06:56 +08:00
committet von nshrivas
Ursprung c0b1d0ebf0
Commit 53808c0dc4
3 geänderte Dateien mit 92 neuen und 19 gelöschten Zeilen

Datei anzeigen

@@ -442,6 +442,7 @@ struct cfr_rcc_param {
* dir_ptr: Parent directory of relayfs file
* lut: lookup table used to store asynchronous DBR and TX/RX events for
* correlation
* lut_num: Number of lut
* dbr_buf_size: Size of DBR completion buffer
* dbr_num_bufs: No. of DBR completions
* tx_evt_cnt: No. of TX completion events till CFR stop was issued
@@ -483,7 +484,8 @@ struct pdev_cfr {
uint32_t subbuf_size;
qdf_streamfs_chan_t chan_ptr;
qdf_dentry_t dir_ptr;
struct look_up_table lut[MAX_LUT_ENTRIES];
struct look_up_table **lut;
uint32_t lut_num;
uint32_t dbr_buf_size;
uint32_t dbr_num_bufs;
uint64_t tx_evt_cnt;