* [PATCH] ril_sofia3gr: Add vendorize SoFiA to send modem shutdown
@ 2016-07-07 5:21 Ankit Navik
2016-07-07 17:00 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Ankit Navik @ 2016-07-07 5:21 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]
since ril_send_power request mapped with airplane mode, it should
be wrapped modem shutdown of oem hook.
---
plugins/ril_sofia3gr.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/plugins/ril_sofia3gr.c b/plugins/ril_sofia3gr.c
index f8bf2bb..bba34df 100644
--- a/plugins/ril_sofia3gr.c
+++ b/plugins/ril_sofia3gr.c
@@ -554,6 +554,9 @@ static int ril_disable(struct ofono_modem *modem)
DBusConnection *conn = ofono_dbus_get_connection();
struct ril_data *rd = ofono_modem_get_data(modem);
const char *path = ofono_modem_get_path(modem);
+ struct parcel rilp;
+ int cmd_id;
+ char buf[4];
DBG("%p", modem);
@@ -562,7 +565,17 @@ static int ril_disable(struct ofono_modem *modem)
ofono_modem_remove_interface(modem,
THERMAL_MANAGEMENT_INTERFACE);
- ril_send_power(rd->ril, FALSE, ril_send_power_off_cb, modem, NULL);
+ /* RIL_OEM_HOOK_STRING_SET_MODEM_OFF = 0x000000CF */
+ cmd_id = 0x000000CF;
+ sprintf(buf, "%d", cmd_id);
+ parcel_init(&rilp);
+ parcel_w_int32(&rilp, 1);
+ parcel_w_string(&rilp, buf);
+
+ g_ril_append_print_buf(rd->ril, "{cmd_id=0x%02X}", cmd_id);
+
+ g_ril_send(rd->ril, RIL_REQUEST_OEM_HOOK_STRINGS, &rilp,
+ ril_send_power_off_cb, modem, NULL);
return -EINPROGRESS;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ril_sofia3gr: Add vendorize SoFiA to send modem shutdown
2016-07-07 5:21 [PATCH] ril_sofia3gr: Add vendorize SoFiA to send modem shutdown Ankit Navik
@ 2016-07-07 17:00 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2016-07-07 17:00 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
Hi Ankit,
On 07/07/2016 12:21 AM, Ankit Navik wrote:
> since ril_send_power request mapped with airplane mode, it should
> be wrapped modem shutdown of oem hook.
> ---
> plugins/ril_sofia3gr.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-07 17:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-07 5:21 [PATCH] ril_sofia3gr: Add vendorize SoFiA to send modem shutdown Ankit Navik
2016-07-07 17:00 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.