qcacld-3.0: Fix Dual AP IPA failed when NAPI enabled

Fix AP+AP IPA offload path failure when NAPI over IPA enabled on mdm
platforms by adding QCA_CONFIG_RPS check.

QCA_CONFIG_RPS is same as CONFIG_RPS, default Y, but depend on CONFIG_SMP
as msm-5.4/net/Kconfig.

For AP+AP mode,
For LA,   CONFIG_SMP on,  then QCA_CONFIG_RPS on,  use IPA exception path.
For mdm,  CONFIG_SMP off, then QCA_CONFIG_RPS off,  use IPA offload path.

For IPA napi enable status check, just use qdf_ipa_get_lan_rx_napi,
don't need MACRO IPA_LAN_RX_NAPI_SUPPORT.

Change-Id: I6b16f2a830d4e7829c9e539896ed2977895d367e
CRs-Fixed: 2992393
This commit is contained in:
Jianmin Zhu 2021-07-16 20:34:05 +08:00 committed by Madan Koyyalamudi
parent 170726e3ae
commit 1d4b529547
10 changed files with 29 additions and 10 deletions

3
Kbuild
View File

@ -3362,6 +3362,9 @@ cppflags-$(CONFIG_EXT_WOW) += -DWLAN_FEATURE_EXTWOW_SUPPORT
#Mark it as SMP Kernel
cppflags-$(CONFIG_SMP) += -DQCA_CONFIG_SMP
#CONFIG_RPS default Y, but depend on CONFIG_SMP
cppflags-$(CONFIG_RPS) += -DQCA_CONFIG_RPS
cppflags-$(CONFIG_CHNL_MATRIX_RESTRICTION) += -DWLAN_ENABLE_CHNL_MATRIX_RESTRICTION
#Enable ICMP packet disable powersave feature

View File

@ -555,7 +555,7 @@ void wlan_ipa_reg_send_to_nw_cb(struct wlan_ipa_priv *ipa_ctx,
ipa_ctx->send_to_nw = cb;
}
#ifdef IPA_LAN_RX_NAPI_SUPPORT
#ifdef QCA_CONFIG_RPS
/**
* wlan_ipa_reg_rps_enable_cb() - Register callback to enable RPS
* @ipa_ctx: IPA context

View File

@ -279,7 +279,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 IPA_LAN_RX_NAPI_SUPPORT
#ifdef QCA_CONFIG_RPS
/**
* ipa_reg_rps_enable_cb() - Register cb to enable RPS
* @pdev: pdev obj

View File

@ -714,7 +714,7 @@ struct wlan_ipa_priv {
ipa_uc_offload_control_req ipa_tx_op;
ipa_intrabss_control_req ipa_intrabss_op;
#ifdef IPA_LAN_RX_NAPI_SUPPORT
#ifdef QCA_CONFIG_RPS
/*Callback to enable RPS for STA in STA+SAP scenario*/
wlan_ipa_rps_enable rps_enable;
#endif

View File

@ -1824,7 +1824,7 @@ end:
defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750) || \
defined(QCA_WIFI_WCN7850)
#ifdef IPA_LAN_RX_NAPI_SUPPORT
#ifdef QCA_CONFIG_RPS
void ipa_set_rps(struct wlan_ipa_priv *ipa_ctx, enum QDF_OPMODE mode,
bool enable)
{
@ -1843,6 +1843,7 @@ void ipa_set_rps(struct wlan_ipa_priv *ipa_ctx, enum QDF_OPMODE mode,
}
#endif
#ifdef QCA_CONFIG_RPS
/**
* wlan_ipa_uc_handle_first_con() - Handle first uC IPA connection
* @ipa_ctx: IPA context
@ -1870,6 +1871,21 @@ 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,
@ -2218,7 +2234,7 @@ static QDF_STATUS wlan_ipa_send_msg(qdf_netdev_t net_dev,
return QDF_STATUS_SUCCESS;
}
#ifdef IPA_LAN_RX_NAPI_SUPPORT
#ifdef QCA_CONFIG_RPS
void wlan_ipa_handle_multiple_sap_evt(struct wlan_ipa_priv *ipa_ctx,
qdf_ipa_wlan_event type)
{

View File

@ -354,7 +354,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 IPA_LAN_RX_NAPI_SUPPORT
#ifdef QCA_CONFIG_RPS
void ipa_reg_rps_enable_cb(struct wlan_objmgr_pdev *pdev,
wlan_ipa_rps_enable cb)
{

View File

@ -183,7 +183,7 @@ void ucfg_ipa_reg_send_to_nw_cb(struct wlan_objmgr_pdev *pdev,
*
* Return: None
*/
#ifdef IPA_LAN_RX_NAPI_SUPPORT
#ifdef QCA_CONFIG_RPS
void ucfg_ipa_reg_rps_enable_cb(struct wlan_objmgr_pdev *pdev,
wlan_ipa_rps_enable cb);
#else

View File

@ -106,7 +106,7 @@ void ucfg_ipa_reg_send_to_nw_cb(struct wlan_objmgr_pdev *pdev,
return ipa_reg_send_to_nw_cb(pdev, cb);
}
#ifdef IPA_LAN_RX_NAPI_SUPPORT
#ifdef QCA_CONFIG_RPS
void ucfg_ipa_reg_rps_enable_cb(struct wlan_objmgr_pdev *pdev,
wlan_ipa_rps_enable cb)
{

View File

@ -407,7 +407,7 @@ void hdd_send_rps_disable_ind(struct hdd_adapter *adapter);
*
* Return: none
*/
#ifdef IPA_LAN_RX_NAPI_SUPPORT
#ifdef QCA_CONFIG_RPS
void hdd_adapter_set_rps(uint8_t vdev_id, bool enable);
#else
static inline

View File

@ -3331,7 +3331,7 @@ void hdd_send_rps_disable_ind(struct hdd_adapter *adapter)
cds_cfg->rps_enabled = false;
}
#ifdef IPA_LAN_RX_NAPI_SUPPORT
#ifdef QCA_CONFIG_RPS
void hdd_adapter_set_rps(uint8_t vdev_id, bool enable)
{
struct hdd_context *hdd_ctx;