From 6bc77dc9c33a0fa73d8f4bf1a54a11f655f3b090 Mon Sep 17 00:00:00 2001 From: Tiger Yu Date: Fri, 3 Jan 2020 17:30:58 +0800 Subject: [PATCH] qcacld-3.0: Do RX GRO flush when detach the vdev device If there are still RX packets pending in the napi gro_hash list, do RX GRO flush after flushing the RX thread pending packets when detach the vdev to avoid net_device might be invalid later which has been stored already in the pending skb. Change-Id: Iff0a5cf49c87b91b8cae3dbcb541d1cf0bc480a6 CRs-Fixed: 2598149 --- core/dp/txrx3.0/dp_rx_thread.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/dp/txrx3.0/dp_rx_thread.c b/core/dp/txrx3.0/dp_rx_thread.c index fa51b8b1e6..925a0288f0 100644 --- a/core/dp/txrx3.0/dp_rx_thread.c +++ b/core/dp/txrx3.0/dp_rx_thread.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2020 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 @@ -703,6 +703,11 @@ void dp_rx_thread_flush_by_vdev_id(struct dp_rx_thread *rx_thread, } } qdf_nbuf_queue_head_unlock(&rx_thread->nbuf_queue); + + if (qdf_atomic_read(&rx_thread->gro_flush_ind)) + qdf_atomic_set(&rx_thread->gro_flush_ind, 0); + + dp_rx_thread_gro_flush(rx_thread); } /**