瀏覽代碼

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
Jia Ding 2 年之前
父節點
當前提交
296729e604

+ 1 - 19
ipa/core/inc/wlan_ipa_core.h

@@ -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
 
 /**

+ 1 - 1
ipa/core/inc/wlan_ipa_main.h

@@ -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

+ 1 - 1
ipa/core/inc/wlan_ipa_priv.h

@@ -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

+ 27 - 10
ipa/core/src/wlan_ipa_core.c

@@ -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,6 +2381,20 @@ static QDF_STATUS wlan_ipa_uc_handle_first_con(struct wlan_ipa_priv *ipa_ctx)
 
 	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);
+
+	if (qdf_ipa_get_lan_rx_napi() && ipa_ctx->sta_connected)
+		ipa_set_rps(ipa_ctx, QDF_STA_MODE, false);
+
+	ipa_debug("exit: IPA WDI Pipes deactivated");
+}
 #else
 static QDF_STATUS wlan_ipa_uc_handle_first_con(struct wlan_ipa_priv *ipa_ctx)
 {
@@ -2389,7 +2409,6 @@ static QDF_STATUS wlan_ipa_uc_handle_first_con(struct wlan_ipa_priv *ipa_ctx)
 
 	return QDF_STATUS_SUCCESS;
 }
-#endif
 
 static
 void wlan_ipa_uc_handle_last_discon(struct wlan_ipa_priv *ipa_ctx,
@@ -2399,11 +2418,9 @@ void wlan_ipa_uc_handle_last_discon(struct wlan_ipa_priv *ipa_ctx,
 
 	wlan_ipa_uc_disable_pipes(ipa_ctx, force_disable);
 
-	if (qdf_ipa_get_lan_rx_napi() && ipa_ctx->sta_connected)
-		ipa_set_rps(ipa_ctx, QDF_STA_MODE, false);
-
 	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)
 {

+ 1 - 1
ipa/core/src/wlan_ipa_main.c

@@ -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)
 {

+ 1 - 1
ipa/dispatcher/inc/wlan_ipa_ucfg_api.h

@@ -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

+ 1 - 1
ipa/dispatcher/src/wlan_ipa_ucfg_api.c

@@ -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)
 {