Răsfoiți Sursa

qca-wifi: Add reason for asterity active setting failure

Add change to send reason code for asterity active setting failure

Change-Id: I6a559b621a1bb71bc6295d74bdc2bcf095236ef4
VENKATASAIPRUDHVI SANNIDHI 4 ani în urmă
părinte
comite
de691b33c3
1 a modificat fișierele cu 11 adăugiri și 1 ștergeri
  1. 11 1
      dp/wifi3.0/dp_txrx_wds.h

+ 11 - 1
dp/wifi3.0/dp_txrx_wds.h

@@ -393,13 +393,23 @@ static inline QDF_STATUS dp_rx_ast_set_active(struct dp_soc *soc,
 	qdf_spin_lock_bh(&soc->ast_lock);
 	ast = soc->ast_table[sa_idx];
 
+	if (!ast) {
+		qdf_spin_unlock_bh(&soc->ast_lock);
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	if (!ast->is_mapped) {
+		qdf_spin_unlock_bh(&soc->ast_lock);
+		return QDF_STATUS_E_INVAL;
+	}
+
 	/*
 	 * Ensure we are updating the right AST entry by
 	 * validating ast_idx.
 	 * There is a possibility we might arrive here without
 	 * AST MAP event , so this check is mandatory
 	 */
-	if (ast && ast->is_mapped && (ast->ast_idx == sa_idx)) {
+	if (ast->ast_idx == sa_idx) {
 		ast->is_active = is_active;
 		qdf_spin_unlock_bh(&soc->ast_lock);
 		return QDF_STATUS_SUCCESS;