Bläddra i källkod

qcacld-3.0: Fix WDI 3.0 ethernet header offset

Upon client connection to SAP, WLAN IPA will pass a message
containing client MAC address and ethernet header offset to
IPA driver. Per WDI 3.0, there's no frag_header and
ipa_header prepended in front of ethernet header. Thus
ethernet header length is passed to IPA driver as header
length during interface registration. But in per-client
message, offset passed to IPA driver still accounts for
length of frag_header and ipa_header. As a result packet
queued to event ring will have wrong ethernet header.
And this causes IPA to WLAN TX HW path not work as expected.

Fix is to define frag_header and ipa_header as 0 sized
structure for WDI 3.0 so that ethernet header offset will
be 0.

Change-Id: I58cdf78732ad2909bf89058f2a5bc24c42f841d2
CRs-Fixed: 2421315
jiad 6 år sedan
förälder
incheckning
42cc9fd76b
1 ändrade filer med 12 tillägg och 3 borttagningar
  1. 12 3
      components/ipa/core/inc/wlan_ipa_priv.h

+ 12 - 3
components/ipa/core/inc/wlan_ipa_priv.h

@@ -170,9 +170,11 @@ struct wlan_ipa_tx_hdr {
  * @reserved1: Reserved not used
  * @reserved2: Reserved not used
  */
-#if defined(QCA_WIFI_3_0) || \
-    defined(QCA_WIFI_QCA6290) || \
-    defined(QCA_WIFI_QCA6390)
+#if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390)
+struct frag_header {
+	uint8_t reserved[0];
+};
+#elif defined(QCA_WIFI_3_0)
 struct frag_header {
 	uint16_t length;
 	uint32_t reserved1;
@@ -192,11 +194,18 @@ struct frag_header {
  * @vdev_id:  vdev id
  * @reserved: Reserved not used
  */
+
+#if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390)
+struct ipa_header {
+	uint8_t reserved[0];
+};
+#else
 struct ipa_header {
 	uint32_t
 		vdev_id:8,	/* vdev_id field is LSB of IPA DESC */
 		reserved:24;
 } qdf_packed;
+#endif
 
 /**
  * struct wlan_ipa_uc_tx_hdr - full tx header registered to IPA hardware