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)
This commit is contained in:
gbian 2016-09-30 15:56:56 +08:00 • committed by qcabuildsw
commit 2259cb33c3
3 changed files with 56 additions and 18 deletions

View file

@ -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

View file

@ -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:
{

View file

@ -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--;