diff options
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 17 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.h | 2 |
2 files changed, 15 insertions, 4 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 985fea0596d0..53f38e063c4e 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -26855,7 +26855,9 @@ VOS_STATUS WDA_TxPacket(void *wma_context, void *tx_frame, u_int16_t frmLen, adf_nbuf_unmap_single(pdev->osdev, skb, ADF_OS_DMA_TO_DEVICE); /* Call Download Cb so that umac can free the buffer */ if (tx_frm_download_comp_cb) - tx_frm_download_comp_cb(wma_handle->mac_context, tx_frame, 1); + tx_frm_download_comp_cb(wma_handle->mac_context, + tx_frame, + WMA_TX_FRAME_BUFFER_FREE); wma_handle->umac_data_ota_ack_cb = NULL; wma_handle->last_umac_data_nbuf = NULL; return VOS_STATUS_E_FAILURE; @@ -26863,7 +26865,9 @@ VOS_STATUS WDA_TxPacket(void *wma_context, void *tx_frame, u_int16_t frmLen, /* Call Download Callback if passed */ if (tx_frm_download_comp_cb) - tx_frm_download_comp_cb(wma_handle->mac_context, tx_frame, 0); + tx_frm_download_comp_cb(wma_handle->mac_context, + tx_frame, + WMA_TX_FRAME_BUFFER_NO_FREE); return VOS_STATUS_SUCCESS; } @@ -26953,9 +26957,13 @@ VOS_STATUS WDA_TxPacket(void *wma_context, void *tx_frame, u_int16_t frmLen, /* * Failed to send Tx Mgmt Frame - * Return Failure so that umac can freeup the buf */ if (status) { + /* Call Download Cb so that umac can free the buffer */ + if (tx_frm_download_comp_cb) + tx_frm_download_comp_cb(wma_handle->mac_context, + tx_frame, + WMA_TX_FRAME_BUFFER_FREE); WMA_LOGP("%s: Failed to send Mgmt Frame", __func__); goto error; } @@ -26995,7 +27003,8 @@ VOS_STATUS WDA_TxPacket(void *wma_context, void *tx_frame, u_int16_t frmLen, * callback once the frame is successfully * given to txrx module */ - tx_frm_download_comp_cb(wma_handle->mac_context, tx_frame, 0); + tx_frm_download_comp_cb(wma_handle->mac_context, tx_frame, + WMA_TX_FRAME_BUFFER_NO_FREE); } return VOS_STATUS_SUCCESS; diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h index 0d5ac43c302c..74b0c025c259 100644 --- a/CORE/SERVICES/WMA/wma.h +++ b/CORE/SERVICES/WMA/wma.h @@ -1141,6 +1141,8 @@ u_int16_t get_regdmn_5g(u_int32_t reg_dmn); * TODO: Need to Revist the Timing */ #define WMA_TX_FRAME_COMPLETE_TIMEOUT 1000 +#define WMA_TX_FRAME_BUFFER_NO_FREE 0 +#define WMA_TX_FRAME_BUFFER_FREE 1 struct wma_tx_ack_work_ctx { tp_wma_handle wma_handle; |
