From a8861207701d855336e318c1ec5491f3c366fe6c Mon Sep 17 00:00:00 2001 From: Sravan Kumar Kairam Date: Fri, 3 Aug 2018 14:47:34 +0530 Subject: [PATCH] qcacld-3.0: Do rx inorder replenish for fragmented packets Currently for fragment packets received legacy rx buffer replenish is done which does not take in to account number of msdu count but depends on fill count. Variable fill count is not protected and the value becomes incorrect if AP sends both the fragmented and normal packets at the same time. This leads to rx buffer replenish failure and eventually data stall. To fix this do rx inorder replenish for fragmented packets similar to normal ones if rx full reorder offload is enabled. Change-Id: I144c10be7b45268300b040e07ecb909a1ca113cc CRs-Fixed: 2289797 --- core/dp/txrx/ol_rx_defrag.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/core/dp/txrx/ol_rx_defrag.c b/core/dp/txrx/ol_rx_defrag.c index e93e9d53c107..2e0f81d44bd9 100644 --- a/core/dp/txrx/ol_rx_defrag.c +++ b/core/dp/txrx/ol_rx_defrag.c @@ -326,7 +326,16 @@ ol_rx_frag_indication_handler(ol_txrx_pdev_handle pdev, * separate from normal frames */ ol_rx_reorder_flush_frag(htt_pdev, peer, tid, seq_num_start); + } else { + uint32_t *msg_word; + uint8_t *rx_ind_data; + + rx_ind_data = qdf_nbuf_data(rx_frag_ind_msg); + msg_word = (uint32_t *)rx_ind_data; + msdu_count = HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_GET(*(msg_word + + 1)); } + pktlog_bit = (htt_rx_amsdu_rx_in_order_get_pktlog(rx_frag_ind_msg) == 0x01); ret = htt_rx_frag_pop(htt_pdev, rx_frag_ind_msg, &head_msdu, @@ -362,7 +371,11 @@ ol_rx_frag_indication_handler(ol_txrx_pdev_handle pdev, htt_rx_desc_frame_free(htt_pdev, head_msdu); } /* request HTT to provide new rx MSDU buffers for the target to fill. */ - htt_rx_msdu_buff_replenish(htt_pdev); + if (ol_cfg_is_full_reorder_offload(pdev->ctrl_pdev) && + !pdev->cfg.is_high_latency) + htt_rx_msdu_buff_in_order_replenish(htt_pdev, msdu_count); + else + htt_rx_msdu_buff_replenish(htt_pdev); } /*