mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
qcacld-3.0: Unmap nbuf of pending mgmt frames
As part of wlan_mgmt_txrx_pdev_close only nbuf is freed in case of cleanup path due to SSR or drive unload and dma unmap is not done. In this change register a callback to mgmt_txrx component tx ops which does dma unmap of nbuf as part of pdev close. Change-Id: Ia0fa6684f66a3b732e5c599f2df4ea7f33ebc4f8 CRs-Fixed: 2308372
This commit is contained in:
parent
100d742755
commit
0fbaefea1b
3 changed files with 34 additions and 0 deletions
|
|
@ -1983,6 +1983,18 @@ QDF_STATUS wma_mgmt_unified_cmd_send(struct wlan_objmgr_vdev *vdev,
|
|||
qdf_nbuf_t buf, uint32_t desc_id,
|
||||
void *mgmt_tx_params);
|
||||
|
||||
/**
|
||||
* wma_mgmt_nbuf_unmap_cb() - dma unmap for pending mgmt pkts
|
||||
* @pdev: objmgr pdev
|
||||
* @buf: buffer
|
||||
*
|
||||
* This function does the dma unmap of the pending mgmt packet cleanup
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void wma_mgmt_nbuf_unmap_cb(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_nbuf_t buf);
|
||||
|
||||
/**
|
||||
* wma_chan_info_event_handler() - chan info event handler
|
||||
* @handle: wma handle
|
||||
|
|
|
|||
|
|
@ -2231,6 +2231,9 @@ wma_register_tx_ops_handler(struct wlan_lmac_if_tx_ops *tx_ops)
|
|||
/* mgmt_txrx component's tx ops */
|
||||
tx_ops->mgmt_txrx_tx_ops.mgmt_tx_send = wma_mgmt_unified_cmd_send;
|
||||
|
||||
/* mgmt txrx component nbuf op for nbuf dma unmap */
|
||||
tx_ops->mgmt_txrx_tx_ops.tx_drain_nbuf_op = wma_mgmt_nbuf_unmap_cb;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4368,3 +4368,22 @@ QDF_STATUS wma_mgmt_unified_cmd_send(struct wlan_objmgr_vdev *vdev,
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void wma_mgmt_nbuf_unmap_cb(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_nbuf_t buf)
|
||||
{
|
||||
tp_wma_handle wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: wma handle is NULL", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!buf)
|
||||
return;
|
||||
|
||||
if (wmi_service_enabled(wma_handle->wmi_handle,
|
||||
wmi_service_mgmt_tx_wmi)) {
|
||||
qdf_nbuf_unmap_single(wma_handle->qdf_dev, buf,
|
||||
QDF_DMA_TO_DEVICE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue