From 75260eb9e1f8f266523345174fa353e23d6b4c3a Mon Sep 17 00:00:00 2001 From: codeworkx Date: Sat, 22 Dec 2012 13:04:14 +0100 Subject: wifi: fix samsung wifi logic Change-Id: Ib065c0dffa1265a17f5e4fd6ec0b0ad36bbc7b14 --- wifi/wifi.c | 11 ++++------- 1 file 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 -- cgit v1.1