summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Agarwal <himanaga@qti.qualcomm.com>2016-03-09 22:36:40 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-03-22 18:19:32 +0530
commit9684b3ccf1b7ff3a5247cf36597eb1737c8131d9 (patch)
tree967744c987bac29067f3118f9c5f398ec264937b
parenta75bfd97a2a6362297ec124dda56445fde17fe66 (diff)
qcacld-2.0: Add support to mark first packet after wow wakeup
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
-rw-r--r--CORE/CLD_TXRX/HTT/htt_internal.h3
-rw-r--r--CORE/CLD_TXRX/HTT/htt_rx.c6
-rw-r--r--CORE/SERVICES/COMMON/adf/adf_nbuf.h12
-rw-r--r--CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h6
-rw-r--r--CORE/SERVICES/COMMON/wal_rx_desc.h3
5 files changed, 30 insertions, 0 deletions
diff --git a/CORE/CLD_TXRX/HTT/htt_internal.h b/CORE/CLD_TXRX/HTT/htt_internal.h
index aa16980c369e..826c982116d6 100644
--- a/CORE/CLD_TXRX/HTT/htt_internal.h
+++ b/CORE/CLD_TXRX/HTT/htt_internal.h
@@ -58,6 +58,9 @@ struct htt_host_fw_desc_base {
} u;
};
+/* mark the first packet after wow wakeup */
+#define HTT_MARK_FIRST_WAKEUP_PACKET 0x80000000
+
/*
* 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/CLD_TXRX/HTT/htt_rx.c b/CORE/CLD_TXRX/HTT/htt_rx.c
index d42ad328d4ce..88add181d110 100644
--- a/CORE/CLD_TXRX/HTT/htt_rx.c
+++ b/CORE/CLD_TXRX/HTT/htt_rx.c
@@ -1907,6 +1907,12 @@ htt_rx_amsdu_rx_in_order_pop_ll(
*((u_int8_t *) &rx_desc->fw_desc.u.val) =
HTT_RX_IN_ORD_PADDR_IND_FW_DESC_GET(*(msg_word + 1));
+ if (HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_GET(*(msg_word + 1)) &
+ FW_MSDU_INFO_FIRST_WAKEUP_M) {
+ adf_os_print("%s: first packet after WOW wakeup\n", __func__);
+ adf_nbuf_update_skb_mark(msdu, HTT_MARK_FIRST_WAKEUP_PACKET);
+ }
+
msdu_count--;
if (ghtt_packetdump_cb) {
diff --git a/CORE/SERVICES/COMMON/adf/adf_nbuf.h b/CORE/SERVICES/COMMON/adf/adf_nbuf.h
index 8d30142acf62..c756b265ab8a 100644
--- a/CORE/SERVICES/COMMON/adf/adf_nbuf.h
+++ b/CORE/SERVICES/COMMON/adf/adf_nbuf.h
@@ -1226,5 +1226,17 @@ adf_nbuf_is_eapol_pkt(adf_nbuf_t buf)
int adf_nbuf_update_radiotap(struct mon_rx_status *rx_status, adf_nbuf_t nbuf,
u_int32_t headroom_sz);
+/**
+ * adf_nbuf_update_skb_mark() - update skb->mark.
+ * @skb: Pointer to nbuf
+ * @mask: the mask to set in skb->mark
+ *
+ * Return: None
+ */
+static inline void
+adf_nbuf_update_skb_mark(adf_nbuf_t skb, uint32_t mask)
+{
+ __adf_nbuf_update_skb_mark(skb, mask);
+}
#endif
diff --git a/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h b/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h
index de3203b42610..ce33918f9ba0 100644
--- a/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h
+++ b/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h
@@ -1234,4 +1234,10 @@ __adf_nbuf_peek_data(__adf_nbuf_t buf, void **data, a_uint32_t off,
#define __adf_nbuf_get_tx_htt2_frm(skb) \
NBUF_GET_TX_HTT2_FRM(skb)
+static inline void
+__adf_nbuf_update_skb_mark(__adf_nbuf_t skb, uint32_t mask)
+{
+ skb->mark |= mask;
+}
+
#endif /*_adf_nbuf_PVT_H */
diff --git a/CORE/SERVICES/COMMON/wal_rx_desc.h b/CORE/SERVICES/COMMON/wal_rx_desc.h
index 44ee98e9de4b..82ad0bf92b13 100644
--- a/CORE/SERVICES/COMMON/wal_rx_desc.h
+++ b/CORE/SERVICES/COMMON/wal_rx_desc.h
@@ -68,6 +68,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.
*/