瀏覽代碼

qcacmn: Enable RPS dynamically for SAP mode

SAP Rx TPUT is bounded by host network stack, which is running in the
context of IPA work-queue, when IPA offload data path enabled.
However RPS shouldn't enabled for legacy Rx data path, where NAPI is
enabled. So, we dynamically enable RPS for SAP interface when the vdev
comes up and IPA was enabled only.
Send RPS enable indication to CNSS daemon to enable RPS only when SAP
interface comes up and disable RPS when SAP interface is closed.

Change-Id: Ia669b2c3ae814d0577f5226d8acbf026740ad760
CRs-Fixed: 2129520
Yun Park 7 年之前
父節點
當前提交
175539f1fe

+ 2 - 0
umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h

@@ -816,9 +816,11 @@ struct policy_mgr_cdp_cbacks {
  * struct policy_mgr_dp_cbacks - CDP Callbacks to be invoked
  * from policy manager
  * @hdd_disable_lro_in_concurrency: Callback to disable LRO
+ * @hdd_set_rx_mode_rps_cb: Callback to set RPS
  */
 struct policy_mgr_dp_cbacks {
 	void (*hdd_disable_lro_in_concurrency)(bool);
+	void (*hdd_set_rx_mode_rps_cb)(bool);
 };
 
 /**

+ 14 - 0
umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -1168,6 +1168,13 @@ void policy_mgr_incr_active_session(struct wlan_objmgr_psoc *psoc,
 			pm_ctx->dp_cbacks.hdd_disable_lro_in_concurrency(true);
 	};
 
+	/* Enable RPS if SAP interface has come up */
+	if (policy_mgr_mode_specific_connection_count(psoc, PM_SAP_MODE, NULL)
+		== 1) {
+		if (pm_ctx->dp_cbacks.hdd_set_rx_mode_rps_cb != NULL)
+			pm_ctx->dp_cbacks.hdd_set_rx_mode_rps_cb(true);
+	}
+
 	policy_mgr_dump_current_concurrency(psoc);
 
 	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
@@ -1228,6 +1235,13 @@ QDF_STATUS policy_mgr_decr_active_session(struct wlan_objmgr_psoc *psoc,
 			pm_ctx->dp_cbacks.hdd_disable_lro_in_concurrency(false);
 	};
 
+	/* Disable RPS if SAP interface has come up */
+	if (policy_mgr_mode_specific_connection_count(psoc, PM_SAP_MODE, NULL)
+		== 0) {
+		if (pm_ctx->dp_cbacks.hdd_set_rx_mode_rps_cb != NULL)
+			pm_ctx->dp_cbacks.hdd_set_rx_mode_rps_cb(false);
+	}
+
 	policy_mgr_dump_current_concurrency(psoc);
 
 	return qdf_status;

+ 2 - 0
umac/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c

@@ -632,6 +632,8 @@ QDF_STATUS policy_mgr_register_dp_cb(struct wlan_objmgr_psoc *psoc,
 
 	pm_ctx->dp_cbacks.hdd_disable_lro_in_concurrency =
 		dp_cbacks->hdd_disable_lro_in_concurrency;
+	pm_ctx->dp_cbacks.hdd_set_rx_mode_rps_cb =
+		dp_cbacks->hdd_set_rx_mode_rps_cb;
 
 	return QDF_STATUS_SUCCESS;
 }