diff options
author | codeworkx <codeworkx@cyanogenmod.org> | 2012-12-22 13:04:14 +0100 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-26 15:49:35 -0700 |
commit | 75260eb9e1f8f266523345174fa353e23d6b4c3a (patch) | |
tree | 1e2e3c2ade6c20d6c87b9481b722477e77e6b75f /wifi | |
parent | 88ea21bab1bd4e89819d62cbee7954120f458dcf (diff) | |
download | hardware_libhardware_legacy-75260eb9e1f8f266523345174fa353e23d6b4c3a.zip hardware_libhardware_legacy-75260eb9e1f8f266523345174fa353e23d6b4c3a.tar.gz hardware_libhardware_legacy-75260eb9e1f8f266523345174fa353e23d6b4c3a.tar.bz2 |
wifi: fix samsung wifi logic
Change-Id: Ib065c0dffa1265a17f5e4fd6ec0b0ad36bbc7b14
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/wifi.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/wifi/wifi.c b/wifi/wifi.c index fc1b400..edcce22 100644 --- a/wifi/wifi.c +++ b/wifi/wifi.c @@ -308,16 +308,13 @@ int wifi_load_driver() char module_arg2[256]; #ifdef SAMSUNG_WIFI -#ifdef WIFI_DRIVER_MODULE_AP_ARG + char* type = get_samsung_wifi_type(); + if (wifi_mode == 1) { - snprintf(module_arg2, sizeof(module_arg2), DRIVER_MODULE_AP_ARG); + snprintf(module_arg2, sizeof(module_arg2), "%s%s", DRIVER_MODULE_AP_ARG, type == NULL ? "" : type); } else { - snprintf(module_arg2, sizeof(module_arg2), DRIVER_MODULE_ARG); + snprintf(module_arg2, sizeof(module_arg2), "%s%s", DRIVER_MODULE_ARG, type == NULL ? "" : type); } -#else - char* type = get_samsung_wifi_type(); - snprintf(module_arg2, sizeof(module_arg2), "%s%s", DRIVER_MODULE_ARG, type == NULL ? "" : type); -#endif if (insmod(DRIVER_MODULE_PATH, module_arg2) < 0) { #else |