From 053d4556d88bb158fa04034e2bb5af4a6ea569c6 Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Wed, 20 Jul 2016 20:00:34 +0530 Subject: [PATCH] qcacld-3.0: Add support to mark first packet after wow wakeup Propagation from qcacld-2.0 to qcacld-3.0. Add support to mark the highest bit of the skb->mark for the first packet after wow wakeup event from firmware Change-Id: I877dd7af9a58ebc02d73461cc2a29e86a3945dec CRs-Fixed: 989984 --- core/dp/htt/htt_internal.h | 1 + core/dp/htt/htt_rx.c | 7 +++++++ target/inc/wal_rx_desc.h | 3 +++ 3 files changed, 11 insertions(+) diff --git a/core/dp/htt/htt_internal.h b/core/dp/htt/htt_internal.h index 98b129c4efb6..e5d009dc587b 100644 --- a/core/dp/htt/htt_internal.h +++ b/core/dp/htt/htt_internal.h @@ -58,6 +58,7 @@ struct htt_host_fw_desc_base { } u; }; + /* * This struct defines the basic descriptor information used by host, * which is written either by the 11ac HW MAC into the host Rx data diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c index 3462c827dec9..1c36f39dad32 100644 --- a/core/dp/htt/htt_rx.c +++ b/core/dp/htt/htt_rx.c @@ -2041,6 +2041,13 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev, HTT_RX_IN_ORD_PADDR_IND_FW_DESC_GET(*(msg_word + NEXT_FIELD_OFFSET_IN32)); #undef NEXT_FIELD_OFFSET_IN32 + if (HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_GET(*(msg_word + 1)) & + FW_MSDU_INFO_FIRST_WAKEUP_M) { + qdf_print("%s: first packet after WOW wakeup\n", + __func__); + qdf_nbuf_mark_wakeup_frame(msdu); + } + msdu_count--; if (qdf_unlikely((*((u_int8_t *) &rx_desc->fw_desc.u.val)) & diff --git a/target/inc/wal_rx_desc.h b/target/inc/wal_rx_desc.h index 408075567354..cb4be58b9d99 100644 --- a/target/inc/wal_rx_desc.h +++ b/target/inc/wal_rx_desc.h @@ -83,6 +83,9 @@ struct hw_rx_desc_base { }; #endif +#define FW_MSDU_INFO_FIRST_WAKEUP_M 0x40 +#define FW_MSDU_INFO_FIRST_WAKEUP_S 6 + /* * This struct defines the basic MSDU rx descriptor created by FW. */