summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pwr.c6
-rw-r--r--samsung-ril.c3
-rw-r--r--samsung-ril.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/pwr.c b/pwr.c
index 2d1718f..09241fa 100644
--- a/pwr.c
+++ b/pwr.c
@@ -38,6 +38,12 @@ void ipc_pwr_phone_pwr_up(void)
RIL_START_UNLOCK();
}
+void ipc_pwr_phone_reset(void)
+{
+ ril_data.state.radio_state = RADIO_STATE_OFF;
+ ril_request_unsolicited(RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, NULL, 0);
+}
+
/**
* In: IPC_PWR_PHONE_STATE
* Noti from the modem giving current power mode (LPM or NORMAL)
diff --git a/samsung-ril.c b/samsung-ril.c
index f79022a..1757f21 100644
--- a/samsung-ril.c
+++ b/samsung-ril.c
@@ -288,6 +288,9 @@ void ipc_fmt_dispatch(struct ipc_message_info *info)
case IPC_PWR_PHONE_PWR_UP:
ipc_pwr_phone_pwr_up();
break;
+ case IPC_PWR_PHONE_RESET:
+ ipc_pwr_phone_reset();
+ break;
case IPC_PWR_PHONE_STATE:
ipc_pwr_phone_state(info);
break;
diff --git a/samsung-ril.h b/samsung-ril.h
index 25f7539..5cbc54a 100644
--- a/samsung-ril.h
+++ b/samsung-ril.h
@@ -239,6 +239,7 @@ void ipc_gen_phone_res(struct ipc_message_info *info);
/* PWR */
void ipc_pwr_phone_pwr_up(void);
+void ipc_pwr_phone_reset(void);
void ipc_pwr_phone_state(struct ipc_message_info *info);
void ril_request_radio_power(RIL_Token t, void *data, size_t datalen);