diff options
| author | gbian <gbian@codeaurora.org> | 2016-09-30 15:56:56 +0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-10-28 18:04:00 -0700 |
| commit | 2259cb33c342bbb144a294eb628ea033bacfdda5 (patch) | |
| tree | ca9458c255d7c9c1b5e5c4d5808bba6d914cb5e3 /core | |
| parent | 7f07073647d981edfe04f2f6902bfff31383e948 (diff) | |
qcacld-3.0: indicate wow wake up frame for HL project
qcacld-2.0 to qcacld-3.0 propagation
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
(cherry picked from commit b5cb00e05b1db94a2869cc5becef3d777dbd560e)
Diffstat (limited to 'core')
| -rw-r--r-- | core/dp/htt/htt_rx.c | 34 | ||||
| -rw-r--r-- | core/dp/htt/htt_t2h.c | 10 | ||||
| -rw-r--r-- | core/dp/txrx/ol_rx.c | 30 |
3 files changed, 56 insertions, 18 deletions
diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c index 62820e0e8720..8a9e9fa5092f 100644 --- a/core/dp/htt/htt_rx.c +++ b/core/dp/htt/htt_rx.c @@ -1375,9 +1375,39 @@ htt_rx_offload_msdu_pop_hl(htt_pdev_handle pdev, qdf_nbuf_t *head_buf, qdf_nbuf_t *tail_buf) { - return 0; -} + adf_nbuf_t buf; + u_int32_t *msdu_hdr, msdu_len; + int ret = 0; + *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); + + if (msdu_len <= adf_nbuf_len(buf)) { + adf_nbuf_set_pktlen(buf, msdu_len); + } else { + adf_os_print("%s: drop frame with invalid msdu len %d %d\n", + __FUNCTION__, msdu_len, (int)adf_nbuf_len(buf)); + adf_nbuf_free(offload_deliver_msg); + ret = -1; + } + + return ret; +} #endif int diff --git a/core/dp/htt/htt_t2h.c b/core/dp/htt/htt_t2h.c index c7863a618613..9d044f3e8c0b 100644 --- a/core/dp/htt/htt_t2h.c +++ b/core/dp/htt/htt_t2h.c @@ -213,7 +213,15 @@ void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg, ol_rx_offload_deliver_ind_handler(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: { diff --git a/core/dp/txrx/ol_rx.c b/core/dp/txrx/ol_rx.c index 4d9dc4aac1a9..9268bbe9bb7e 100644 --- a/core/dp/txrx/ol_rx.c +++ b/core/dp/txrx/ol_rx.c @@ -851,21 +851,21 @@ ol_rx_offload_deliver_ind_handler(ol_txrx_pdev_handle pdev, htt_pdev_handle htt_pdev = pdev->htt_pdev; while (msdu_cnt) { - htt_rx_offload_msdu_pop(htt_pdev, msg, &vdev_id, &peer_id, - &tid, &fw_desc, &head_buf, &tail_buf); - - peer = ol_txrx_peer_find_by_id(pdev, peer_id); - if (peer) { - ol_rx_data_process(peer, head_buf); - } else { - buf = head_buf; - while (1) { - qdf_nbuf_t next; - next = qdf_nbuf_next(buf); - htt_rx_desc_frame_free(htt_pdev, buf); - if (buf == tail_buf) - break; - buf = next; + if (!htt_rx_offload_msdu_pop(htt_pdev, msg, &vdev_id, &peer_id, + &tid, &fw_desc, &head_buf, &tail_buf)) { + peer = ol_txrx_peer_find_by_id(pdev, peer_id); + if (peer) { + ol_rx_data_process(peer, head_buf); + } else { + buf = head_buf; + while (1) { + qdf_nbuf_t next; + next = qdf_nbuf_next(buf); + htt_rx_desc_frame_free(htt_pdev, buf); + if (buf == tail_buf) + break; + buf = next; + } } } msdu_cnt--; |
