aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-04-04 19:11:17 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-06-27 18:39:57 +0200
commit4cd08ef2034fe332cee906906a6a8f769e7915f7 (patch)
tree4ae8a0679ed6e66414f92fde98cf2e5fafc837ae
parent1183d1e7ec5d8f84446516fa03dabaabfb78130d (diff)
downloadhardware_replicant_libsamsung-ipc-4cd08ef2034fe332cee906906a6a8f769e7915f7.tar.gz
hardware_replicant_libsamsung-ipc-4cd08ef2034fe332cee906906a6a8f769e7915f7.tar.bz2
hardware_replicant_libsamsung-ipc-4cd08ef2034fe332cee906906a6a8f769e7915f7.zip
includes: gprs.h: switch to Linux code style
This contains no functional changes. The commented out code if any has also been preserved as it could be relevant to the understanding of the code. It will be kept until we understand why the code has been commented. In that case we either need to remove it completely or to replace it by a comment explaining why not having that code was necessary. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
-rw-r--r--include/gprs.h186
1 files changed, 93 insertions, 93 deletions
diff --git a/include/gprs.h b/include/gprs.h
index 70a54f0..686a204 100644
--- a/include/gprs.h
+++ b/include/gprs.h
@@ -30,142 +30,142 @@
* Commands
*/
-#define IPC_GPRS_DEFINE_PDP_CONTEXT 0x0D01
-#define IPC_GPRS_QOS 0x0D02
-#define IPC_GPRS_PS 0x0D03
-#define IPC_GPRS_PDP_CONTEXT 0x0D04
-#define IPC_GPRS_ENTER_DATA 0x0D05
-#define IPC_GPRS_SHOW_PDP_ADDR 0x0D06
-#define IPC_GPRS_MS_CLASS 0x0D07
-#define IPC_GPRS_3G_QUAL_SRVC_PROFILE 0x0D08
-#define IPC_GPRS_IP_CONFIGURATION 0x0D09
-#define IPC_GPRS_DEFINE_SEC_PDP_CONTEXT 0x0D0A
-#define IPC_GPRS_TFT 0x0D0B
-#define IPC_GPRS_HSDPA_STATUS 0x0D0C
-#define IPC_GPRS_CURRENT_SESSION_DATA_COUNTER 0x0D0D
-#define IPC_GPRS_DATA_DORMANT 0x0D0E
-#define IPC_GPRS_PIN_CTRL 0x0D0F
-#define IPC_GPRS_CALL_STATUS 0x0D10
-#define IPC_GPRS_PORT_LIST 0x0D11
+#define IPC_GPRS_DEFINE_PDP_CONTEXT 0x0D01
+#define IPC_GPRS_QOS 0x0D02
+#define IPC_GPRS_PS 0x0D03
+#define IPC_GPRS_PDP_CONTEXT 0x0D04
+#define IPC_GPRS_ENTER_DATA 0x0D05
+#define IPC_GPRS_SHOW_PDP_ADDR 0x0D06
+#define IPC_GPRS_MS_CLASS 0x0D07
+#define IPC_GPRS_3G_QUAL_SRVC_PROFILE 0x0D08
+#define IPC_GPRS_IP_CONFIGURATION 0x0D09
+#define IPC_GPRS_DEFINE_SEC_PDP_CONTEXT 0x0D0A
+#define IPC_GPRS_TFT 0x0D0B
+#define IPC_GPRS_HSDPA_STATUS 0x0D0C
+#define IPC_GPRS_CURRENT_SESSION_DATA_COUNTER 0x0D0D
+#define IPC_GPRS_DATA_DORMANT 0x0D0E
+#define IPC_GPRS_PIN_CTRL 0x0D0F
+#define IPC_GPRS_CALL_STATUS 0x0D10
+#define IPC_GPRS_PORT_LIST 0x0D11
/*
* Values
*/
-#define IPC_GPRS_FAIL_CAUSE_NONE 0x0000
-#define IPC_GPRS_FAIL_CAUSE_REL_BY_USER 0x0001
-#define IPC_GPRS_FAIL_CAUSE_REGULAR_DEACTIVATION 0x0002
-#define IPC_GPRS_FAIL_CAUSE_LLC_SNDCP 0x0003
-#define IPC_GPRS_FAIL_CAUSE_INSUFFICIENT_RESOURCE 0x0004
-#define IPC_GPRS_FAIL_CAUSE_UNKNOWN_APN 0x0005
-#define IPC_GPRS_FAIL_CAUSE_UNKNOWN_PDP_ADDRESS 0x0006
-#define IPC_GPRS_FAIL_CAUSE_USER_AUTH_FAILED 0x0007
-#define IPC_GPRS_FAIL_CAUSE_ACT_REJ_GGSN 0x0008
-#define IPC_GPRS_FAIL_CAUSE_ACT_REJ_UNSPECIFIED 0x0009
-#define IPC_GPRS_FAIL_CAUSE_SVC_OPTION_NOT_SUPPORTED 0x000A
-#define IPC_GPRS_FAIL_CAUSE_SVC_NOT_SUBSCRIBED 0x000B
-#define IPC_GPRS_FAIL_CAUSE_SVC_OPT_OUT_ORDER 0x000C
-#define IPC_GPRS_FAIL_CAUSE_NSAPI_USED 0x000D
-#define IPC_GPRS_FAIL_CAUSE_QOS_NOT_ACCEPTED 0x000E
-#define IPC_GPRS_FAIL_CAUSE_NETWORK_FAILURE 0x000F
-#define IPC_GPRS_FAIL_CAUSE_REACT_REQUIRED 0x0010
-#define IPC_GPRS_FAIL_CAUSE_FEATURE_NOT_SUPPORTED 0x0011
-#define IPC_GPRS_FAIL_CAUSE_TFT_FILTER_ERROR 0x0012
-#define IPC_GPRS_FAIL_CAUSE_UNKNOWN_PDP_CONTEXT 0x0013
-#define IPC_GPRS_FAIL_CAUSE_INVALID_MSG 0x0014
-#define IPC_GPRS_FAIL_CAUSE_PROTOCOL_ERROR 0x0015
-#define IPC_GPRS_FAIL_CAUSE_MOBILE_FAILURE_ERROR 0x0016
-#define IPC_GPRS_FAIL_CAUSE_TIMEOUT_ERROR 0x0017
-#define IPC_GPRS_FAIL_CAUSE_UNKNOWN_ERROR 0x0018
-
-#define IPC_GPRS_HSDPA_STATUS_NONE 0x00
-#define IPC_GPRS_HSDPA_STATUS_HSDPA 0x01
-#define IPC_GPRS_HSDPA_STATUS_HSPAP 0x02
-
-#define IPC_GPRS_STATUS_NOT_ENABLED 0x00
-#define IPC_GPRS_STATUS_ENABLED 0x01
-#define IPC_GPRS_STATUS_DISABLED 0x03
+#define IPC_GPRS_FAIL_CAUSE_NONE 0x0000
+#define IPC_GPRS_FAIL_CAUSE_REL_BY_USER 0x0001
+#define IPC_GPRS_FAIL_CAUSE_REGULAR_DEACTIVATION 0x0002
+#define IPC_GPRS_FAIL_CAUSE_LLC_SNDCP 0x0003
+#define IPC_GPRS_FAIL_CAUSE_INSUFFICIENT_RESOURCE 0x0004
+#define IPC_GPRS_FAIL_CAUSE_UNKNOWN_APN 0x0005
+#define IPC_GPRS_FAIL_CAUSE_UNKNOWN_PDP_ADDRESS 0x0006
+#define IPC_GPRS_FAIL_CAUSE_USER_AUTH_FAILED 0x0007
+#define IPC_GPRS_FAIL_CAUSE_ACT_REJ_GGSN 0x0008
+#define IPC_GPRS_FAIL_CAUSE_ACT_REJ_UNSPECIFIED 0x0009
+#define IPC_GPRS_FAIL_CAUSE_SVC_OPTION_NOT_SUPPORTED 0x000A
+#define IPC_GPRS_FAIL_CAUSE_SVC_NOT_SUBSCRIBED 0x000B
+#define IPC_GPRS_FAIL_CAUSE_SVC_OPT_OUT_ORDER 0x000C
+#define IPC_GPRS_FAIL_CAUSE_NSAPI_USED 0x000D
+#define IPC_GPRS_FAIL_CAUSE_QOS_NOT_ACCEPTED 0x000E
+#define IPC_GPRS_FAIL_CAUSE_NETWORK_FAILURE 0x000F
+#define IPC_GPRS_FAIL_CAUSE_REACT_REQUIRED 0x0010
+#define IPC_GPRS_FAIL_CAUSE_FEATURE_NOT_SUPPORTED 0x0011
+#define IPC_GPRS_FAIL_CAUSE_TFT_FILTER_ERROR 0x0012
+#define IPC_GPRS_FAIL_CAUSE_UNKNOWN_PDP_CONTEXT 0x0013
+#define IPC_GPRS_FAIL_CAUSE_INVALID_MSG 0x0014
+#define IPC_GPRS_FAIL_CAUSE_PROTOCOL_ERROR 0x0015
+#define IPC_GPRS_FAIL_CAUSE_MOBILE_FAILURE_ERROR 0x0016
+#define IPC_GPRS_FAIL_CAUSE_TIMEOUT_ERROR 0x0017
+#define IPC_GPRS_FAIL_CAUSE_UNKNOWN_ERROR 0x0018
+
+#define IPC_GPRS_HSDPA_STATUS_NONE 0x00
+#define IPC_GPRS_HSDPA_STATUS_HSDPA 0x01
+#define IPC_GPRS_HSDPA_STATUS_HSPAP 0x02
+
+#define IPC_GPRS_STATUS_NOT_ENABLED 0x00
+#define IPC_GPRS_STATUS_ENABLED 0x01
+#define IPC_GPRS_STATUS_DISABLED 0x03
/*
* Structures
*/
struct ipc_gprs_define_pdp_context_data {
- unsigned char enable;
- unsigned char cid;
- unsigned char magic;
- unsigned char apn[124];
+ unsigned char enable;
+ unsigned char cid;
+ unsigned char magic;
+ unsigned char apn[124];
} __attribute__((__packed__));
struct ipc_gprs_ps_data {
- unsigned char cid;
- unsigned char attached;
+ unsigned char cid;
+ unsigned char attached;
} __attribute__((__packed__));
struct ipc_gprs_pdp_context_request_set_data {
- unsigned char enable;
- unsigned char cid;
- unsigned char magic1[4];
- unsigned char username[32];
- unsigned char password[32];
- unsigned char unknown[32];
- unsigned char magic2;
+ unsigned char enable;
+ unsigned char cid;
+ unsigned char magic1[4];
+ unsigned char username[32];
+ unsigned char password[32];
+ unsigned char unknown[32];
+ unsigned char magic2;
} __attribute__((__packed__));
struct ipc_gprs_pdp_context_request_get_entry {
- unsigned char cid;
- unsigned char active;
+ unsigned char cid;
+ unsigned char active;
} __attribute__((__packed__));
struct ipc_gprs_pdp_context_request_get_data {
- unsigned char active_count;
- struct ipc_gprs_pdp_context_request_get_entry entries[3];
+ unsigned char active_count;
+ struct ipc_gprs_pdp_context_request_get_entry entries[3];
} __attribute__((__packed__));
struct ipc_gprs_ip_configuration_data {
- unsigned char cid;
- unsigned char field_flag;
- unsigned char fail_cause; // IPC_GPRS_FAIL_CAUSE
- unsigned char ip[4];
- unsigned char dns1[4];
- unsigned char dns2[4];
- unsigned char gateway[4];
- unsigned char subnet_mask[4];
- unsigned char unknown[4];
+ unsigned char cid;
+ unsigned char field_flag;
+ unsigned char fail_cause; /*IPC_GPRS_FAIL_CAUSE */
+ unsigned char ip[4];
+ unsigned char dns1[4];
+ unsigned char dns2[4];
+ unsigned char gateway[4];
+ unsigned char subnet_mask[4];
+ unsigned char unknown[4];
} __attribute__((__packed__));
struct ipc_gprs_hsdpa_status_data {
- unsigned char status; // IPC_GPRS_HSDPA_STATUS
+ unsigned char status; /* IPC_GPRS_HSDPA_STATUS */
} __attribute__((__packed__));
struct ipc_gprs_current_session_data_counter_data {
- unsigned char cid;
- unsigned int rx_count;
- unsigned int tx_count;
+ unsigned char cid;
+ unsigned int rx_count;
+ unsigned int tx_count;
} __attribute__((__packed__));
struct ipc_gprs_call_status_data {
- unsigned char cid;
- unsigned char status; // IPC_GPRS_STATUS
- unsigned char fail_cause; // IPC_GPRS_FAIL_CAUSE
- unsigned char external;
+ unsigned char cid;
+ unsigned char status; /* IPC_GPRS_STATUS */
+ unsigned char fail_cause; /* IPC_GPRS_FAIL_CAUSE */
+ unsigned char external;
} __attribute__((__packed__));
struct ipc_gprs_port_list_data {
- unsigned char magic[804];
+ unsigned char magic[804];
} __attribute__((__packed__));
/*
* Helpers
*/
-int ipc_gprs_define_pdp_context_setup(struct ipc_gprs_define_pdp_context_data *data,
- unsigned char enable, unsigned char cid, const char *apn);
-int ipc_gprs_pdp_context_request_set_setup(struct ipc_gprs_pdp_context_request_set_data *data,
- unsigned char enable, unsigned char cid, const char *username,
- const char *password);
+int ipc_gprs_define_pdp_context_setup(
+ struct ipc_gprs_define_pdp_context_data *data, unsigned char enable,
+ unsigned char cid, const char *apn);
+int ipc_gprs_pdp_context_request_set_setup(
+ struct ipc_gprs_pdp_context_request_set_data *data,
+ unsigned char enable, unsigned char cid, const char *username,
+ const char *password);
int ipc_gprs_port_list_setup(struct ipc_gprs_port_list_data *data);
-#endif
-
-// vim:ts=4:sw=4:expandtab
+#endif /* __SAMSUNG_IPC_GPRS_H__ */