From 6ddb4753ddada89607db9f4c9fdd9629744d07e0 Mon Sep 17 00:00:00 2001 From: Bala Krishna Bhamidipati Date: Wed, 16 Dec 2015 12:45:49 +0530 Subject: eap_proxy: include qmi-framework for QCCI migration qmi-framework will generate qmi_cci library needed by eap_proxy for QCCI interface APIs. add qmi-framework to PKG_CONFIG to link this library. This change will also add flags to support DSDS and eap-AKA' feature on mdm. Change-Id: Ibbf38f85f315fc0a33b190e3992cacd4843a1eea CRs-Fixed: 952339 --- src/eap_peer/eap_proxy_qmi.c | 4 ++++ wpa_supplicant/eap_proxy_qmi.mak | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/eap_peer/eap_proxy_qmi.c b/src/eap_peer/eap_proxy_qmi.c index bf3bb6af..f8c9cbda 100644 --- a/src/eap_peer/eap_proxy_qmi.c +++ b/src/eap_peer/eap_proxy_qmi.c @@ -1795,6 +1795,10 @@ static Boolean eap_proxy_build_identity(struct eap_proxy_sm *eap_proxy, u8 id, s wpa_printf(MSG_ERROR, " QMI-ERROR Unable to start the EAP session;" " error_ret=%d; qmi_err=%d\n", qmiRetCode, eap_auth_start_resp.resp.error); + if(eap_auth_start.eap_method_mask == QMI_AUTH_EAP_METHOD_MASK_AKA_PRIME_V01 && + eap_auth_start_resp.resp.error == QMI_ERR_INVALID_ARG_V01) + wpa_printf(MSG_ERROR, "QMI-ERROR AKA' not supported\n"); + return FALSE; } eap_proxy->eap_auth_session_flag[sim_num] = TRUE; diff --git a/wpa_supplicant/eap_proxy_qmi.mak b/wpa_supplicant/eap_proxy_qmi.mak index 0ed7957b..0a046f62 100644 --- a/wpa_supplicant/eap_proxy_qmi.mak +++ b/wpa_supplicant/eap_proxy_qmi.mak @@ -1,12 +1,19 @@ CFLAGS += -DSIM_AKA_IDENTITY_IMSI CFLAGS += -DSIM_AKA_IMSI_RAW_ENABLED -CFLAGS += $(shell $(PKG_CONFIG) --cflags qmi) +CFLAGS += $(shell $(PKG_CONFIG) --cflags qmi qmi-framework) -LIBS += $(shell $(PKG_CONFIG) --libs qmi) +LIBS += $(shell $(PKG_CONFIG) --libs qmi qmi-framework) -lpthread # EAP-AKA' (enable CONFIG_PCSC, if EAP-AKA' is used). # This requires CONFIG_EAP_AKA to be enabled, too. # This is supported only in B Family devices. CONFIG_EAP_AKA_PRIME=y +ifdef CONFIG_EAP_PROXY_AKA_PRIME +CFLAGS += -DCONFIG_EAP_PROXY_AKA_PRIME +endif + +ifdef CONFIG_EAP_PROXY_DUAL_SIM +CFLAGS += -DCONFIG_EAP_PROXY_DUAL_SIM +endif -- cgit v1.2.3 From 510ef590c404bce9eb30112db584f13f71cfbac0 Mon Sep 17 00:00:00 2001 From: Amarnath Hullur Subramanyam Date: Thu, 24 Mar 2016 15:27:40 -0700 Subject: eap_proxy: Add gettid syscall wrapper gettid system calls doesn't have a wrapper in glibc. Bionic library provides wrapper so there is no issue in Android platform however non-Android platform throws linker error. This commit addresses this by implementing a wrapper of gettid. Change-Id: I996d8aa8ed21fabbefa9190c1132362e7b92e877 CRs-Fixed: 994742 --- src/eap_peer/eap_proxy_qmi.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/eap_peer/eap_proxy_qmi.c b/src/eap_peer/eap_proxy_qmi.c index f8c9cbda..f0442d39 100644 --- a/src/eap_peer/eap_proxy_qmi.c +++ b/src/eap_peer/eap_proxy_qmi.c @@ -49,6 +49,8 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif #endif #include +#include +#include #define IMSI_LENGTH 15 #define WPA_UIM_QMI_EVENT_MASK_CARD_STATUS \ @@ -81,6 +83,21 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define EAP_PROXY_TARGET_FUSION4_5_PCIE "fusion4_5_pcie" #define EAP_PROXY_BASEBAND_VALUE_UNDEFINED "undefined" +#ifndef ANDROID +#ifdef SYS_gettid +static inline pid_t gettid(void) +{ + return syscall(SYS_gettid); +} +#else +static inline pid_t gettid(void) +{ + return -1; +} +#endif +#endif + + static void eap_proxy_eapol_sm_set_bool(struct eap_proxy_sm *sm, enum eapol_bool_var var, Boolean value); static Boolean eap_proxy_eapol_sm_get_bool(struct eap_proxy_sm *sm, -- cgit v1.2.3