aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/call.h4
-rw-r--r--include/gprs.h73
-rw-r--r--include/radio.h14
-rw-r--r--include/rfs.h4
4 files changed, 63 insertions, 32 deletions
diff --git a/include/call.h b/include/call.h
index 8536b28..94b9565 100644
--- a/include/call.h
+++ b/include/call.h
@@ -64,6 +64,10 @@
#define IPC_CALL_LIST_ENTRY_STATE_INCOMING 0x05
#define IPC_CALL_LIST_ENTRY_STATE_WAITING 0x06
+#define IPC_CALL_END_CAUSE_NORMAL 0x05
+#define IPC_CALL_END_CAUSE_REJECTED 0x2F
+#define IPC_CALL_END_CAUSE_UNSPECIFIED 0x10
+
#define IPC_CALL_TERM_MO 0x01
#define IPC_CALL_TERM_MT 0x02
diff --git a/include/gprs.h b/include/gprs.h
index 600ad2e..1f3f99a 100644
--- a/include/gprs.h
+++ b/include/gprs.h
@@ -30,7 +30,6 @@
#define IPC_GPRS_MS_CLASS 0x0D07
#define IPC_GPRS_3G_QUAL_SERVICE_PROFILE 0x0D08
#define IPC_GPRS_IP_CONFIGURATION 0x0D09
-#define IPC_GPRS_PORT_LIST 0x0D11
#define IPC_GPRS_DEFINE_SEC_PDP_CONTEXT 0x0D0A
#define IPC_GPRS_TFT 0x0D0B
#define IPC_GPRS_HSDPA_STATUS 0x0D0C
@@ -38,20 +37,54 @@
#define IPC_GPRS_DATA_DORMANT 0x0D0E
#define IPC_GPRS_DUN_PIN_CTRL 0x0D0F
#define IPC_GPRS_CALL_STATUS 0x0D10
+#define IPC_GPRS_PORT_LIST 0x0D11
-#define IPC_GPRS_CALL_STATUS_TYPE_ON 0x0
-#define IPC_GPRS_CALL_STATUS_TYPE_OFF 0x3
+#define IPC_GPRS_STATE_NOT_ENABLED 0x00
+#define IPC_GPRS_STATE_ENABLED 0x01
+#define IPC_GPRS_STATE_DISABLED 0x03
-#define IPC_GPRS_ERROR_UNAVAILABLE 0x94
-#define IPC_GPRS_ERROR_NOT_SUBSCRIBED 0x0B
+#define IPC_GPRS_FAIL_INSUFFICIENT_RESOURCES 0x0004
+#define IPC_GPRS_FAIL_MISSING_UKNOWN_APN 0x0005
+#define IPC_GPRS_FAIL_UNKNOWN_PDP_ADDRESS_TYPE 0x0006
+#define IPC_GPRS_FAIL_USER_AUTHENTICATION 0x0007
+#define IPC_GPRS_FAIL_ACTIVATION_REJECT_GGSN 0x0008
+#define IPC_GPRS_FAIL_ACTIVATION_REJECT_UNSPECIFIED 0x0009
+#define IPC_GPRS_FAIL_SERVICE_OPTION_NOT_SUPPORTED 0x000A
+#define IPC_GPRS_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED 0x000B
+#define IPC_GPRS_FAIL_SERVICE_OPTION_OUT_OF_ORDER 0x000C
+#define IPC_GPRS_FAIL_NSAPI_IN_USE 0x000D
+
+#define IPC_GPRS_PDP_CONTEXT_GET_DESC_COUNT 3
struct ipc_gprs_define_pdp_context {
- unsigned char unk0[3];
+ unsigned char enable;
+ unsigned char cid;
+ unsigned char unk;
unsigned char apn[124];
};
+struct ipc_gprs_pdp_context_set {
+ unsigned char enable;
+ unsigned char cid;
+ unsigned char unk0[4];
+ unsigned char username[32];
+ unsigned char password[32];
+ unsigned char unk1[32];
+ unsigned char unk2;
+};
+
+struct ipc_gprs_pdp_context_get_desc {
+ unsigned char cid;
+ unsigned char state;
+};
+
+struct ipc_gprs_pdp_context_get {
+ unsigned char unk;
+ struct ipc_gprs_pdp_context_get_desc desc[IPC_GPRS_PDP_CONTEXT_GET_DESC_COUNT];
+};
+
struct ipc_gprs_ip_configuration {
- unsigned char unk0;
+ unsigned char cid;
unsigned char field_flag;
unsigned char unk1;
unsigned char ip[4];
@@ -62,34 +95,24 @@ struct ipc_gprs_ip_configuration {
unsigned char unk2[4];
};
-struct ipc_gprs_ip_configuration_response {
- unsigned char unk0[376];
-};
-
struct ipc_gprs_call_status {
unsigned char cid;
- unsigned char state; // IPC_GPRS_CALL_STATUS_TYPE_...
- unsigned short reason;
+ unsigned char state;
+ unsigned short fail_cause;
};
struct ipc_gprs_hsdpa_status {
unsigned char unk;
};
-struct ipc_gprs_pdp_context {
- unsigned char unk0[6];
- unsigned char username[32];
- unsigned char password[32];
- unsigned char unk1[32];
- unsigned char unk2;
-};
-
struct ipc_gprs_ps {
unsigned char unk[2];
};
struct ipc_gprs_current_session_data_counter {
- unsigned char unk[9];
+ unsigned char cid;
+ unsigned int rx_count;
+ unsigned int tx_count;
};
struct ipc_gprs_port_list {
@@ -97,8 +120,10 @@ struct ipc_gprs_port_list {
};
void ipc_gprs_port_list_setup(struct ipc_gprs_port_list *message);
-void ipc_gprs_pdp_context_setup(struct ipc_gprs_pdp_context *message, int activate, char *username, char *password);
-void ipc_gprs_define_pdp_context_setup(struct ipc_gprs_define_pdp_context *message, char *apn);
+void ipc_gprs_pdp_context_setup(struct ipc_gprs_pdp_context_set *message,
+ unsigned char cid, int enable, char *username, char *password);
+void ipc_gprs_define_pdp_context_setup(struct ipc_gprs_define_pdp_context *message,
+ unsigned char cid, int enable, char *apn);
#endif
diff --git a/include/radio.h b/include/radio.h
index 1e58d5b..c107dba 100644
--- a/include/radio.h
+++ b/include/radio.h
@@ -71,6 +71,7 @@ int ipc_client_set_handlers(struct ipc_client *client, struct ipc_handlers *hand
int ipc_client_set_io_handlers(struct ipc_client *client,
ipc_io_handler_cb read, void *read_data,
ipc_io_handler_cb write, void *write_data);
+
int ipc_client_set_handlers_common_data(struct ipc_client *client, void *data);
void *ipc_client_get_handlers_common_data(struct ipc_client *client);
int ipc_client_create_handlers_common_data(struct ipc_client *client);
@@ -86,7 +87,7 @@ int ipc_client_power_off(struct ipc_client *client);
int ipc_client_gprs_handlers_available(struct ipc_client *client);
int ipc_client_gprs_activate(struct ipc_client *client);
int ipc_client_gprs_deactivate(struct ipc_client *client);
-int ipc_client_gprs_get_iface(struct ipc_client *client, char **iface);
+int ipc_client_gprs_get_iface(struct ipc_client *client, char **iface, int cid);
int ipc_client_gprs_get_capabilities(struct ipc_client *client, struct ipc_client_gprs_capabilities *cap);
int ipc_client_recv(struct ipc_client *client, struct ipc_message_info *response);
@@ -99,15 +100,16 @@ void ipc_client_send_exec(struct ipc_client *client, const unsigned short comman
/* Utility functions */
void ipc_client_log_recv(struct ipc_client *client,
- struct ipc_message_info *response, char *prefix);
+ struct ipc_message_info *response, const char *prefix);
void ipc_client_log_send(struct ipc_client *client,
- struct ipc_message_info *request, char *prefix);
+ struct ipc_message_info *request, const char *prefix);
const char *ipc_response_type_to_str(int type);
const char *ipc_request_type_to_str(int type);
const char *ipc_command_to_str(int command);
-void ipc_hex_dump(struct ipc_client *client, void *data, int size);
-void *ipc_mtd_read(struct ipc_client *client, char *mtd_name, int size, int block_size);
-void *ipc_file_read(struct ipc_client *client, char *file_name, int size, int block_size);
+
+void ipc_client_hex_dump(struct ipc_client *client, void *data, int size);
+void *ipc_client_mtd_read(struct ipc_client *client, char *mtd_name, int size, int block_size);
+void *ipc_client_file_read(struct ipc_client *client, char *file_name, int size, int block_size);
#endif
diff --git a/include/rfs.h b/include/rfs.h
index 6c2fa63..f9da1e8 100644
--- a/include/rfs.h
+++ b/include/rfs.h
@@ -63,8 +63,8 @@ void nv_data_md5_compute(void *data_p, int size, char *secret, void *hash);
void nv_data_md5_generate(struct ipc_client *client);
void nv_data_backup_create(struct ipc_client *client);
void nv_data_backup_restore(struct ipc_client *client);
-void nv_data_check(struct ipc_client *client);
-void nv_data_md5_check(struct ipc_client *client);
+int nv_data_check(struct ipc_client *client);
+int nv_data_md5_check(struct ipc_client *client);
int nv_data_read(struct ipc_client *client, int offset, int length, char *buf);
int nv_data_write(struct ipc_client *client, int offset, int length, char *buf);