summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2012-12-22 13:04:14 +0100
committercodeworkx <codeworkx@cyanogenmod.org>2012-12-22 13:11:55 +0100
commit4db603d7d6610145e5e782a7051dc668a8acfc88 (patch)
tree4ef92f402336ebf317dd47210f31f5941e5eb1b2
parentc4392efa0270620ac64c967ada82e47d59484f1a (diff)
downloadhardware_libhardware_legacy-4db603d7d6610145e5e782a7051dc668a8acfc88.tar.gz
hardware_libhardware_legacy-4db603d7d6610145e5e782a7051dc668a8acfc88.tar.bz2
hardware_libhardware_legacy-4db603d7d6610145e5e782a7051dc668a8acfc88.zip
wifi: fix samsung wifi logic
Change-Id: Ib065c0dffa1265a17f5e4fd6ec0b0ad36bbc7b14
-rw-r--r--wifi/wifi.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/wifi/wifi.c b/wifi/wifi.c
index e9b1764..b21bfb4 100644
--- a/wifi/wifi.c
+++ b/wifi/wifi.c
@@ -279,16 +279,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