|
@@ -1196,18 +1196,17 @@ void dp_rx_mon_dest_process(struct dp_soc *soc, uint32_t mac_id, uint32_t quota)
|
|
|
*
|
|
|
* Return: QDF_STATUS
|
|
|
*/
|
|
|
+#define MON_BUF_MIN_ALLOC_ENTRIES 128
|
|
|
static QDF_STATUS
|
|
|
dp_rx_pdev_mon_buf_attach(struct dp_pdev *pdev, int mac_id) {
|
|
|
uint8_t pdev_id = pdev->pdev_id;
|
|
|
struct dp_soc *soc = pdev->soc;
|
|
|
- union dp_rx_desc_list_elem_t *desc_list = NULL;
|
|
|
- union dp_rx_desc_list_elem_t *tail = NULL;
|
|
|
struct dp_srng *mon_buf_ring;
|
|
|
uint32_t num_entries;
|
|
|
struct rx_desc_pool *rx_desc_pool;
|
|
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
uint8_t mac_for_pdev = dp_get_mac_id_for_mac(soc, mac_id);
|
|
|
- uint32_t rx_desc_pool_size;
|
|
|
+ uint32_t rx_desc_pool_size, replenish_size;
|
|
|
|
|
|
mon_buf_ring = &pdev->rxdma_mon_buf_ring[mac_for_pdev];
|
|
|
|
|
@@ -1226,9 +1225,10 @@ dp_rx_pdev_mon_buf_attach(struct dp_pdev *pdev, int mac_id) {
|
|
|
|
|
|
rx_desc_pool->owner = HAL_RX_BUF_RBM_SW3_BM;
|
|
|
|
|
|
- status = dp_rx_buffers_replenish(soc, mac_id, mon_buf_ring,
|
|
|
- rx_desc_pool, num_entries,
|
|
|
- &desc_list, &tail);
|
|
|
+ replenish_size = (num_entries < MON_BUF_MIN_ALLOC_ENTRIES) ?
|
|
|
+ num_entries : MON_BUF_MIN_ALLOC_ENTRIES;
|
|
|
+ status = dp_pdev_rx_buffers_attach(soc, mac_id, mon_buf_ring,
|
|
|
+ rx_desc_pool, replenish_size);
|
|
|
|
|
|
return status;
|
|
|
}
|
|
@@ -1498,6 +1498,38 @@ void dp_mon_link_desc_pool_cleanup(struct dp_soc *soc, uint32_t mac_id)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * dp_mon_buf_delayed_replenish() - Helper routine to replenish monitor dest buf
|
|
|
+ * @pdev: DP pdev object
|
|
|
+ *
|
|
|
+ * Return: None
|
|
|
+ */
|
|
|
+void dp_mon_buf_delayed_replenish(struct dp_pdev *pdev)
|
|
|
+{
|
|
|
+ struct dp_soc *soc;
|
|
|
+ uint32_t mac_for_pdev;
|
|
|
+ union dp_rx_desc_list_elem_t *tail = NULL;
|
|
|
+ union dp_rx_desc_list_elem_t *desc_list = NULL;
|
|
|
+ uint32_t num_entries;
|
|
|
+ uint32_t mac_id;
|
|
|
+
|
|
|
+ soc = pdev->soc;
|
|
|
+ num_entries = wlan_cfg_get_dma_mon_buf_ring_size(pdev->wlan_cfg_ctx);
|
|
|
+
|
|
|
+ for (mac_id = 0; mac_id < NUM_RXDMA_RINGS_PER_PDEV; mac_id++) {
|
|
|
+ mac_for_pdev = dp_get_mac_id_for_pdev(mac_id,
|
|
|
+ pdev->pdev_id);
|
|
|
+
|
|
|
+ dp_rx_buffers_replenish(soc, mac_for_pdev,
|
|
|
+ dp_rxdma_get_mon_buf_ring(pdev,
|
|
|
+ mac_for_pdev),
|
|
|
+ dp_rx_get_mon_desc_pool(soc,
|
|
|
+ mac_for_pdev,
|
|
|
+ pdev->pdev_id),
|
|
|
+ num_entries, &desc_list, &tail);
|
|
|
+ }
|
|
|
+}
|
|
|
#else
|
|
|
static
|
|
|
QDF_STATUS dp_mon_link_desc_pool_setup(struct dp_soc *soc, uint32_t mac_id)
|
|
@@ -1521,6 +1553,9 @@ dp_rx_pdev_mon_buf_detach(struct dp_pdev *pdev, int mac_id)
|
|
|
{
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
+
|
|
|
+void dp_mon_buf_delayed_replenish(struct dp_pdev *pdev)
|
|
|
+{}
|
|
|
#endif
|
|
|
|
|
|
/**
|