From ebf4cded6ffdebe5904f153c44f62da20412f959 Mon Sep 17 00:00:00 2001 From: phadiman Date: Mon, 28 Jan 2019 17:50:37 +0530 Subject: [PATCH] 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 --- dp/wifi3.0/dp_rx_mon_status.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_rx_mon_status.c b/dp/wifi3.0/dp_rx_mon_status.c index 8899b8c019..7a89ec2bff 100644 --- a/dp/wifi3.0/dp_rx_mon_status.c +++ b/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; }