From ed8fecee78a8f39d2dbd369c8cc728832001482b Mon Sep 17 00:00:00 2001 From: Ananya Gupta Date: Fri, 18 Sep 2020 17:38:39 +0530 Subject: [PATCH] qcacld-3.0: Cleanup iface if net_dev changed for same vdev If adapter is changed for a particular vdev and QDF_IPA_AP_DISCONNECT event was not sent to IPA event handler when the earlier adapter went down, iface is not cleaned up. To fix this, cleaning up the interface when new interface is being setup for the same vdev and net_dev is not matching. Change-Id: Icb227df8ef31e9c2c904873559e3b33f05fc03b5 CRs-Fixed: 2777672 --- components/ipa/core/src/wlan_ipa_core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/ipa/core/src/wlan_ipa_core.c b/components/ipa/core/src/wlan_ipa_core.c index d8ec3107fc..6385cfc44e 100644 --- a/components/ipa/core/src/wlan_ipa_core.c +++ b/components/ipa/core/src/wlan_ipa_core.c @@ -1525,8 +1525,11 @@ static QDF_STATUS wlan_ipa_setup_iface(struct wlan_ipa_priv *ipa_ctx, } ipa_err("Obsolete iface %u found, device_mode %u, will remove it.", - i, - iface_context->device_mode); + i, iface_context->device_mode); + wlan_ipa_cleanup_iface(iface_context); + } else if (iface_context->session_id == session_id) { + ipa_err("Obsolete iface %u found, net_dev %pK, will remove it.", + i, iface_context->dev); wlan_ipa_cleanup_iface(iface_context); } }