Make WIFI driver loading mechanism configurable 00/14500/1 accepted/tizen/ivi/release accepted/tizen/ivi/stable accepted/tizen/mobile tizen_ivi_release accepted/tizen/ivi/20140107.174301 accepted/tizen/ivi/release/20140108.223504 accepted/tizen/mobile/20140107.213344 submit/tizen/20140107.010027 submit/tizen/20140108.022417 submit/tizen_ivi_release/20140108.030118
authorChengyi Zhao <chengyi1.zhao@archermind.com>
Fri, 3 Jan 2014 04:45:46 +0000 (12:45 +0800)
committerChengyi Zhao <chengyi1.zhao@archermind.com>
Mon, 6 Jan 2014 08:43:30 +0000 (16:43 +0800)
Currently, on Samsung platform, it loads WIFI driver dynamically,
but on Intel platform, WIFI driver is loaded when system boots up.
So it needs to make the WIFI driver loading mechanism configurable
to adapt both Samsung and Intel platform.

Use the existing macro definition "EMBEDDED_TARGET" to fix this issue.

Change-Id: Iddccfc411f79284232f9d10b971ac6cd28ae75ca
Signed-off-by: Chengyi Zhao <chengyi1.zhao@archermind.com>
src/wifi-power.c

index 15ac07c..db06800 100644 (file)
@@ -121,11 +121,13 @@ static gboolean __netconfig_wifi_load_driver(void)
        if (netconfig_emulator_is_emulated() == TRUE)
                return rv;
 
+#if defined EMBEDDED_TARGET
        rv = netconfig_execute_file(path, args, envs);
        if (rv != TRUE) {
                DBG("Failed to load wireless device driver");
                return FALSE;
        }
+#endif
 
        DBG("Successfully loaded wireless device driver");
        return TRUE;
@@ -141,11 +143,13 @@ gboolean netconfig_wifi_remove_driver(void)
        if (netconfig_emulator_is_emulated() == TRUE)
                return rv;
 
+#if defined EMBEDDED_TARGET
        rv = netconfig_execute_file(path, args, env);
        if (rv != TRUE) {
                DBG("Failed to remove wireless device driver");
                return FALSE;
        }
+#endif
 
        DBG("Successfully removed wireless device driver");
        return TRUE;