Explorar o código

qcacmn: Add sanity check for ring descriptor address

in some corner cases (ex: SG frames are received) we
do not decrement quota or num_pending and go and fetch
the next descriptor, chances are ring may not have valid
descriptors at that point of time hence added this sanity
check.

Change-Id: I6994cc69c35de6bed7a71adca0a1d66ed5c94d3c
Tallapragada Kalyan %!s(int64=3) %!d(string=hai) anos
pai
achega
fdef41b4a2
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      dp/wifi3.0/li/dp_li_rx.c

+ 4 - 0
dp/wifi3.0/li/dp_li_rx.c

@@ -308,6 +308,10 @@ more_data:
 	 */
 	while (qdf_likely(num_pending)) {
 		ring_desc = dp_srng_dst_get_next(soc, hal_ring_hdl);
+
+		if (qdf_unlikely(!ring_desc))
+			break;
+
 		error = HAL_RX_ERROR_STATUS_GET(ring_desc);
 		if (qdf_unlikely(error == HAL_REO_ERROR_DETECTED)) {
 			dp_rx_err("%pK: HAL RING 0x%pK:error %d",