qcacld-3.0: Ignore netdev notifier when driver status is closed

when unloading driver, there is possible that the driver_status
has been DRIVER_MODULES_CLOSED, then NETDEV_GOING_DOWN is received,
which will cause assert in qdf_mutex_acquire as lock has been
destoryed.

Change-Id: Ic7e26dc1eb9a40a2462b041b0f3b84452e448cfd
CRs-Fixed: 2126832
This commit is contained in:
Jingxiang Ge 2017-10-14 17:22:15 +08:00 • committed by snandini
commit 9db9d235af

View file

@ -510,6 +510,12 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb,
QDF_ASSERT(0);
return NOTIFY_DONE;
}
if (hdd_ctx->driver_status == DRIVER_MODULES_CLOSED) {
hdd_err("%s: Driver module is closed", __func__);
return NOTIFY_DONE;
}
if (cds_is_driver_recovering() || cds_is_driver_in_bad_state())
return NOTIFY_DONE;