Pārlūkot izejas kodu

qcacld-3.0: Enable the wlan IPA events for P2P GO/CLI mode for qca6390

Enable the wlan IPA events for P2P GO/CLI mode for qca6390 to avoid RX
packets get dropped due to IPA interface context is not created.

Change-Id: I1e2c5e4085874280779d8d8d07efdb1f33e6d90b
CRs-Fixed: 2853271
Tiger Yu 3 gadi atpakaļ
vecāks
revīzija
33c1df645b
3 mainītis faili ar 35 papildinājumiem un 0 dzēšanām
  1. 2 0
      Kbuild
  2. 29 0
      components/ipa/core/src/wlan_ipa_core.c
  3. 4 0
      configs/qca6390_defconfig

+ 2 - 0
Kbuild

@@ -3988,6 +3988,8 @@ ccflags-$(CONFIG_WMI_SEND_RECV_QMI) += -DWLAN_FEATURE_WMI_SEND_RECV_QMI
 cppflags-$(CONFIG_WDI3_STATS_UPDATE) += -DWDI3_STATS_UPDATE
 cppflags-$(CONFIG_WDI3_STATS_BW_MONITOR) += -DWDI3_STATS_BW_MONITOR
 
+cppflags-$(CONFIG_IPA_P2P_SUPPORT) += -DIPA_P2P_SUPPORT
+
 cppflags-$(CONFIG_WLAN_CUSTOM_DSCP_UP_MAP) += -DWLAN_CUSTOM_DSCP_UP_MAP
 cppflags-$(CONFIG_WLAN_SEND_DSCP_UP_MAP_TO_FW) += -DWLAN_SEND_DSCP_UP_MAP_TO_FW
 

+ 29 - 0
components/ipa/core/src/wlan_ipa_core.c

@@ -2959,6 +2959,33 @@ wlan_host_to_ipa_wlan_event(enum wlan_ipa_wlan_event wlan_ipa_event_type)
 	return ipa_event;
 }
 
+#ifdef IPA_P2P_SUPPORT
+/**
+ * wlan_ipa_device_mode_switch() - Switch P2p GO/CLI to SAP/STA mode
+ * @device_mode: device mode
+ *
+ * Return: New device mode after switching
+ */
+static uint8_t wlan_ipa_device_mode_switch(uint8_t device_mode)
+{
+	switch (device_mode) {
+	case QDF_P2P_CLIENT_MODE:
+		return QDF_STA_MODE;
+	case QDF_P2P_GO_MODE:
+		return QDF_SAP_MODE;
+	default:
+		break;
+	}
+
+	return device_mode;
+}
+#else
+static uint8_t wlan_ipa_device_mode_switch(uint8_t device_mode)
+{
+	return device_mode;
+}
+#endif
+
 /**
  * wlan_ipa_wlan_evt() - SSR wrapper for __wlan_ipa_wlan_evt
  * @net_dev: Interface net device
@@ -2978,6 +3005,8 @@ QDF_STATUS wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode,
 	qdf_ipa_wlan_event type = wlan_host_to_ipa_wlan_event(ipa_event_type);
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
+	device_mode = wlan_ipa_device_mode_switch(device_mode);
+
 	/* Data path offload only support for STA and SAP mode */
 	if ((device_mode == QDF_STA_MODE) ||
 	    (device_mode == QDF_SAP_MODE))

+ 4 - 0
configs/qca6390_defconfig

@@ -544,6 +544,10 @@ CONFIG_ENABLE_SMMU_S1_TRANSLATION := y
 endif
 endif
 
+ifeq ($(CONFIG_IPA_OFFLOAD), y)
+CONFIG_IPA_P2P_SUPPORT := y
+endif
+
 ifeq ($(CONFIG_ARCH_SDX20), y)
 ifeq ($(CONFIG_QCA_WIFI_SDIO), y)
 ifeq ($(CONFIG_WCNSS_SKB_PRE_ALLOC), y)