Browse Source

Revert "qcacld-3.0: Fix arp offload not sent when suspend"

This reverts commit I06ea617df49287ee87e7b5bf8b20971b581dedf1

which introduced a fix to enable/disable arp offload on every
suspend/resume even if gActiveModeOffload is enabled, which is
not correct. The expectation here is that if gActiveModeOffload
is enabled, host should enable arp offload only onece and it
should not disable on any condition.

Change-Id: Ifc4ff1c0a39cc4c17e9a292ef8b0ebabd766a710
CRs-Fixed: 3147896
Ashish 3 years ago
parent
commit
f853df3d5b
2 changed files with 8 additions and 35 deletions
  1. 5 17
      components/pmo/core/src/wlan_pmo_arp.c
  2. 3 18
      components/pmo/core/src/wlan_pmo_ns.c

+ 5 - 17
components/pmo/core/src/wlan_pmo_arp.c

@@ -233,29 +233,17 @@ QDF_STATUS pmo_core_arp_check_offload(struct wlan_objmgr_psoc *psoc,
 
 	vdev_ctx = pmo_vdev_get_priv(vdev);
 	psoc_ctx = vdev_ctx->pmo_psoc_ctx;
-	active_offload_cond = psoc_ctx->psoc_cfg.active_mode_offload;
 
-	if (trigger == pmo_apps_suspend) {
-		qdf_spin_lock_bh(&vdev_ctx->pmo_vdev_lock);
-		is_applied_cond =
-			vdev_ctx->vdev_arp_req.enable == PMO_OFFLOAD_ENABLE &&
-			vdev_ctx->vdev_arp_req.is_offload_applied;
-		qdf_spin_unlock_bh(&vdev_ctx->pmo_vdev_lock);
+	if (trigger == pmo_apps_suspend || trigger == pmo_apps_resume) {
+		active_offload_cond = psoc_ctx->psoc_cfg.active_mode_offload;
 
-		if (active_offload_cond && is_applied_cond) {
-			pmo_debug("active offload is enabled and offload already sent");
-			wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);
-			return QDF_STATUS_E_INVAL;
-		}
-	} else if (trigger == pmo_apps_resume) {
 		qdf_spin_lock_bh(&vdev_ctx->pmo_vdev_lock);
-		is_applied_cond =
-			vdev_ctx->vdev_arp_req.enable == PMO_OFFLOAD_DISABLE &&
-			!vdev_ctx->vdev_arp_req.is_offload_applied;
+		is_applied_cond = vdev_ctx->vdev_arp_req.enable &&
+				  vdev_ctx->vdev_arp_req.is_offload_applied;
 		qdf_spin_unlock_bh(&vdev_ctx->pmo_vdev_lock);
 
 		if (active_offload_cond && is_applied_cond) {
-			pmo_debug("active offload is enabled and offload already disabled");
+			pmo_debug("active offload is enabled and offload already sent");
 			wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);
 			return QDF_STATUS_E_INVAL;
 		}

+ 3 - 18
components/pmo/core/src/wlan_pmo_ns.c

@@ -277,13 +277,12 @@ QDF_STATUS pmo_core_ns_check_offload(struct wlan_objmgr_psoc *psoc,
 	vdev_ctx = pmo_vdev_get_priv(vdev);
 	psoc_ctx = vdev_ctx->pmo_psoc_ctx;
 
-	if (trigger == pmo_apps_suspend) {
+	if (trigger == pmo_apps_suspend || trigger == pmo_apps_resume) {
 		active_offload_cond = psoc_ctx->psoc_cfg.active_mode_offload;
 
 		qdf_spin_lock_bh(&vdev_ctx->pmo_vdev_lock);
-		is_applied_cond =
-			vdev_ctx->vdev_ns_req.enable == PMO_OFFLOAD_ENABLE &&
-			vdev_ctx->vdev_ns_req.is_offload_applied;
+		is_applied_cond = vdev_ctx->vdev_ns_req.enable &&
+			       vdev_ctx->vdev_ns_req.is_offload_applied;
 		qdf_spin_unlock_bh(&vdev_ctx->pmo_vdev_lock);
 
 		if (active_offload_cond && is_applied_cond) {
@@ -291,20 +290,6 @@ QDF_STATUS pmo_core_ns_check_offload(struct wlan_objmgr_psoc *psoc,
 			wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);
 			return QDF_STATUS_E_INVAL;
 		}
-	} else if (trigger == pmo_apps_resume) {
-		active_offload_cond = psoc_ctx->psoc_cfg.active_mode_offload;
-
-		qdf_spin_lock_bh(&vdev_ctx->pmo_vdev_lock);
-		is_applied_cond =
-			vdev_ctx->vdev_ns_req.enable == PMO_OFFLOAD_DISABLE &&
-			!vdev_ctx->vdev_ns_req.is_offload_applied;
-		qdf_spin_unlock_bh(&vdev_ctx->pmo_vdev_lock);
-
-		if (active_offload_cond && is_applied_cond) {
-			pmo_debug("active offload is enabled and offload already disabled");
-			wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);
-			return QDF_STATUS_E_INVAL;
-		}
 	}
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);
 out: