Quellcode durchsuchen

qcacmn: Add API to update mark parameter in sk_buff structure

Propagation from qcacld-2.0 to qcacmn.

Add API to update skb->mark whenever first packet after WOW wakeup
is received through HTT layer.

Change-Id: I877dd7af9a58ebc02d73461cc2a29e86a3945dec
CRs-Fixed: 989984
Himanshu Agarwal vor 8 Jahren
Ursprung
Commit
feeffba91b
2 geänderte Dateien mit 27 neuen und 0 gelöschten Zeilen
  1. 13 0
      qdf/inc/qdf_nbuf.h
  2. 14 0
      qdf/linux/src/i_qdf_nbuf.h

+ 13 - 0
qdf/inc/qdf_nbuf.h

@@ -2057,4 +2057,17 @@ qdf_nbuf_get_priv_ptr(qdf_nbuf_t buf)
  */
 unsigned int qdf_nbuf_update_radiotap(struct mon_rx_status *rx_status,
 				      qdf_nbuf_t nbuf, uint32_t headroom_sz);
+
+/**
+ * qdf_nbuf_mark_wakeup_frame() - mark wakeup frame.
+ * @buf: Pointer to nbuf
+ *
+ * Return: None
+ */
+static inline void
+qdf_nbuf_mark_wakeup_frame(qdf_nbuf_t buf)
+{
+	 __qdf_nbuf_mark_wakeup_frame(buf);
+}
+
 #endif /* _QDF_NBUF_H */

+ 14 - 0
qdf/linux/src/i_qdf_nbuf.h

@@ -66,6 +66,9 @@ typedef struct sk_buff *__qdf_nbuf_t;
 #define QDF_NBUF_CB_PACKET_TYPE_WAPI   3
 #define QDF_NBUF_CB_PACKET_TYPE_DHCP   4
 
+/* mark the first packet after wow wakeup */
+#define QDF_MARK_FIRST_WAKEUP_PACKET   0x80000000
+
 /*
  * Make sure that qdf_dma_addr_t in the cb block is always 64 bit aligned
  */
@@ -1655,5 +1658,16 @@ static inline void __qdf_invalidate_range(void *start, void *end)
 }
 #endif
 
+/**
+ * __qdf_nbuf_mark_wakeup_frame() - mark wakeup frame.
+ * @buf: Pointer to nbuf
+ *
+ * Return: None
+ */
+static inline void
+__qdf_nbuf_mark_wakeup_frame(__qdf_nbuf_t buf)
+{
+	buf->mark |= QDF_MARK_FIRST_WAKEUP_PACKET;
+}
 
 #endif /*_I_QDF_NET_BUF_H */