diff options
| author | wadesong <wadesong@codeaurora.org> | 2017-03-15 08:16:08 +0800 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-04-06 14:11:09 -0700 |
| commit | 677c67d21d6b92133e6af4648fc83b7c2e549ae9 (patch) | |
| tree | bd2a3f1fabfefdf5481ceb6b0d9079cbe5169344 | |
| parent | d40b5212765b0c4856119b90935af2e1cabe77d5 (diff) | |
qcacld-3.0: Refine WMI mgmt frame tx sequence
When host driver transmits probe response frame through WMI, tx
happens before tx completion handler is assigned to WMI descriptor,
which may result in SKB buffer leak if tx completion happens before
WMI descriptor setup. Make the WMI descriptor setup happens before
WMI tx really takes place
Change-Id: I53ede83a75f025d5ccc2182050b3053a7b777430
CRs-Fixed: 2023684
| -rw-r--r-- | core/wma/src/wma_data.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index 8ce8f4616eaa..ae9662ee9962 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -2855,16 +2855,14 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, } else { mgmt_param.desc_id = wmi_desc->desc_id; wmi_desc->vdev_id = vdev_id; + wmi_desc->nbuf = tx_frame; + wmi_desc->tx_cmpl_cb = tx_frm_download_comp_cb; + wmi_desc->ota_post_proc_cb = tx_frm_ota_comp_cb; status = wmi_mgmt_unified_cmd_send( wma_handle->wmi_handle, &mgmt_param); - if (status) { + if (status) wmi_desc_put(wma_handle, wmi_desc); - } else { - wmi_desc->nbuf = tx_frame; - wmi_desc->tx_cmpl_cb = tx_frm_download_comp_cb; - wmi_desc->ota_post_proc_cb = tx_frm_ota_comp_cb; - } } } else { /* Hand over the Tx Mgmt frame to TxRx */ |
