|
@@ -2779,24 +2779,24 @@ dp_pdev_rx_buffers_attach(struct dp_soc *dp_soc, uint32_t mac_id,
|
|
|
* have been allocated to fit in one page across each
|
|
|
* iteration to index into the nbuf.
|
|
|
*/
|
|
|
- total_pages = (nr_descs * sizeof(*nf_info)) / PAGE_SIZE;
|
|
|
+ total_pages = (nr_descs * sizeof(*nf_info)) / DP_BLOCKMEM_SIZE;
|
|
|
|
|
|
/*
|
|
|
* Add an extra page to store the remainder if any
|
|
|
*/
|
|
|
- if ((nr_descs * sizeof(*nf_info)) % PAGE_SIZE)
|
|
|
+ if ((nr_descs * sizeof(*nf_info)) % DP_BLOCKMEM_SIZE)
|
|
|
total_pages++;
|
|
|
- nf_info = qdf_mem_malloc(PAGE_SIZE);
|
|
|
+ nf_info = qdf_mem_malloc(DP_BLOCKMEM_SIZE);
|
|
|
if (!nf_info) {
|
|
|
dp_err("failed to allocate nbuf array");
|
|
|
DP_STATS_INC(dp_pdev, replenish.rxdma_err, num_req_buffers);
|
|
|
QDF_BUG(0);
|
|
|
return QDF_STATUS_E_NOMEM;
|
|
|
}
|
|
|
- nbuf_ptrs_per_page = PAGE_SIZE / sizeof(*nf_info);
|
|
|
+ nbuf_ptrs_per_page = DP_BLOCKMEM_SIZE / sizeof(*nf_info);
|
|
|
|
|
|
for (page_idx = 0; page_idx < total_pages; page_idx++) {
|
|
|
- qdf_mem_zero(nf_info, PAGE_SIZE);
|
|
|
+ qdf_mem_zero(nf_info, DP_BLOCKMEM_SIZE);
|
|
|
|
|
|
for (nr_nbuf = 0; nr_nbuf < nbuf_ptrs_per_page; nr_nbuf++) {
|
|
|
/*
|