diff options
| author | Dustin Brown <dustinb@codeaurora.org> | 2017-01-26 12:01:32 -0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-01-28 04:50:08 -0800 |
| commit | 0ed4825e0c0f3259ae4091710011ca3d330e9af4 (patch) | |
| tree | db39ff2818cffc779f10cf031f15acae677e1991 | |
| parent | 076f34dd478c87cd102ead15384f88862ac90290 (diff) | |
qcacld-3.0: Reject Reg Notifier call if module is closed
Under situations where the driver detects wifi capabilities are not
being used, it cleans itself up transparently to the kernel and shuts
down. The kernel has been observed calling the reg notifier callback in
these situations, even though no virtual devices are active, which
causes a crash. Gracefully reject the calls into reg notifier by the
kernel in such cases.
Change-Id: I11e68c2224a7abf079d04c92d671f5db0804283e
CRs-Fixed: 1116475
| -rw-r--r-- | core/hdd/src/wlan_hdd_regulatory.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c index 64de8caf969a..83dcf4c7465c 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -629,6 +629,11 @@ void hdd_reg_notifier(struct wiphy *wiphy, return; } + if (hdd_ctx->driver_status == DRIVER_MODULES_CLOSED) { + hdd_err("Driver module is closed; dropping request"); + return; + } + if (hdd_ctx->isWiphySuspended == true) { hdd_err("%s: system/cfg80211 is already suspend", __func__); return; |
