summaryrefslogtreecommitdiffstats
path: root/misc.c
diff options
context:
space:
mode:
authorJoerie de Gram <j.de.gram@gmail.com>2011-10-26 18:03:00 +0200
committerJoerie de Gram <j.de.gram@gmail.com>2011-10-29 16:26:26 +0200
commit791fd3e4a946c05d6598f5054075515df6327b7d (patch)
treee45cfbe6eb9a9ce1515c6c1cc81e50761971ad15 /misc.c
downloadhardware_ril_samsung-ril-791fd3e4a946c05d6598f5054075515df6327b7d.zip
hardware_ril_samsung-ril-791fd3e4a946c05d6598f5054075515df6327b7d.tar.gz
hardware_ril_samsung-ril-791fd3e4a946c05d6598f5054075515df6327b7d.tar.bz2
Temporary initial commit
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/misc.c b/misc.c
new file mode 100644
index 0000000..4f745eb
--- /dev/null
+++ b/misc.c
@@ -0,0 +1,29 @@
+#define LOG_TAG "RIL-MISC"
+#include <utils/Log.h>
+
+#include "samsung-ril.h"
+
+extern const struct RIL_Env *rilenv;
+extern struct radio_state radio;
+extern struct ipc_client *ipc_client;
+
+void requestBasebandVersion(RIL_Token t)
+{
+ if(radio.radio_state != RADIO_STATE_OFF) {
+ ipc_client_send_get(IPC_MISC_ME_VERSION, getRequestId(t));
+ } else {
+ radio.token_baseband_ver = t;
+ }
+}
+
+void respondBasebandVersion(struct ipc_message_info *request)
+{
+ char sw_version[33];
+ struct ipc_misc_me_version *version = (struct ipc_misc_me_version*)request->data;
+
+ memcpy(sw_version, version->sw_version, 32);
+ sw_version[32] = '\0';
+
+ RIL_onRequestComplete(getToken(request->aseq), RIL_E_SUCCESS, sw_version, sizeof(sw_version));
+}
+