qcacmn: Properly set RPS for WLAN IPA

It is observed on sdxpinn target (first multi-core MDM platform)
that WLAN failed to enable IPA pipes with SAP-SAP mode when first
ref-client connects to the SAP. Indeed with QCA_CONFIG_RPS=y and
qdf_ipa_get_lan_rx_napi()=true, wlan_ipa_uc_handle_first_con()
directly returns false if more than 1 SAP is started.

This obviously breaks IPA data path for MDM platform, where even
4 SAP can be supported with IPA offload. And WLAN data path
forwarding replies fully on IPA hardware. This also means there's
no need to configure RPS for MDM, which is a host kernel networking
feature.

Change-Id: I4c17f61b1b242cdbaed7177201b330d10ec7e61b
CRs-Fixed: 3490817
This commit is contained in:
Jia Ding
2023-05-08 21:56:23 +08:00
committed by Madan Koyyalamudi
parent d563641c08
commit 296729e604
7 changed files with 44 additions and 45 deletions

View File

@@ -597,7 +597,7 @@ void wlan_ipa_reg_send_to_nw_cb(struct wlan_ipa_priv *ipa_ctx,
ipa_ctx->send_to_nw = cb;
}
#ifdef QCA_CONFIG_RPS
#if defined(QCA_CONFIG_RPS) && !defined(MDM_PLATFORM)
/**
* wlan_ipa_reg_rps_enable_cb() - Register callback to enable RPS
* @ipa_ctx: IPA context
@@ -612,17 +612,6 @@ void wlan_ipa_reg_rps_enable_cb(struct wlan_ipa_priv *ipa_ctx,
ipa_ctx->rps_enable = cb;
}
/**
* ipa_set_rps(): Enable/disable RPS for all interfaces of specific mode
* @ipa_ctx: IPA context
* @mode: mode of interface for which RPS needs to be enabled
* @enable: Set true to enable RPS
*
* Return: None
*/
void ipa_set_rps(struct wlan_ipa_priv *ipa_ctx, enum QDF_OPMODE mode,
bool enable);
/**
* ipa_set_rps_per_vdev(): Enable/disable RPS for a specific vdev
* @ipa_ctx: IPA context
@@ -653,12 +642,6 @@ void wlan_ipa_handle_multiple_sap_evt(struct wlan_ipa_priv *ipa_ctx,
qdf_ipa_wlan_event type);
#else
static inline
void ipa_set_rps(struct wlan_ipa_priv *ipa_ctx, enum QDF_OPMODE mode,
bool enable)
{
}
static inline
void ipa_set_rps_per_vdev(struct wlan_ipa_priv *ipa_ctx, uint8_t vdev_id,
bool enable)
@@ -670,7 +653,6 @@ void wlan_ipa_handle_multiple_sap_evt(struct wlan_ipa_priv *ipa_ctx,
qdf_ipa_wlan_event type)
{
}
#endif
/**

View File

@@ -326,7 +326,7 @@ void ipa_reg_sap_xmit_cb(struct wlan_objmgr_pdev *pdev,
void ipa_reg_send_to_nw_cb(struct wlan_objmgr_pdev *pdev,
wlan_ipa_send_to_nw cb);
#ifdef QCA_CONFIG_RPS
#if defined(QCA_CONFIG_RPS) && !defined(MDM_PLATFORM)
/**
* ipa_reg_rps_enable_cb() - Register cb to enable RPS
* @pdev: pdev obj

View File

@@ -760,7 +760,7 @@ struct wlan_ipa_priv {
wlan_ipa_softap_xmit softap_xmit;
wlan_ipa_send_to_nw send_to_nw;
#ifdef QCA_CONFIG_RPS
#if defined(QCA_CONFIG_RPS) && !defined(MDM_PLATFORM)
/*Callback to enable RPS for STA in STA+SAP scenario*/
wlan_ipa_rps_enable rps_enable;
#endif

View File

