From 0e19c8a074e2fa520ca953e455fb6f0abc6e1fa8 Mon Sep 17 00:00:00 2001 From: gbian Date: Tue, 29 Dec 2015 12:53:46 +0800 Subject: qcacld-2.0: indicate wow wake up frame for HL project Currently FW does not indicate wow wake up frame to host for HL project. After the change, FW will indicate wake up frame with HTT_T2H_MSG_TYPE_RX_OFFLOAD_DELIVER_IND htt msg and host will handle this message to indicate to OS protocol stack. Change-Id: I5f4446de7ec3c4ff1c1de6fd6105429e0898291c CRs-Fixed: 956416 --- CORE/CLD_TXRX/HTT/htt_rx.c | 22 ++++++++++++++++++++++ CORE/CLD_TXRX/HTT/htt_t2h.c | 7 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CORE/CLD_TXRX/HTT/htt_rx.c b/CORE/CLD_TXRX/HTT/htt_rx.c index 0d80a498a370..d4d0b60f31ab 100644 --- a/CORE/CLD_TXRX/HTT/htt_rx.c +++ b/CORE/CLD_TXRX/HTT/htt_rx.c @@ -1388,6 +1388,28 @@ htt_rx_offload_msdu_pop_hl( adf_nbuf_t *head_buf, adf_nbuf_t *tail_buf) { + adf_nbuf_t buf; + u_int32_t *msdu_hdr, msdu_len; + + *head_buf = *tail_buf = buf = offload_deliver_msg; + msdu_hdr = (u_int32_t *)adf_nbuf_data(buf); + + /* First dword */ + + /* Second dword */ + msdu_hdr++; + msdu_len = HTT_RX_OFFLOAD_DELIVER_IND_MSDU_LEN_GET(*msdu_hdr); + *peer_id = HTT_RX_OFFLOAD_DELIVER_IND_MSDU_PEER_ID_GET(*msdu_hdr); + + /* Third dword */ + msdu_hdr++; + *vdev_id = HTT_RX_OFFLOAD_DELIVER_IND_MSDU_VDEV_ID_GET(*msdu_hdr); + *tid = HTT_RX_OFFLOAD_DELIVER_IND_MSDU_TID_GET(*msdu_hdr); + *fw_desc = HTT_RX_OFFLOAD_DELIVER_IND_MSDU_DESC_GET(*msdu_hdr); + + adf_nbuf_pull_head(buf, HTT_RX_OFFLOAD_DELIVER_IND_MSDU_HDR_BYTES \ + + HTT_RX_OFFLOAD_DELIVER_IND_HDR_BYTES); + adf_nbuf_set_pktlen(buf, msdu_len); return 0; } diff --git a/CORE/CLD_TXRX/HTT/htt_t2h.c b/CORE/CLD_TXRX/HTT/htt_t2h.c index d768ac01f8f4..0271c4d7a0be 100644 --- a/CORE/CLD_TXRX/HTT/htt_t2h.c +++ b/CORE/CLD_TXRX/HTT/htt_t2h.c @@ -198,7 +198,12 @@ htt_t2h_lp_msg_handler(void *context, adf_nbuf_t htt_t2h_msg ) pdev->txrx_pdev, htt_t2h_msg, msdu_cnt); - break; + if (pdev->cfg.is_high_latency) { + /* return here for HL to avoid double free on htt_t2h_msg */ + return; + } else { + break; + } } case HTT_T2H_MSG_TYPE_RX_FRAG_IND: { -- cgit v1.2.3