Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f48658d authored by San Mehat's avatar San Mehat
Browse files

nexus: Add some logging output to WifiController



Signed-off-by: default avatarSan Mehat <san@google.com>
parent 5fc4129f
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -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));
@@ -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));
@@ -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));
@@ -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));
@@ -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: