diff --git a/components/ipa/core/src/wlan_ipa_core.c b/components/ipa/core/src/wlan_ipa_core.c index 6f5cdbd3e34e..73d0328f2c3c 100644 --- a/components/ipa/core/src/wlan_ipa_core.c +++ b/components/ipa/core/src/wlan_ipa_core.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2021 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 @@ -2160,13 +2160,17 @@ static QDF_STATUS __wlan_ipa_wlan_evt(qdf_netdev_t net_dev, uint8_t device_mode, qdf_mutex_acquire(&ipa_ctx->event_lock); /* STA already connected and without disconnect, connect again - * This is Roaming scenario + * This is Roaming scenario, clean up ipa iface first, then add + * ipa iface later, sta_connected-- first, sta_connected++ + * later to reflect real sta number on DUT. */ if (ipa_ctx->sta_connected) { iface_ctx = wlan_ipa_get_iface_by_mode_netdev( ipa_ctx, net_dev, QDF_STA_MODE); - if (iface_ctx) + if (iface_ctx) { + ipa_ctx->sta_connected--; wlan_ipa_cleanup_iface(iface_ctx); + } status = wlan_ipa_send_msg(net_dev, QDF_IPA_STA_DISCONNECT, mac_addr);