소스 검색

qcacmn: Enable IPA pipe for second SAP

On sdxpinn target (first multi-core MDM platform) with rome
chip attached, it's required to enable IPA pipe for both SAP in
AP-AP mode, but currently only first AP has IPA pipe enabled.
The second AP always goes with sw path because wlan firmware isn't
notified to choose IPA path by wlan_ipa_uc_offload_enable_disable().

The fix is to always enable IPA for each SAP no matter how many
SAP are started if MDM_PLATFORM is defined.

Change-Id: I8a2048aae04e14aa840d7d9a2ccb287201336cf3
CRs-Fixed: 3532926
Nijun Gong 2 년 전
부모
커밋
ce14cb4467
2개의 변경된 파일42개의 추가작업 그리고 26개의 파일을 삭제
  1. 0 19
      ipa/core/inc/wlan_ipa_core.h
  2. 42 7
      ipa/core/src/wlan_ipa_core.c

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

@@ -628,31 +628,12 @@ void ipa_set_rps_per_vdev(struct wlan_ipa_priv *ipa_ctx, uint8_t vdev_id,
 		ipa_ctx->rps_enable(vdev_id, enable);
 }
 
-/**
- * wlan_ipa_handle_multiple_sap_evt() - Handle multiple SAP connect/disconnect
- * @ipa_ctx: IPA global context
- * @type: IPA event type.
- *
- * This function is used to disable pipes when multiple SAP are connected and
- * enable pipes back when only one SAP is connected.
- *
- * Return: None
- */
-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_per_vdev(struct wlan_ipa_priv *ipa_ctx, uint8_t vdev_id,
 			  bool enable)
 {
 }
-
-static inline
-void wlan_ipa_handle_multiple_sap_evt(struct wlan_ipa_priv *ipa_ctx,
-				      qdf_ipa_wlan_event type)
-{
-}
 #endif
 
 /**

+ 42 - 7
ipa/core/src/wlan_ipa_core.c

@@ -2793,13 +2793,25 @@ static QDF_STATUS wlan_ipa_send_msg(qdf_netdev_t net_dev,
 }
 
 #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)
+/**
+ * wlan_ipa_handle_multiple_sap_evt() - Handle multiple SAP connect/disconnect
+ * @ipa_ctx: IPA global context
+ * @type: IPA event type
+ * @session_id: vdev id
+ *
+ * This function is used to disable pipes when multiple SAP are connected and
+ * enable pipes back when only one SAP is connected.
+ *
+ * Return: None
+ */
+static void wlan_ipa_handle_multiple_sap_evt(struct wlan_ipa_priv *ipa_ctx,
+					     qdf_ipa_wlan_event type,
+					     uint8_t session_id)
 {
 	struct wlan_ipa_iface_context *iface_ctx;
 	int i;
 
-	if (type ==  QDF_IPA_AP_DISCONNECT) {
+	if (type == QDF_IPA_AP_DISCONNECT) {
 		ipa_debug("Multiple SAP disconnecting. Enabling IPA");
 
 		if (ipa_ctx->sap_num_connected_sta > 0)
@@ -2816,7 +2828,7 @@ void wlan_ipa_handle_multiple_sap_evt(struct wlan_ipa_priv *ipa_ctx,
 				break;
 			}
 		}
-	} else if (type ==  QDF_IPA_AP_CONNECT) {
+	} else if (type == QDF_IPA_AP_CONNECT) {
 		ipa_debug("Multiple SAP connected. Disabling IPA");
 
 		for (i = 0; i < WLAN_IPA_MAX_IFACE; i++) {
@@ -2834,6 +2846,27 @@ void wlan_ipa_handle_multiple_sap_evt(struct wlan_ipa_priv *ipa_ctx,
 			wlan_ipa_uc_handle_last_discon(ipa_ctx, true);
 	}
 }
+#else
+/**
+ * wlan_ipa_handle_multiple_sap_evt() - Handle multiple SAP connect/disconnect
+ * @ipa_ctx: IPA global context
+ * @type: IPA event type
+ * @session_id: vdev id
+ *
+ * Enable IPA for new SAP when multiple SAP are turned on
+ *
+ * Return: None
+ */
+static void wlan_ipa_handle_multiple_sap_evt(struct wlan_ipa_priv *ipa_ctx,
+					     qdf_ipa_wlan_event type,
+					     uint8_t session_id)
+{
+	if (type == QDF_IPA_AP_CONNECT)
+		wlan_ipa_uc_offload_enable_disable(ipa_ctx,
+						   WMI_AP_RX_DATA_OFFLOAD,
+						   session_id,
+						   true);
+}
 #endif
 
 static inline void
@@ -3118,7 +3151,7 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode,
 				if (qdf_ipa_get_lan_rx_napi() &&
 				    ipa_ctx->num_sap_connected == 1) {
 					wlan_ipa_handle_multiple_sap_evt(ipa_ctx,
-									 type);
+							type, session_id);
 				}
 			}
 
@@ -3249,7 +3282,8 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode,
 			qdf_mutex_release(&ipa_ctx->event_lock);
 			if (qdf_ipa_get_lan_rx_napi() &&
 			    (ipa_ctx->num_sap_connected > 1)) {
-				wlan_ipa_handle_multiple_sap_evt(ipa_ctx, type);
+				wlan_ipa_handle_multiple_sap_evt(ipa_ctx, type,
+								 session_id);
 			} else {
 				wlan_ipa_uc_offload_enable_disable(ipa_ctx,
 							WMI_AP_RX_DATA_OFFLOAD,
@@ -3397,7 +3431,8 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode,
 
 		if (qdf_ipa_get_lan_rx_napi() &&
 		    (ipa_ctx->num_sap_connected == 1))
-			wlan_ipa_handle_multiple_sap_evt(ipa_ctx, type);
+			wlan_ipa_handle_multiple_sap_evt(ipa_ctx, type,
+							 session_id);
 
 		qdf_mutex_release(&ipa_ctx->event_lock);
 		break;