From a2bef63ea58dffd5908003540b623684181210bd Mon Sep 17 00:00:00 2001 From: Maneesh Jain Date: Wed, 15 Jul 2015 12:05:22 +0530 Subject: [PATCH] [wfd-manager]: Add support of 64 Bit based Platform This patch is required to load the plugin library for 64 bit based Target platform, Change-Id: I7cda8779d0b5ea8085b93b5a2f32f50ef61328b8 Signed-off-by: Maneesh Jain --- oem/wifi-direct-oem.h | 2 ++ packaging/wifi-direct-manager.spec | 2 +- src/wifi-direct-manager.c | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/oem/wifi-direct-oem.h b/oem/wifi-direct-oem.h index ca004c9..bdf316d 100755 --- a/oem/wifi-direct-oem.h +++ b/oem/wifi-direct-oem.h @@ -29,6 +29,8 @@ #define __WIFI_DIRECT_OEM_H__ #define SUPPL_PLUGIN_PATH "/usr/lib/wifi-direct-plugin-wpasupplicant.so" +#define SUPPL_PLUGIN_64BIT_PATH "/usr/lib64/wifi-direct-plugin-wpasupplicant.so" + #define OEM_MACSTR_LEN 18 #define OEM_MACADDR_LEN 6 diff --git a/packaging/wifi-direct-manager.spec b/packaging/wifi-direct-manager.spec index 4cbd944..6aa05b3 100755 --- a/packaging/wifi-direct-manager.spec +++ b/packaging/wifi-direct-manager.spec @@ -1,6 +1,6 @@ Name: wifi-direct-manager Summary: Wi-Fi Direct manger -Version: 1.2.85 +Version: 1.2.86 Release: 1 Group: Network & Connectivity/Wireless License: Apache-2.0 diff --git a/src/wifi-direct-manager.c b/src/wifi-direct-manager.c index f383b72..c338b40 100755 --- a/src/wifi-direct-manager.c +++ b/src/wifi-direct-manager.c @@ -1432,7 +1432,12 @@ static void *wfd_plugin_init(wfd_manager_s *manager) WDS_LOGD("Node name [%s], HW ID [%s]", kernel_info.nodename, kernel_info.machine); errno = 0; - handle = dlopen(SUPPL_PLUGIN_PATH, RTLD_NOW); + + if(strncmp(kernel_info.machine, "aarch64", 7) == 0) + handle = dlopen(SUPPL_PLUGIN_64BIT_PATH, RTLD_NOW); + else + handle = dlopen(SUPPL_PLUGIN_PATH, RTLD_NOW); + if (!handle) { WDS_LOGE("Failed to open shared object. [%s]", dlerror()); __WDS_LOG_FUNC_EXIT__; -- 2.7.4