@@ -2328,9 +2328,17 @@ end:
defined(QCA_WIFI_KIWI) || defined(QCA_WIFI_KIWI_V2) || \
defined(QCA_WIFI_QCN9224)
#ifdef QCA_CONFIG_RPS
void ipa_set_rps(struct wlan_ipa_priv *ipa_ctx, enum QDF_OPMODE mode,
bool enable)
#if defined(QCA_CONFIG_RPS) && !defined(MDM_PLATFORM)
/**
* ipa_set_rps(): Enable/disable RPS for all interfaces of specific mode
* @ipa_ctx: IPA context
* @mode: mode of interface for which RPS needs to be enabled
* @enable: Set true to enable RPS
*
* Return: None
*/
static void ipa_set_rps(struct wlan_ipa_priv *ipa_ctx, enum QDF_OPMODE mode,
bool enable)
{
struct wlan_ipa_iface_context *iface_ctx;
wlan_ipa_rps_enable cb = ipa_ctx->rps_enable;
@@ -2345,9 +2353,7 @@ void ipa_set_rps(struct wlan_ipa_priv *ipa_ctx, enum QDF_OPMODE mode,
cb(iface_ctx->session_id, enable);
}
}
#endif
#ifdef QCA_CONFIG_RPS
/**
* wlan_ipa_uc_handle_first_con() - Handle first uC IPA connection
* @ipa_ctx: IPA context
@@ -2375,21 +2381,6 @@ static QDF_STATUS wlan_ipa_uc_handle_first_con(struct wlan_ipa_priv *ipa_ctx)
return QDF_STATUS_SUCCESS;
}
#else
static QDF_STATUS wlan_ipa_uc_handle_first_con(struct wlan_ipa_priv *ipa_ctx)
{
ipa_debug("enter");
if (wlan_ipa_uc_enable_pipes(ipa_ctx) != QDF_STATUS_SUCCESS) {
ipa_err("IPA WDI Pipe activation failed");
return QDF_STATUS_E_BUSY;
}
ipa_debug("exit");
return QDF_STATUS_SUCCESS;
}
#endif
static
void wlan_ipa_uc_handle_last_discon(struct wlan_ipa_priv *ipa_ctx,
@@ -2404,6 +2395,32 @@ void wlan_ipa_uc_handle_last_discon(struct wlan_ipa_priv *ipa_ctx,
ipa_debug("exit: IPA WDI Pipes deactivated");
}
#else
static QDF_STATUS wlan_ipa_uc_handle_first_con(struct wlan_ipa_priv *ipa_ctx)
{
ipa_debug("enter");
if (wlan_ipa_uc_enable_pipes(ipa_ctx) != QDF_STATUS_SUCCESS) {
ipa_err("IPA WDI Pipe activation failed");
return QDF_STATUS_E_BUSY;
}
ipa_debug("exit");
return QDF_STATUS_SUCCESS;
}
static
void wlan_ipa_uc_handle_last_discon(struct wlan_ipa_priv *ipa_ctx,
bool force_disable)
{
ipa_debug("enter");
wlan_ipa_uc_disable_pipes(ipa_ctx, force_disable);
ipa_debug("exit: IPA WDI Pipes deactivated");
}
#endif
bool wlan_ipa_is_fw_wdi_activated(struct wlan_ipa_priv *ipa_ctx)
{
@@ -2738,7 +2755,7 @@ static QDF_STATUS wlan_ipa_send_msg(qdf_netdev_t net_dev,
return QDF_STATUS_SUCCESS;
}
#ifdef QCA_CONFIG_RPS
#if defined(QCA_CONFIG_RPS) && !defined(MDM_PLATFORM)
void wlan_ipa_handle_multiple_sap_evt(struct wlan_ipa_priv *ipa_ctx,
qdf_ipa_wlan_event type)
{

View File

@@ -382,7 +382,7 @@ void ipa_reg_send_to_nw_cb(struct wlan_objmgr_pdev *pdev,
return wlan_ipa_reg_send_to_nw_cb(ipa_obj, cb);
}
#ifdef QCA_CONFIG_RPS
#if defined(QCA_CONFIG_RPS) && !defined(MDM_PLATFORM)
void ipa_reg_rps_enable_cb(struct wlan_objmgr_pdev *pdev,
wlan_ipa_rps_enable cb)
{

View File

@@ -207,7 +207,7 @@ void ucfg_ipa_reg_send_to_nw_cb(struct wlan_objmgr_pdev *pdev,
*
* Return: None
*/
#ifdef QCA_CONFIG_RPS
#if defined(QCA_CONFIG_RPS) && !defined(MDM_PLATFORM)
void ucfg_ipa_reg_rps_enable_cb(struct wlan_objmgr_pdev *pdev,
wlan_ipa_rps_enable cb);
#else

View File

@@ -158,7 +158,7 @@ void ucfg_ipa_reg_send_to_nw_cb(struct wlan_objmgr_pdev *pdev,
qdf_export_symbol(ucfg_ipa_reg_send_to_nw_cb);
#ifdef QCA_CONFIG_RPS
#if defined(QCA_CONFIG_RPS) && !defined(MDM_PLATFORM)
void ucfg_ipa_reg_rps_enable_cb(struct wlan_objmgr_pdev *pdev,
wlan_ipa_rps_enable cb)
{