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
This commit is contained in:
Tiger Yu
2021-06-18 09:17:51 +08:00
committed by Madan Koyyalamudi
parent babab1900a
commit 33c1df645b
3 changed files with 35 additions and 0 deletions

2
Kbuild
View File

@@ -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_UPDATE) += -DWDI3_STATS_UPDATE
cppflags-$(CONFIG_WDI3_STATS_BW_MONITOR) += -DWDI3_STATS_BW_MONITOR 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_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 cppflags-$(CONFIG_WLAN_SEND_DSCP_UP_MAP_TO_FW) += -DWLAN_SEND_DSCP_UP_MAP_TO_FW

View File

@@ -2959,6 +2959,33 @@ wlan_host_to_ipa_wlan_event(enum wlan_ipa_wlan_event wlan_ipa_event_type)
return ipa_event; 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 * wlan_ipa_wlan_evt() - SSR wrapper for __wlan_ipa_wlan_evt
* @net_dev: Interface net device * @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_ipa_wlan_event type = wlan_host_to_ipa_wlan_event(ipa_event_type);
QDF_STATUS status = QDF_STATUS_SUCCESS; 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 */ /* Data path offload only support for STA and SAP mode */
if ((device_mode == QDF_STA_MODE) || if ((device_mode == QDF_STA_MODE) ||
(device_mode == QDF_SAP_MODE)) (device_mode == QDF_SAP_MODE))

View File

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