Просмотр исходного кода

qcacmn: Use correct variable to iterate reo dest rings

Currently the MAX_REO_DEST_RINGS is used to iterate reo dst ring. If the
MAX_REO_DEST_RINGS is more that no. of reo dest ring initialize, the
print is seen on console as hal_ring_hdl will be null for extra
iterations.
Add fix to use correct variable to iterate reo dest rings

Change-Id: Ibcb44dda49696a7bb029b49ce3d50acd8741590a
Himanshu Batra 3 лет назад
Родитель
Сommit
cc46006b7d
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      dp/wifi3.0/dp_ipa.c

+ 2 - 2
dp/wifi3.0/dp_ipa.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -215,7 +215,7 @@ static void dp_ipa_set_reo_ctx_mapping_lock_required(struct dp_soc *soc,
 	hal_ring_handle_t hal_ring_hdl;
 	int ring;
 
-	for (ring = 0; ring < MAX_REO_DEST_RINGS; ring++) {
+	for (ring = 0; ring < soc->num_reo_dest_rings; ring++) {
 		hal_ring_hdl = soc->reo_dest_ring[ring].hal_srng;
 		hal_srng_lock(hal_ring_hdl);
 		soc->ipa_reo_ctx_lock_required[ring] = lock_required;