From 2389cbe69c4f8053403c4494cca25d7573cd7d13 Mon Sep 17 00:00:00 2001 From: Paul Zhang Date: Mon, 30 Oct 2017 15:45:33 +0800 Subject: [PATCH] qcacld-3.0: Take care DEL the peer ref conunt Take care DEL the peer ref conunt in function ol_txrx_mgmt_send_frame. Change-Id: Icd6176753cfb9a2a7bd9303be2d55e6ea7feb5be CRs-Fixed: 2129920 --- core/dp/txrx/ol_tx.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/core/dp/txrx/ol_tx.c b/core/dp/txrx/ol_tx.c index 481110b8fee6..0e2939baf605 100644 --- a/core/dp/txrx/ol_tx.c +++ b/core/dp/txrx/ol_tx.c @@ -1522,6 +1522,7 @@ int ol_txrx_mgmt_send_frame( { struct ol_txrx_pdev_t *pdev = vdev->pdev; struct ol_tx_frms_queue_t *txq; + int status = 1; /* * 1. Look up the peer and queue the frame in the peer's mgmt queue. @@ -1535,11 +1536,7 @@ int ol_txrx_mgmt_send_frame( qdf_atomic_inc(&pdev->tx_queue.rsrc_cnt); ol_tx_desc_frame_free_nonstd(vdev->pdev, tx_desc, 1 /* error */); - if (tx_msdu_info->peer) { - /* remove the peer reference added above */ - OL_TXRX_PEER_UNREF_DELETE(tx_msdu_info->peer); - } - return 1; /* can't accept the tx mgmt frame */ + goto out; /* can't accept the tx mgmt frame */ } /* Initialize the HTT tx desc l2 header offset field. * Even though tx encap does not apply to mgmt frames, @@ -1555,18 +1552,20 @@ int ol_txrx_mgmt_send_frame( ol_tx_desc_id(pdev, tx_desc), tx_mgmt_frm, &tx_msdu_info->htt, &tx_msdu_info->tso_info, NULL, 0))) - return 1; + goto out; htt_tx_desc_display(tx_desc->htt_tx_desc); htt_tx_desc_set_chanfreq(tx_desc->htt_tx_desc, chanfreq); ol_tx_enqueue(vdev->pdev, txq, tx_desc, tx_msdu_info); + ol_tx_sched(vdev->pdev); + status = 0; +out: if (tx_msdu_info->peer) { /* remove the peer reference added above */ OL_TXRX_PEER_UNREF_DELETE(tx_msdu_info->peer); } - ol_tx_sched(vdev->pdev); - return 0; + return status; } #else