Explorar o código

qcacmn: Force unwake in ce_per_engine_service for fastpath

ce_per_engine_service fails to call Q_TARGET_ACCESS_END in fastpath
execution flow.

Change-Id: I0caed62a4775e6e1231fead6eaa1ad7f38bc9ba2
CRs-Fixed: 1017064
Houston Hoffman %!s(int64=9) %!d(string=hai) anos
pai
achega
c8993b5509
Modificáronse 1 ficheiros con 5 adicións e 7 borrados
  1. 5 7
      hif/src/ce/ce_service.c

+ 5 - 7
hif/src/ce/ce_service.c

@@ -1819,8 +1819,7 @@ int ce_per_engine_service(struct hif_softc *scn, unsigned int CE_id)
 	if (ce_is_fastpath_handler_registered(CE_state)) {
 		/* For datapath only Rx CEs */
 		ce_per_engine_service_fast(scn, CE_id);
-		qdf_spin_unlock(&CE_state->ce_index_lock);
-		return CE_state->receive_count;
+		goto unlock_end;
 	}
 
 more_completions:
@@ -1857,10 +1856,7 @@ more_completions:
 			 */
 			if (qdf_unlikely(CE_state->force_break)) {
 				qdf_atomic_set(&CE_state->rx_pending, 1);
-				if (Q_TARGET_ACCESS_END(scn) < 0)
-					HIF_ERROR("<--[premature rc=%d]\n",
-						  CE_state->receive_count);
-				return CE_state->receive_count;
+				goto target_access_end;
 			}
 			qdf_spin_lock(&CE_state->ce_index_lock);
 		}
@@ -1993,9 +1989,11 @@ more_watermarks:
 		}
 	}
 
-	qdf_spin_unlock(&CE_state->ce_index_lock);
 	qdf_atomic_set(&CE_state->rx_pending, 0);
 
+unlock_end:
+	qdf_spin_unlock(&CE_state->ce_index_lock);
+target_access_end:
 	if (Q_TARGET_ACCESS_END(scn) < 0)
 		HIF_ERROR("<--[premature rc=%d]\n", CE_state->receive_count);
 	return CE_state->receive_count;