summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wifi/wifi.c11
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