Loading nexus/WifiController.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -69,7 +69,9 @@ int WifiController::stop() { } } int WifiController::enable() { int WifiController::enable() { if (!isPoweredUp()) { if (!isPoweredUp()) { LOGI("Powering up"); sendStatusBroadcast("Powering up WiFi hardware"); sendStatusBroadcast("Powering up WiFi hardware"); if (powerUp()) { if (powerUp()) { LOGE("Powerup failed (%s)", strerror(errno)); LOGE("Powerup failed (%s)", strerror(errno)); Loading @@ -78,6 +80,7 @@ int WifiController::enable() { } } if (mModuleName[0] != '\0' && !isKernelModuleLoaded(mModuleName)) { if (mModuleName[0] != '\0' && !isKernelModuleLoaded(mModuleName)) { LOGI("Loading driver"); sendStatusBroadcast("Loading WiFi driver"); sendStatusBroadcast("Loading WiFi driver"); if (loadKernelModule(mModulePath, mModuleArgs)) { if (loadKernelModule(mModulePath, mModuleArgs)) { LOGE("Kernel module load failed (%s)", strerror(errno)); LOGE("Kernel module load failed (%s)", strerror(errno)); Loading @@ -86,6 +89,7 @@ int WifiController::enable() { } } if (!isFirmwareLoaded()) { if (!isFirmwareLoaded()) { LOGI("Loading firmware"); sendStatusBroadcast("Loading WiFI firmware"); sendStatusBroadcast("Loading WiFI firmware"); if (loadFirmware()) { if (loadFirmware()) { LOGE("Firmware load failed (%s)", strerror(errno)); LOGE("Firmware load failed (%s)", strerror(errno)); Loading @@ -94,6 +98,7 @@ int WifiController::enable() { } } if (!mSupplicant->isStarted()) { if (!mSupplicant->isStarted()) { LOGI("Starting WPA Supplicant"); sendStatusBroadcast("Starting WPA Supplicant"); sendStatusBroadcast("Starting WPA Supplicant"); if (mSupplicant->start()) { if (mSupplicant->start()) { LOGE("Supplicant start failed (%s)", strerror(errno)); LOGE("Supplicant start failed (%s)", strerror(errno)); Loading @@ -113,6 +118,7 @@ int WifiController::enable() { mPropMngr->registerProperty("wifi.scanmode", this); mPropMngr->registerProperty("wifi.scanmode", this); mPropMngr->registerProperty("wifi.interface", this); mPropMngr->registerProperty("wifi.interface", this); LOGI("Enabled successfully"); return 0; return 0; out_unloadmodule: out_unloadmodule: Loading Loading
nexus/WifiController.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -69,7 +69,9 @@ int WifiController::stop() { } } int WifiController::enable() { int WifiController::enable() { if (!isPoweredUp()) { if (!isPoweredUp()) { LOGI("Powering up"); sendStatusBroadcast("Powering up WiFi hardware"); sendStatusBroadcast("Powering up WiFi hardware"); if (powerUp()) { if (powerUp()) { LOGE("Powerup failed (%s)", strerror(errno)); LOGE("Powerup failed (%s)", strerror(errno)); Loading @@ -78,6 +80,7 @@ int WifiController::enable() { } } if (mModuleName[0] != '\0' && !isKernelModuleLoaded(mModuleName)) { if (mModuleName[0] != '\0' && !isKernelModuleLoaded(mModuleName)) { LOGI("Loading driver"); sendStatusBroadcast("Loading WiFi driver"); sendStatusBroadcast("Loading WiFi driver"); if (loadKernelModule(mModulePath, mModuleArgs)) { if (loadKernelModule(mModulePath, mModuleArgs)) { LOGE("Kernel module load failed (%s)", strerror(errno)); LOGE("Kernel module load failed (%s)", strerror(errno)); Loading @@ -86,6 +89,7 @@ int WifiController::enable() { } } if (!isFirmwareLoaded()) { if (!isFirmwareLoaded()) { LOGI("Loading firmware"); sendStatusBroadcast("Loading WiFI firmware"); sendStatusBroadcast("Loading WiFI firmware"); if (loadFirmware()) { if (loadFirmware()) { LOGE("Firmware load failed (%s)", strerror(errno)); LOGE("Firmware load failed (%s)", strerror(errno)); Loading @@ -94,6 +98,7 @@ int WifiController::enable() { } } if (!mSupplicant->isStarted()) { if (!mSupplicant->isStarted()) { LOGI("Starting WPA Supplicant"); sendStatusBroadcast("Starting WPA Supplicant"); sendStatusBroadcast("Starting WPA Supplicant"); if (mSupplicant->start()) { if (mSupplicant->start()) { LOGE("Supplicant start failed (%s)", strerror(errno)); LOGE("Supplicant start failed (%s)", strerror(errno)); Loading @@ -113,6 +118,7 @@ int WifiController::enable() { mPropMngr->registerProperty("wifi.scanmode", this); mPropMngr->registerProperty("wifi.scanmode", this); mPropMngr->registerProperty("wifi.interface", this); mPropMngr->registerProperty("wifi.interface", this); LOGI("Enabled successfully"); return 0; return 0; out_unloadmodule: out_unloadmodule: Loading