mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-09 20:31:13 -05:00
qcacld-3.0: Map as QDF_DMA_BIDIRECTIONAL for PMF tx frame
Some target which support sending mgmt frame based on htt would DMA write this PMF tx frame buffer, it may cause smmu check permission fault, set a flag to do special DMA map. Change-Id: I3686be211374d2c316726fa3248dedce87c3faed CRs-Fixed: 2332329
This commit is contained in:
parent
8096d84309
commit
a47dca3872
2 changed files with 11 additions and 1 deletions
|
|
@ -1732,6 +1732,7 @@ htt_tx_desc_init(htt_pdev_handle pdev,
|
|||
bool desc_ext_required = (type != EXT_HEADER_NOT_PRESENT);
|
||||
int channel_freq;
|
||||
void *qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
|
||||
qdf_dma_dir_t dir;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (qdf_unlikely(!qdf_ctx)) {
|
||||
|
|
@ -1861,7 +1862,9 @@ htt_tx_desc_init(htt_pdev_handle pdev,
|
|||
0);
|
||||
|
||||
if (QDF_NBUF_CB_PADDR(msdu) == 0) {
|
||||
status = qdf_nbuf_map_single(qdf_ctx, msdu, QDF_DMA_TO_DEVICE);
|
||||
dir = QDF_NBUF_CB_TX_DMA_BI_MAP(msdu) ?
|
||||
QDF_DMA_BIDIRECTIONAL : QDF_DMA_TO_DEVICE;
|
||||
status = qdf_nbuf_map_single(qdf_ctx, msdu, dir);
|
||||
if (qdf_unlikely(status != QDF_STATUS_SUCCESS)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: nbuf map failed", __func__);
|
||||
|
|
|
|||
|
|
@ -2549,6 +2549,13 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
|
|||
frmLen = newFrmLen;
|
||||
pFc = (tpSirMacFrameCtl) (qdf_nbuf_data(tx_frame));
|
||||
}
|
||||
/*
|
||||
* Some target which support sending mgmt frame based on htt
|
||||
* would DMA write this PMF tx frame buffer, it may cause smmu
|
||||
* check permission fault, set a flag to do bi-direction DMA
|
||||
* map, normal tx unmap is enough for this case.
|
||||
*/
|
||||
QDF_NBUF_CB_TX_DMA_BI_MAP((qdf_nbuf_t)tx_frame) = 1;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_11W */
|
||||
mHdr = (tpSirMacMgmtHdr)qdf_nbuf_data(tx_frame);
|
||||
|
|
|
|||
Loading…
Reference in a new issue