mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 04:59:05 -04:00
qcacld-3.0: Ignore uninitialized driver mode change
The driver mode can be dynamically controlled via the module parameter "con_mode," which triggers the callback con_mode_handler(). However, if the wlan module is loaded with a non-default con_mode, this callback handler is invoked before module init (e.g. 'insmod wlan.ko con_mode=5'). If con_mode_handler is invoked before module init, simply return success, as no processing is needed. Change-Id: Iaa426188d13507cc6c7f09a03effd881854bbf3d CRs-Fixed: 2349370
This commit is contained in:
parent
61ee8a5da2
commit
13fa987a29
1 changed files with 8 additions and 0 deletions
|
|
@ -13440,6 +13440,14 @@ static int con_mode_handler(const char *kmessage, const struct kernel_param *kp)
|
|||
|
||||
hdd_enter();
|
||||
|
||||
/* This handler will be invoked before module init when the wlan driver
|
||||
* is loaded using 'insmod wlan.ko con_mode=5' for example. Return
|
||||
* success in this case, as module init will bring up the correct
|
||||
* con_mode when it runs.
|
||||
*/
|
||||
if (hdd_driver->state == driver_state_uninit)
|
||||
return 0;
|
||||
|
||||
status = dsc_driver_trans_start_wait(hdd_driver->dsc_driver,
|
||||
"mode change");
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue