Parcourir la source

qcacmn: Check for freelist in Rx Desc Pool

For some corner cases if there are no free
descriptors available in the rx desc pool
then stop processing frames

Add check for the same and break the loop
from processing further frames.

CRs-Fixed: 2380041
Change-Id: Ia5d82813df644af61d898131c2987d8d2798e8c9
phadiman il y a 6 ans
Parent
commit
ebf4cded6f
1 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. 8 1
      dp/wifi3.0/dp_rx_mon_status.c

+ 8 - 1
dp/wifi3.0/dp_rx_mon_status.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019 The Linux Foundation. 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
@@ -704,6 +704,13 @@ dp_rx_mon_status_srng_process(struct dp_soc *soc, uint32_t mac_id,
 							1,
 							&desc_list,
 							&tail);
+			/*
+			 * No free descriptors available
+			 */
+			if (qdf_unlikely(num_alloc_desc == 0)) {
+				work_done++;
+				break;
+			}
 
 			rx_desc = &desc_list->rx_desc;
 		}