summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2012-09-06 22:09:08 +0200
committerPaul Kocialkowski <contact@paulk.fr>2012-09-06 22:09:08 +0200
commitb0dfba56bf5eb32f30efa4f95818fee9afeba7f5 (patch)
tree138ab7905b6a3a7d832b221ae748bb1710d994ff
parent481dc355f29f8f185e36acc900bcf9d23e4e4c00 (diff)
downloadhardware_ril_samsung-ril-b0dfba56bf5eb32f30efa4f95818fee9afeba7f5.zip
hardware_ril_samsung-ril-b0dfba56bf5eb32f30efa4f95818fee9afeba7f5.tar.gz
hardware_ril_samsung-ril-b0dfba56bf5eb32f30efa4f95818fee9afeba7f5.tar.bz2
Stick to the latest libsamsung-ipc changes
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r--net.c36
-rw-r--r--samsung-ril.c4
-rw-r--r--samsung-ril.h12
-rw-r--r--sec.c112
4 files changed, 83 insertions, 81 deletions
diff --git a/net.c b/net.c
index c22451d..3d33253 100644
--- a/net.c
+++ b/net.c
@@ -161,7 +161,7 @@ unsigned char ril2ipc_plmn_sel(int mode)
/**
* Converts IPC reg state to Android format
*/
-void ipc2ril_reg_state_resp(struct ipc_net_regist *netinfo, char *response[15])
+void ipc2ril_reg_state_resp(struct ipc_net_regist_response *netinfo, char *response[15])
{
unsigned char reg_state = ipc2ril_reg_state(netinfo->reg_state);
unsigned char act = ipc2ril_act(netinfo->act);
@@ -177,7 +177,7 @@ void ipc2ril_reg_state_resp(struct ipc_net_regist *netinfo, char *response[15])
/**
* Converts IPC GPRS reg state to Android format
*/
-void ipc2ril_gprs_reg_state_resp(struct ipc_net_regist *netinfo, char *response[4])
+void ipc2ril_gprs_reg_state_resp(struct ipc_net_regist_response *netinfo, char *response[4])
{
unsigned char reg_state = ipc2ril_reg_state(netinfo->reg_state);
unsigned char act = ipc2ril_gprs_act(netinfo->act);
@@ -385,7 +385,7 @@ void ril_request_operator(RIL_Token t)
void ipc_net_current_plmn(struct ipc_message_info *message)
{
RIL_Token t = reqGetToken(message->aseq);
- struct ipc_net_current_plmn *plmndata = (struct ipc_net_current_plmn *) message->data;
+ struct ipc_net_current_plmn_response *plmndata = (struct ipc_net_current_plmn_response *) message->data;
char *response[3];
size_t i;
@@ -400,7 +400,7 @@ void ipc_net_current_plmn(struct ipc_message_info *message)
ril_state.netinfo.reg_state == IPC_NET_REGISTRATION_STATE_UNKNOWN ||
ril_state.netinfo.reg_state > IPC_NET_REGISTRATION_STATE_ROAMING) {
/* Better keeping it up to date */
- memcpy(&(ril_state.plmndata), plmndata, sizeof(struct ipc_net_current_plmn));
+ memcpy(&(ril_state.plmndata), plmndata, sizeof(struct ipc_net_current_plmn_response));
return;
} else {
@@ -409,7 +409,7 @@ void ipc_net_current_plmn(struct ipc_message_info *message)
return;
}
- memcpy(&(ril_state.plmndata), plmndata, sizeof(struct ipc_net_current_plmn));
+ memcpy(&(ril_state.plmndata), plmndata, sizeof(struct ipc_net_current_plmn_response));
/* we already told RILJ to get the new data but it wasn't done yet */
if(ril_tokens_net_get_data_waiting() && ril_state.tokens.operator == RIL_TOKEN_DATA_WAITING) {
@@ -429,7 +429,7 @@ void ipc_net_current_plmn(struct ipc_message_info *message)
ril_state.netinfo.reg_state == IPC_NET_REGISTRATION_STATE_UNKNOWN ||
ril_state.netinfo.reg_state > IPC_NET_REGISTRATION_STATE_ROAMING) {
/* Better keeping it up to date */
- memcpy(&(ril_state.plmndata), plmndata, sizeof(struct ipc_net_current_plmn));
+ memcpy(&(ril_state.plmndata), plmndata, sizeof(struct ipc_net_current_plmn_response));
RIL_onRequestComplete(t, RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW, NULL, 0);
@@ -441,7 +441,7 @@ void ipc_net_current_plmn(struct ipc_message_info *message)
LOGE("Operator tokens mismatch");
/* Better keeping it up to date */
- memcpy(&(ril_state.plmndata), plmndata, sizeof(struct ipc_net_current_plmn));
+ memcpy(&(ril_state.plmndata), plmndata, sizeof(struct ipc_net_current_plmn_response));
ril_plmn_string(plmndata->plmn, response);
@@ -497,7 +497,7 @@ void ril_request_registration_state(RIL_Token t)
/* Request data to the modem */
ril_state.tokens.registration_state = t;
- ipc_net_regist_setup(&regist_req, IPC_NET_SERVICE_DOMAIN_GSM);
+ ipc_net_regist_get_setup(&regist_req, IPC_NET_SERVICE_DOMAIN_GSM);
ipc_fmt_send(IPC_NET_REGIST, IPC_TYPE_GET, (void *)&regist_req, sizeof(struct ipc_net_regist_get), reqGetId(t));
} else {
LOGE("Another request is going on, returning UNSOL data");
@@ -550,7 +550,7 @@ void ril_request_gprs_registration_state(RIL_Token t)
/* Request data to the modem */
ril_state.tokens.gprs_registration_state = t;
- ipc_net_regist_setup(&regist_req, IPC_NET_SERVICE_DOMAIN_GPRS);
+ ipc_net_regist_get_setup(&regist_req, IPC_NET_SERVICE_DOMAIN_GPRS);
ipc_fmt_send(IPC_NET_REGIST, IPC_TYPE_GET, (void *)&regist_req, sizeof(struct ipc_net_regist_get), reqGetId(t));
} else {
LOGE("Another request is going on, returning UNSOL data");
@@ -571,8 +571,8 @@ void ril_request_gprs_registration_state(RIL_Token t)
void ipc_net_regist_unsol(struct ipc_message_info *message)
{
- struct ipc_net_regist *netinfo;
- netinfo = (struct ipc_net_regist *) message->data;
+ struct ipc_net_regist_response *netinfo;
+ netinfo = (struct ipc_net_regist_response *) message->data;
LOGD("Got UNSOL NetRegist message");
@@ -583,7 +583,7 @@ void ipc_net_regist_unsol(struct ipc_message_info *message)
return;
}
- memcpy(&(ril_state.netinfo), netinfo, sizeof(struct ipc_net_regist));
+ memcpy(&(ril_state.netinfo), netinfo, sizeof(struct ipc_net_regist_response));
/* we already told RILJ to get the new data but it wasn't done yet */
if(ril_tokens_net_get_data_waiting() && ril_state.tokens.registration_state == RIL_TOKEN_DATA_WAITING) {
@@ -600,7 +600,7 @@ void ipc_net_regist_unsol(struct ipc_message_info *message)
return;
}
- memcpy(&(ril_state.gprs_netinfo), netinfo, sizeof(struct ipc_net_regist));
+ memcpy(&(ril_state.gprs_netinfo), netinfo, sizeof(struct ipc_net_regist_response));
/* we already told RILJ to get the new data but it wasn't done yet */
if(ril_tokens_net_get_data_waiting() && ril_state.tokens.gprs_registration_state == RIL_TOKEN_DATA_WAITING) {
@@ -623,7 +623,7 @@ void ipc_net_regist_sol(struct ipc_message_info *message)
char *response[4];
size_t i;
- struct ipc_net_regist *netinfo = (struct ipc_net_regist *) message->data;
+ struct ipc_net_regist_response *netinfo = (struct ipc_net_regist_response *) message->data;
RIL_Token t = reqGetToken(message->aseq);
LOGD("Got SOL NetRegist message");
@@ -634,7 +634,7 @@ void ipc_net_regist_sol(struct ipc_message_info *message)
LOGE("Registration state tokens mismatch");
/* Better keeping it up to date */
- memcpy(&(ril_state.netinfo), netinfo, sizeof(struct ipc_net_regist));
+ memcpy(&(ril_state.netinfo), netinfo, sizeof(struct ipc_net_regist_response));
ipc2ril_reg_state_resp(netinfo, response);
@@ -653,7 +653,7 @@ void ipc_net_regist_sol(struct ipc_message_info *message)
LOGE("GPRS registration state tokens mismatch");
/* Better keeping it up to date */
- memcpy(&(ril_state.gprs_netinfo), netinfo, sizeof(struct ipc_net_regist));
+ memcpy(&(ril_state.gprs_netinfo), netinfo, sizeof(struct ipc_net_regist_response));
ipc2ril_gprs_reg_state_resp(netinfo, response);
@@ -834,7 +834,7 @@ void ril_request_set_network_selection_automatic(RIL_Token t)
{
struct ipc_net_plmn_sel_set plmn_sel;
- ipc_net_plmn_sel_setup(&plmn_sel, IPC_NET_PLMN_SEL_AUTO, NULL, IPC_NET_ACCESS_TECHNOLOGY_UNKNOWN);
+ ipc_net_plmn_sel_set_setup(&plmn_sel, IPC_NET_PLMN_SEL_AUTO, NULL, IPC_NET_ACCESS_TECHNOLOGY_UNKNOWN);
ipc_gen_phone_res_expect_to_func(reqGetId(t), IPC_NET_PLMN_SEL, ipc_net_plmn_sel_complete);
@@ -846,7 +846,7 @@ void ril_request_set_network_selection_manual(RIL_Token t, void *data, size_t da
struct ipc_net_plmn_sel_set plmn_sel;
// FIXME: We always assume UMTS capability
- ipc_net_plmn_sel_setup(&plmn_sel, IPC_NET_PLMN_SEL_MANUAL, data, IPC_NET_ACCESS_TECHNOLOGY_UMTS);
+ ipc_net_plmn_sel_set_setup(&plmn_sel, IPC_NET_PLMN_SEL_MANUAL, data, IPC_NET_ACCESS_TECHNOLOGY_UMTS);
ipc_gen_phone_res_expect_to_func(reqGetId(t), IPC_NET_PLMN_SEL, ipc_net_plmn_sel_complete);
diff --git a/samsung-ril.c b/samsung-ril.c
index f3332be..047c3d5 100644
--- a/samsung-ril.c
+++ b/samsung-ril.c
@@ -218,8 +218,8 @@ void ipc_fmt_dispatch(struct ipc_message_info *info)
ipc_ss_ussd(info);
break;
/* SEC */
- case IPC_SEC_PIN_STATUS:
- ipc_sec_pin_status(info);
+ case IPC_SEC_SIM_STATUS:
+ ipc_sec_sim_status(info);
break;
case IPC_SEC_LOCK_INFO:
ipc_sec_lock_info(info);
diff --git a/samsung-ril.h b/samsung-ril.h
index e37fc35..6072586 100644
--- a/samsung-ril.h
+++ b/samsung-ril.h
@@ -174,12 +174,12 @@ struct ril_state {
struct ril_tokens tokens;
- struct ipc_sec_pin_status_response sim_pin_status;
+ struct ipc_sec_sim_status_response sim_pin_status;
struct ipc_sec_sim_icc_type sim_type;
- struct ipc_net_regist netinfo;
- struct ipc_net_regist gprs_netinfo;
- struct ipc_net_current_plmn plmndata;
+ struct ipc_net_regist_response netinfo;
+ struct ipc_net_regist_response gprs_netinfo;
+ struct ipc_net_current_plmn_response plmndata;
struct ipc_call_status call_status;
@@ -253,11 +253,11 @@ void ipc_ss_ussd(struct ipc_message_info *info);
/* SEC */
void ril_state_update(SIM_Status status);
-void ipc_sec_pin_status(struct ipc_message_info *info);
+void ipc_sec_sim_status(struct ipc_message_info *info);
void ril_request_get_sim_status(RIL_Token t);
void ril_request_sim_io(RIL_Token t, void *data, size_t datalen);
void ipc_sec_rsim_access(struct ipc_message_info *info);
-void ipc_sec_pin_status_complete(struct ipc_message_info *info);
+void ipc_sec_sim_status_complete(struct ipc_message_info *info);
void ipc_sec_lock_info(struct ipc_message_info *info);
void ril_request_enter_sim_pin(RIL_Token t, void *data, size_t datalen);
void ril_request_change_sim_pin(RIL_Token t, void *data, size_t datalen);
diff --git a/sec.c b/sec.c
index a9abb03..fefe5ed 100644
--- a/sec.c
+++ b/sec.c
@@ -25,44 +25,46 @@
#include "samsung-ril.h"
#include "util.h"
-SIM_Status ipc2ril_sim_status(struct ipc_sec_pin_status_response *pin_status)
+SIM_Status ipc2ril_sim_status(struct ipc_sec_sim_status_response *pin_status)
{
- switch(pin_status->type) {
- case IPC_SEC_PIN_SIM_INITIALIZING:
+ switch(pin_status->status) {
+ case IPC_SEC_SIM_STATUS_INITIALIZING:
return SIM_NOT_READY;
- case IPC_SEC_PIN_SIM_LOCK_SC:
- switch(pin_status->key) {
- case IPC_SEC_PIN_SIM_LOCK_SC_PIN1_REQ:
+ case IPC_SEC_SIM_STATUS_LOCK_SC:
+ switch(pin_status->facility_lock) {
+ case IPC_SEC_FACILITY_LOCK_TYPE_SC_UNLOCKED:
+ return SIM_READY;
+ case IPC_SEC_FACILITY_LOCK_TYPE_SC_PIN1_REQ:
return SIM_PIN;
- case IPC_SEC_PIN_SIM_LOCK_SC_PUK_REQ:
+ case IPC_SEC_FACILITY_LOCK_TYPE_SC_PUK_REQ:
return SIM_PUK;
- case IPC_SEC_PIN_SIM_LOCK_SC_CARD_BLOCKED:
+ case IPC_SEC_FACILITY_LOCK_TYPE_SC_CARD_BLOCKED:
return SIM_BLOCKED;
default:
- LOGE("%s: unknown SC substate %d --> setting SIM_ABSENT", __FUNCTION__, pin_status->key);
+ LOGE("%s: unknown SC substate %d --> setting SIM_ABSENT", __FUNCTION__, pin_status->facility_lock);
return SIM_ABSENT;
}
break;
- case IPC_SEC_PIN_SIM_LOCK_FD:
+ case IPC_SEC_SIM_STATUS_LOCK_FD:
LOGE("%s: FD lock present (unhandled state --> setting SIM_ABSENT)", __FUNCTION__);
return SIM_ABSENT;
- case IPC_SEC_PIN_SIM_LOCK_PN:
+ case IPC_SEC_SIM_STATUS_LOCK_PN:
return SIM_NETWORK_PERSO;
- case IPC_SEC_PIN_SIM_LOCK_PU:
+ case IPC_SEC_SIM_STATUS_LOCK_PU:
return SIM_NETWORK_SUBSET_PERSO;
- case IPC_SEC_PIN_SIM_LOCK_PP:
+ case IPC_SEC_SIM_STATUS_LOCK_PP:
return SIM_SERVICE_PROVIDER_PERSO;
- case IPC_SEC_PIN_SIM_LOCK_PC:
+ case IPC_SEC_SIM_STATUS_LOCK_PC:
return SIM_CORPORATE_PERSO;
- case IPC_SEC_PIN_SIM_INIT_COMPLETE:
+ case IPC_SEC_SIM_STATUS_INIT_COMPLETE:
return SIM_READY;
- case IPC_SEC_PIN_SIM_PB_INIT_COMPLETE:
+ case IPC_SEC_SIM_STATUS_PB_INIT_COMPLETE:
/* Ignore phone book init complete */
return ril_state.sim_status;
- case IPC_SEC_PIN_SIM_SIM_LOCK_REQUIRED:
- case IPC_SEC_PIN_SIM_INSIDE_PF_ERROR:
- case IPC_SEC_PIN_SIM_CARD_NOT_PRESENT:
- case IPC_SEC_PIN_SIM_CARD_ERROR:
+ case IPC_SEC_SIM_STATUS_SIM_LOCK_REQUIRED:
+ case IPC_SEC_SIM_STATUS_INSIDE_PF_ERROR:
+ case IPC_SEC_SIM_STATUS_CARD_NOT_PRESENT:
+ case IPC_SEC_SIM_STATUS_CARD_ERROR:
default:
/* Catchall for locked, card error and unknown states */
return SIM_ABSENT;
@@ -116,7 +118,7 @@ void ril_state_update(SIM_Status status)
RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, NULL, 0);
}
-void ipc2ril_card_status(struct ipc_sec_pin_status_response *pin_status, RIL_CardStatus *card_status)
+void ipc2ril_card_status(struct ipc_sec_sim_status_response *pin_status, RIL_CardStatus *card_status)
{
SIM_Status sim_status;
int app_status_array_length;
@@ -196,7 +198,7 @@ void ril_tokens_pin_status_dump(void)
}
/**
- * In: IPC_SEC_PIN_STATUS
+ * In: IPC_SEC_SIM_STATUS
* Provides SIM initialization/lock status
*
* Out: RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
@@ -207,10 +209,10 @@ void ril_tokens_pin_status_dump(void)
* Indicate when value of RIL_RadioState has changed
* Callee will invoke RIL_RadioStateRequest method on main thread
*/
-void ipc_sec_pin_status(struct ipc_message_info *info)
+void ipc_sec_sim_status(struct ipc_message_info *info)
{
RIL_Token t = reqGetToken(info->aseq);
- struct ipc_sec_pin_status_response *pin_status = (struct ipc_sec_pin_status_response *) info->data;
+ struct ipc_sec_sim_status_response *pin_status = (struct ipc_sec_sim_status_response *) info->data;
RIL_CardStatus card_status;
SIM_Status sim_status;
@@ -235,7 +237,7 @@ void ipc_sec_pin_status(struct ipc_message_info *info)
sim_status = ipc2ril_sim_status(pin_status);
ril_state_update(sim_status);
- memcpy(&(ril_state.sim_pin_status), pin_status, sizeof(struct ipc_sec_pin_status_response));
+ memcpy(&(ril_state.sim_pin_status), pin_status, sizeof(struct ipc_sec_sim_status_response));
ril_state.tokens.pin_status = RIL_TOKEN_DATA_WAITING;
RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, NULL, 0);
@@ -250,7 +252,7 @@ void ipc_sec_pin_status(struct ipc_message_info *info)
ril_state_update(sim_status);
// Better keeping this up to date
- memcpy(&(ril_state.sim_pin_status), pin_status, sizeof(struct ipc_sec_pin_status_response));
+ memcpy(&(ril_state.sim_pin_status), pin_status, sizeof(struct ipc_sec_sim_status_response));
ipc2ril_card_status(pin_status, &card_status);
RIL_onRequestComplete(t, RIL_E_SUCCESS, &card_status, sizeof(RIL_CardStatus));
@@ -272,13 +274,13 @@ void ipc_sec_pin_status(struct ipc_message_info *info)
*/
void ril_request_get_sim_status(RIL_Token t)
{
- struct ipc_sec_pin_status_response *pin_status;
+ struct ipc_sec_sim_status_response *pin_status;
RIL_CardStatus card_status;
SIM_Status sim_status;
if(ril_state.tokens.pin_status == RIL_TOKEN_DATA_WAITING) {
LOGD("Got RILJ request for UNSOL data");
- hex_dump(&(ril_state.sim_pin_status), sizeof(struct ipc_sec_pin_status_response));
+ hex_dump(&(ril_state.sim_pin_status), sizeof(struct ipc_sec_sim_status_response));
pin_status = &(ril_state.sim_pin_status);
ipc2ril_card_status(pin_status, &card_status);
@@ -292,7 +294,7 @@ void ril_request_get_sim_status(RIL_Token t)
/* Request data to the modem */
ril_state.tokens.pin_status = t;
- ipc_fmt_send_get(IPC_SEC_PIN_STATUS, reqGetId(t));
+ ipc_fmt_send_get(IPC_SEC_SIM_STATUS, reqGetId(t));
} else {
LOGE("Another request is going on, returning UNSOL data");
@@ -319,7 +321,7 @@ void ril_request_sim_io(RIL_Token t, void *data, size_t datalen)
{
const RIL_SIM_IO *sim_io;
unsigned char message[262];
- struct ipc_sec_rsim_access_request *rsim_data;
+ struct ipc_sec_rsim_access_get *rsim_data;
unsigned char *rsim_payload;
int payload_length;
@@ -328,7 +330,7 @@ void ril_request_sim_io(RIL_Token t, void *data, size_t datalen)
rsim_payload = message + sizeof(*rsim_data);
/* Set up RSIM header */
- rsim_data = (struct ipc_sec_rsim_access_request*)message;
+ rsim_data = (struct ipc_sec_rsim_access_get*)message;
rsim_data->command = sim_io->command;
rsim_data->fileid = sim_io->fileid;
rsim_data->p1 = sim_io->p1;
@@ -384,12 +386,12 @@ void ipc_sec_rsim_access(struct ipc_message_info *info)
/**
* In: IPC_GEN_PHONE_RES
- * Provides result of IPC_SEC_PIN_STATUS SET
+ * Provides result of IPC_SEC_SIM_STATUS SET
*
* Out: RIL_REQUEST_ENTER_SIM_PIN
* Returns PIN SIM unlock result
*/
-void ipc_sec_pin_status_complete(struct ipc_message_info *info)
+void ipc_sec_sim_status_complete(struct ipc_message_info *info)
{
struct ipc_gen_phone_res *phone_res = (struct ipc_gen_phone_res *) info->data;
int rc;
@@ -443,7 +445,7 @@ void ipc_sec_lock_info(struct ipc_message_info *info)
* In: RIL_REQUEST_ENTER_SIM_PIN
* Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
*
- * Out: IPC_SEC_PIN_STATUS SET
+ * Out: IPC_SEC_SIM_STATUS SET
* Attempts to unlock SIM PIN1
*
* Out: IPC_SEC_LOCK_INFO
@@ -463,10 +465,10 @@ void ril_request_enter_sim_pin(RIL_Token t, void *data, size_t datalen)
ipc_sec_pin_status_set_setup(&pin_status, IPC_SEC_PIN_TYPE_PIN1, pin, NULL);
- ipc_gen_phone_res_expect_to_func(reqGetId(t), IPC_SEC_PIN_STATUS,
- ipc_sec_pin_status_complete);
+ ipc_gen_phone_res_expect_to_func(reqGetId(t), IPC_SEC_SIM_STATUS,
+ ipc_sec_sim_status_complete);
- ipc_fmt_send_set(IPC_SEC_PIN_STATUS, reqGetId(t), (unsigned char *) &pin_status, sizeof(pin_status));
+ ipc_fmt_send_set(IPC_SEC_SIM_STATUS, reqGetId(t), (unsigned char *) &pin_status, sizeof(pin_status));
/* 2. Get lock status */
// FIXME: This is not clean at all
@@ -485,7 +487,7 @@ void ril_request_change_sim_pin(RIL_Token t, void *data, size_t datalen)
memset(&locking_pw, 0, sizeof(locking_pw));
- locking_pw.type = IPC_SEC_PIN_SIM_LOCK_SC;
+ locking_pw.facility = IPC_SEC_SIM_STATUS_LOCK_SC;
locking_pw.length_new = strlen(password_new) > sizeof(locking_pw.password_new)
? sizeof(locking_pw.password_new)
@@ -500,7 +502,7 @@ void ril_request_change_sim_pin(RIL_Token t, void *data, size_t datalen)
memcpy(locking_pw.password_old, password_old, locking_pw.length_old);
ipc_gen_phone_res_expect_to_func(reqGetId(t), IPC_SEC_CHANGE_LOCKING_PW,
- ipc_sec_pin_status_complete);
+ ipc_sec_sim_status_complete);
ipc_fmt_send_set(IPC_SEC_CHANGE_LOCKING_PW, reqGetId(t), (unsigned char *) &locking_pw, sizeof(locking_pw));
}
@@ -513,10 +515,10 @@ void ril_request_enter_sim_puk(RIL_Token t, void *data, size_t datalen)
ipc_sec_pin_status_set_setup(&pin_status, IPC_SEC_PIN_TYPE_PIN1, pin, puk);
- ipc_gen_phone_res_expect_to_func(reqGetId(t), IPC_SEC_PIN_STATUS,
- ipc_sec_pin_status_complete);
+ ipc_gen_phone_res_expect_to_func(reqGetId(t), IPC_SEC_SIM_STATUS,
+ ipc_sec_sim_status_complete);
- ipc_fmt_send_set(IPC_SEC_PIN_STATUS, reqGetId(t), (unsigned char *) &pin_status, sizeof(pin_status));
+ ipc_fmt_send_set(IPC_SEC_SIM_STATUS, reqGetId(t), (unsigned char *) &pin_status, sizeof(pin_status));
}
/**
@@ -548,17 +550,17 @@ void ril_request_query_facility_lock(RIL_Token t, void *data, size_t datalen)
char *facility = ((char **) data)[0];
if(!strcmp(facility, "SC")) {
- lock_request.type = IPC_SEC_PIN_SIM_LOCK_SC;
+ lock_request.facility = IPC_SEC_FACILITY_TYPE_SC;
} else if(!strcmp(facility, "FD")) {
- lock_request.type = IPC_SEC_PIN_SIM_LOCK_FD;
+ lock_request.facility = IPC_SEC_FACILITY_TYPE_FD;
} else if(!strcmp(facility, "PN")) {
- lock_request.type = IPC_SEC_PIN_SIM_LOCK_PN;
+ lock_request.facility = IPC_SEC_FACILITY_TYPE_PN;
} else if(!strcmp(facility, "PU")) {
- lock_request.type = IPC_SEC_PIN_SIM_LOCK_PU;
+ lock_request.facility = IPC_SEC_FACILITY_TYPE_PU;
} else if(!strcmp(facility, "PP")) {
- lock_request.type = IPC_SEC_PIN_SIM_LOCK_PP;
+ lock_request.facility = IPC_SEC_FACILITY_TYPE_PP;
} else if(!strcmp(facility, "PC")) {
- lock_request.type = IPC_SEC_PIN_SIM_LOCK_PC;
+ lock_request.facility = IPC_SEC_FACILITY_TYPE_PC;
} else {
LOGE("%s: unsupported facility: %s", __FUNCTION__, facility);
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
@@ -568,7 +570,7 @@ void ril_request_query_facility_lock(RIL_Token t, void *data, size_t datalen)
// Both functions were the same
#define ipc_sec_phone_lock_complete \
- ipc_sec_pin_status_complete
+ ipc_sec_sim_status_complete
/**
* In: RIL_REQUEST_SET_FACILITY_LOCK
@@ -588,17 +590,17 @@ void ril_request_set_facility_lock(RIL_Token t, void *data, size_t datalen)
memset(&lock_request, 0, sizeof(lock_request));
if(!strcmp(facility, "SC")) {
- lock_request.type = IPC_SEC_PIN_SIM_LOCK_SC;
+ lock_request.type = IPC_SEC_SIM_STATUS_LOCK_SC;
} else if(!strcmp(facility, "FD")) {
- lock_request.type = IPC_SEC_PIN_SIM_LOCK_FD;
+ lock_request.type = IPC_SEC_SIM_STATUS_LOCK_FD;
} else if(!strcmp(facility, "PN")) {
- lock_request.type = IPC_SEC_PIN_SIM_LOCK_PN;
+ lock_request.type = IPC_SEC_SIM_STATUS_LOCK_PN;
} else if(!strcmp(facility, "PU")) {
- lock_request.type = IPC_SEC_PIN_SIM_LOCK_PU;
+ lock_request.type = IPC_SEC_SIM_STATUS_LOCK_PU;
} else if(!strcmp(facility, "PP")) {
- lock_request.type = IPC_SEC_PIN_SIM_LOCK_PP;
+ lock_request.type = IPC_SEC_SIM_STATUS_LOCK_PP;
} else if(!strcmp(facility, "PC")) {
- lock_request.type = IPC_SEC_PIN_SIM_LOCK_PC;
+ lock_request.type = IPC_SEC_SIM_STATUS_LOCK_PC;
} else {
LOGE("%s: unsupported facility: %s", __FUNCTION__, facility);
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);