소스 검색

qcacmn: SG support in RX path

Process the sg frames received in RX path.

Change-Id: Ia2d83c75c46f804599ca8fda4668c43ee508d59e
CRs-Fixed: 3303055
Sai Rupesh Chevuru 2 년 전
부모
커밋
431514912a
4개의 변경된 파일39개의 추가작업 그리고 10개의 파일을 삭제
  1. 8 5
      dp/wifi3.0/be/dp_be_rx.c
  2. 17 0
      dp/wifi3.0/dp_rx.c
  3. 6 0
      dp/wifi3.0/dp_rx.h
  4. 8 5
      dp/wifi3.0/li/dp_li_rx.c

+ 8 - 5
dp/wifi3.0/be/dp_be_rx.c

@@ -729,12 +729,15 @@ done:
 							      rx.raw, 1,
 							      msdu_len);
 			} else {
-				dp_rx_nbuf_free(nbuf);
 				DP_STATS_INC(soc, rx.err.scatter_msdu, 1);
-				dp_info_rl("scatter msdu len %d, dropped",
-					   msdu_len);
-				nbuf = next;
-				continue;
+
+				if (!dp_rx_is_sg_supported()) {
+					dp_rx_nbuf_free(nbuf);
+					dp_info_rl("sg msdu len %d, dropped",
+						   msdu_len);
+					nbuf = next;
+					continue;
+				}
 			}
 		} else {
 			msdu_len = QDF_NBUF_CB_RX_PKT_LEN(nbuf);

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

@@ -1772,6 +1772,23 @@ qdf_nbuf_t dp_rx_sg_create(struct dp_soc *soc, qdf_nbuf_t nbuf)
 	return parent;
 }
 
+#ifdef DP_RX_SG_FRAME_SUPPORT
+/**
+ * dp_rx_is_sg_supported() - SG packets processing supported or not.
+ *
+ * Return: returns true when processing is supported else false.
+ */
+bool dp_rx_is_sg_supported(void)
+{
+	return true;
+}
+#else
+bool dp_rx_is_sg_supported(void)
+{
+	return false;
+}
+#endif
+
 #endif /* QCA_HOST_MODE_WIFI_DISABLED */
 
 #ifdef QCA_PEER_EXT_STATS

+ 6 - 0
dp/wifi3.0/dp_rx.h

@@ -886,6 +886,12 @@ dp_rx_wbm_err_process(struct dp_intr *int_ctx, struct dp_soc *soc,
  */
 qdf_nbuf_t dp_rx_sg_create(struct dp_soc *soc, qdf_nbuf_t nbuf);
 
+/**
+ * dp_rx_is_sg_supported() - SG packets processing supported or not.
+ *
+ * Return: returns true when processing is supported else false.
+ */
+bool dp_rx_is_sg_supported(void);
 
 /*
  * dp_rx_desc_nbuf_and_pool_free() - free the sw rx desc pool called during

+ 8 - 5
dp/wifi3.0/li/dp_li_rx.c

@@ -739,12 +739,15 @@ done:
 							      rx.raw, 1,
 							      msdu_len);
 			} else {
-				dp_rx_nbuf_free(nbuf);
 				DP_STATS_INC(soc, rx.err.scatter_msdu, 1);
-				dp_info_rl("scatter msdu len %d, dropped",
-					   msdu_len);
-				nbuf = next;
-				continue;
+
+				if (!dp_rx_is_sg_supported()) {
+					dp_rx_nbuf_free(nbuf);
+					dp_info_rl("sg msdu len %d, dropped",
+						   msdu_len);
+					nbuf = next;
+					continue;
+				}
 			}
 		} else {
 			msdu_len = QDF_NBUF_CB_RX_PKT_LEN(nbuf);