Selaa lähdekoodia

qcacmn: Add reo destination indication info to skb

Get reo destination indication from REO2SW ring descriptor,
store it to qdf_nbuf_cb of skb.

Change-Id: I5a4c504b2550229a77a435b1f5ddb78c4abe51aa
CRs-Fixed: 2809080
Jinwei Chen 4 vuotta sitten
vanhempi
sitoutus
56f94da675

+ 3 - 0
dp/wifi3.0/dp_rx.c

@@ -2451,6 +2451,9 @@ more_data:
 
 		qdf_nbuf_set_tid_val(rx_desc->nbuf,
 				     HAL_RX_REO_QUEUE_NUMBER_GET(ring_desc));
+		qdf_nbuf_set_rx_reo_dest_ind(
+				rx_desc->nbuf,
+				HAL_RX_REO_MSDU_REO_DST_IND_GET(ring_desc));
 
 		QDF_NBUF_CB_RX_PKT_LEN(rx_desc->nbuf) = msdu_desc_info.msdu_len;
 

+ 4 - 0
hal/wifi3.0/hal_rx.h

@@ -504,6 +504,10 @@ enum hal_rx_ret_buf_manager {
 		RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_OFFSET)) &	\
 		RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_MASK)
 
+#define HAL_RX_REO_MSDU_REO_DST_IND_GET(reo_desc)	\
+	(HAL_RX_MSDU_REO_DST_IND_GET(&		\
+	(((struct reo_destination_ring *)	\
+	   reo_desc)->rx_msdu_desc_info_details)))
 
 #define HAL_RX_MSDU_FLAGS_GET(msdu_info_ptr) \
 	(HAL_RX_FIRST_MSDU_IN_MPDU_FLAG_GET(msdu_info_ptr) | \

+ 24 - 0
qdf/inc/i_qdf_nbuf_api_m.h

@@ -143,4 +143,28 @@ static inline uint8_t qdf_nbuf_is_rx_ipa_smmu_map(qdf_nbuf_t buf)
 {
 	return QDF_NBUF_CB_RX_PACKET_IPA_SMMU_MAP(buf);
 }
+
+/**
+ * qdf_nbuf_set_rx_reo_dest_ind() - set reo destination indication
+ * @buf: Network buffer
+ * @value: reo destination indication value to set
+ *
+ * Return: none
+ */
+static inline void qdf_nbuf_set_rx_reo_dest_ind(qdf_nbuf_t buf,
+						uint8_t value)
+{
+	QDF_NBUF_CB_RX_PACKET_REO_DEST_IND(buf) = value;
+}
+
+/**
+ * qdf_nbuf_get_rx_reo_dest_ind() - get reo destination indication
+ * @buf: Network buffer
+ *
+ * Return reo destination indication value (0 ~ 31)
+ */
+static inline uint8_t qdf_nbuf_get_rx_reo_dest_ind(qdf_nbuf_t buf)
+{
+	return QDF_NBUF_CB_RX_PACKET_REO_DEST_IND(buf);
+}
 #endif /* _QDF_NBUF_M_H */

+ 12 - 0
qdf/inc/i_qdf_nbuf_api_w.h

@@ -143,4 +143,16 @@ static inline uint8_t qdf_nbuf_is_rx_ipa_smmu_map(qdf_nbuf_t buf)
 {
 	return 0;
 }
+
+/**
+ * qdf_nbuf_set_rx_reo_dest_ind() - set reo destination indication
+ * @buf: Network buffer
+ * @value: reo destination indication value to set
+ *
+ * Return: none
+ */
+static inline void qdf_nbuf_set_rx_reo_dest_ind(qdf_nbuf_t buf,
+						uint8_t value)
+{
+}
 #endif /* _QDF_NBUF_W_H */

+ 3 - 1
qdf/linux/src/i_qdf_nbuf.h

@@ -113,6 +113,7 @@ typedef union {
  * @rx.dev.priv_cb_m.l3_hdr_pad: L3 header padding offset
  * @rx.dev.priv_cb_m.exc_frm: exception frame
  * @rx.dev.priv_cb_m.ipa_smmu_map: do IPA smmu map
+ * @rx.dev.priv_cb_m.reo_dest_ind: reo destination indication
  * @rx.dev.priv_cb_m.tcp_seq_num: TCP sequence number
  * @rx.dev.priv_cb_m.tcp_ack_num: TCP ACK number
  * @rx.dev.priv_cb_m.lro_ctx: LRO context
@@ -232,7 +233,8 @@ struct qdf_nbuf_cb {
 						 /* exception frame flag */
 						 exc_frm:1,
 						 ipa_smmu_map:1,
-						 reserved:7,
+						 reo_dest_ind:5,
+						 reserved:2,
 						 reserved1:16;
 					uint32_t tcp_seq_num;
 					uint32_t tcp_ack_num;

+ 4 - 0
qdf/linux/src/i_qdf_nbuf_m.h

@@ -81,6 +81,10 @@
 	 (((struct qdf_nbuf_cb *)((skb)->cb))->u.rx.dev.priv_cb_m. \
 	 ipa_smmu_map)
 
+#define  QDF_NBUF_CB_RX_PACKET_REO_DEST_IND(skb) \
+	(((struct qdf_nbuf_cb *)((skb)->cb))->u.rx.dev.priv_cb_m. \
+	reo_dest_ind)
+
 #define __qdf_nbuf_ipa_owned_get(skb) \
 	QDF_NBUF_CB_TX_IPA_OWNED(skb)