aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc/device
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2012-10-01 20:36:42 +0200
committerSimon Busch <morphis@gravedo.de>2012-10-13 17:06:23 +0200
commit3b804a8dc0352281b95b2506b0e35114a37fe843 (patch)
treea79feeff7559c38f504e24ff9802e3aacaeaf96f /samsung-ipc/device
parent896c02cd4cf1486a9984dd4ee61c8dac7aa95858 (diff)
downloadexternal_libsamsung-ipc-3b804a8dc0352281b95b2506b0e35114a37fe843.zip
external_libsamsung-ipc-3b804a8dc0352281b95b2506b0e35114a37fe843.tar.gz
external_libsamsung-ipc-3b804a8dc0352281b95b2506b0e35114a37fe843.tar.bz2
crespo: Kernel-version-dependant gprs specs
Change-Id: I208edeb3b9f8bdce4051b42d0ecda85259cf1d82 Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'samsung-ipc/device')
-rw-r--r--samsung-ipc/device/crespo/crespo_ipc.c38
-rw-r--r--samsung-ipc/device/crespo/crespo_ipc.h1
2 files changed, 34 insertions, 5 deletions
diff --git a/samsung-ipc/device/crespo/crespo_ipc.c b/samsung-ipc/device/crespo/crespo_ipc.c
index 46edf7b..e932587 100644
--- a/samsung-ipc/device/crespo/crespo_ipc.c
+++ b/samsung-ipc/device/crespo/crespo_ipc.c
@@ -587,7 +587,7 @@ int crespo_ipc_power_off(void *io_data)
return 0;
}
-char *crespo_ipc_gprs_get_iface(int cid)
+char *crespo_2_6_35_ipc_gprs_get_iface(int cid)
{
char *iface = NULL;
@@ -596,7 +596,19 @@ char *crespo_ipc_gprs_get_iface(int cid)
return iface;
}
-int crespo_ipc_gprs_get_capabilities(struct ipc_client_gprs_capabilities *cap)
+char *crespo_3_0_ipc_gprs_get_iface(int cid)
+{
+ char *iface = NULL;
+
+ if(cid > GPRS_IFACE_COUNT)
+ return NULL;
+
+ asprintf(&iface, "%s%d", GPRS_IFACE_PREFIX, cid - 1);
+
+ return iface;
+}
+
+int crespo_2_6_35_ipc_gprs_get_capabilities(struct ipc_client_gprs_capabilities *cap)
{
if (cap == NULL)
return -1;
@@ -607,6 +619,17 @@ int crespo_ipc_gprs_get_capabilities(struct ipc_client_gprs_capabilities *cap)
return 0;
}
+int crespo_3_0_ipc_gprs_get_capabilities(struct ipc_client_gprs_capabilities *cap)
+{
+ if (cap == NULL)
+ return -1;
+
+ cap->port_list = 0;
+ cap->cid_max = GPRS_IFACE_COUNT;
+
+ return 0;
+}
+
void *crespo_ipc_common_data_create(void)
{
void *io_data;
@@ -685,9 +708,14 @@ struct ipc_handlers crespo_default_handlers = {
.common_data_get_fd = crespo_ipc_common_data_get_fd,
};
-struct ipc_gprs_specs crespo_gprs_specs = {
- .gprs_get_iface = crespo_ipc_gprs_get_iface,
- .gprs_get_capabilities = crespo_ipc_gprs_get_capabilities,
+struct ipc_gprs_specs crespo_2_6_35_gprs_specs = {
+ .gprs_get_iface = crespo_2_6_35_ipc_gprs_get_iface,
+ .gprs_get_capabilities = crespo_2_6_35_ipc_gprs_get_capabilities,
+};
+
+struct ipc_gprs_specs crespo_3_0_gprs_specs = {
+ .gprs_get_iface = crespo_3_0_ipc_gprs_get_iface,
+ .gprs_get_capabilities = crespo_3_0_ipc_gprs_get_capabilities,
};
// vim:ts=4:sw=4:expandtab
diff --git a/samsung-ipc/device/crespo/crespo_ipc.h b/samsung-ipc/device/crespo/crespo_ipc.h
index bdda851..184b1d6 100644
--- a/samsung-ipc/device/crespo/crespo_ipc.h
+++ b/samsung-ipc/device/crespo/crespo_ipc.h
@@ -29,6 +29,7 @@
#define MAX_MODEM_DATA_SIZE 0x50000
#define GPRS_IFACE_PREFIX "rmnet"
+#define GPRS_IFACE_COUNT 3
extern struct ipc_handlers crespo_ipc_default_handlers;