qcacld-3.0: Set virtual iface flag in hdd_close_ndi()

Inadequate error handling is causing NDI create to timeout when an
error occurs and follows different function call path. This results
in the is_virtual_iface flag not being set in some scenarios and
the wrong {un}register_netdevice() kernel function being called.
Hence, set the flag in hdd_close_ndi() as well in order to avoid call
the current {un}register function.

Change-Id: I58111ce2a4a0021f4070b2d22db5d997eb2332c2
CRs-Fixed: 3184560
This commit is contained in:
Alan Chen
2022-04-27 15:55:25 -07:00
committed by Madan Koyyalamudi
parent ee94ac987a
commit 342972cb0e

View File

@@ -105,6 +105,7 @@ static int hdd_close_ndi(struct hdd_adapter *adapter)
if (errno)
hdd_err("failed to destroy vdev: %d", errno);
adapter->is_virtual_iface = true;
/* We are good to close the adapter */
hdd_close_adapter(hdd_ctx, adapter, true);