From db1863876546d1ad1beff54a571fa10607b14cf2 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Thu, 7 Mar 2013 21:33:36 +0100 Subject: pwr: Handle phone reset message Signed-off-by: Paul Kocialkowski --- pwr.c | 6 ++++++ samsung-ril.c | 3 +++ samsung-ril.h | 1 + 3 files changed, 10 insertions(+) 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); -- cgit v1.1