All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] Define packet switched bearers
@ 2011-01-07 16:02 =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
  2011-01-07 16:02 ` [PATCH 2/4] Core support for packet switched bearer reporting =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont @ 2011-01-07 16:02 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]

---
 src/common.c |   14 ++++++++++++++
 src/common.h |   13 +++++++++++++
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/src/common.c b/src/common.c
index d4e567b..6664007 100644
--- a/src/common.c
+++ b/src/common.c
@@ -714,6 +714,20 @@ const char *registration_tech_to_string(int tech)
 	}
 }
 
+const char *packet_bearer_to_string(int bearer)
+{
+	static const char list[][6] = {
+		"none",
+		"gsm", "edge",
+		"umts", "hsupa", "hsdpa", "hspa",
+		"lte",
+	};
+
+	if (((unsigned)bearer) < sizeof (list) / sizeof (list[0]))
+		return list[bearer];
+	return "unknown";
+}
+
 gboolean is_valid_apn(const char *apn)
 {
 	int i;
diff --git a/src/common.h b/src/common.h
index 64f297e..d11cd8e 100644
--- a/src/common.h
+++ b/src/common.h
@@ -87,6 +87,18 @@ enum bearer_class {
 	BEARER_CLASS_PAD = 128
 };
 
+/* 27.007 Section 7.29 */
+enum packet_bearer {
+	PACKET_BEARER_NONE = 0,
+	PACKET_BEARER_GPRS = 1,
+	PACKET_BEARER_EDGE = 2,
+	PACKET_BEARER_UMTS = 3,
+	PACKET_BEARER_HSUPA = 4,
+	PACKET_BEARER_HSDPA = 5,
+	PACKET_BEARER_HSUPA_HSDPA = 6,
+	PACKET_BEARER_LTE = 7,
+};
+
 /* 22.030 Section 6.5.2 */
 enum ss_control_type {
 	SS_CONTROL_TYPE_ACTIVATION,
@@ -158,5 +170,6 @@ gboolean is_valid_pin(const char *pin, enum pin_type type);
 
 const char *registration_status_to_string(int status);
 const char *registration_tech_to_string(int tech);
+const char *packet_bearer_to_string(int bearer);
 
 gboolean is_valid_apn(const char *apn);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2011-01-13  8:17 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-07 16:02 [PATCH 1/4] Define packet switched bearers =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-07 16:02 ` [PATCH 2/4] Core support for packet switched bearer reporting =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-07 16:25   ` Denis Kenzior
2011-01-10 11:19     ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-10 16:16       ` Denis Kenzior
2011-01-10 11:33     ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-10 16:19       ` Denis Kenzior
2011-01-07 16:02 ` [PATCH 3/4] Bearer documentation =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-07 16:23   ` Denis Kenzior
2011-01-10 11:21     ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-10 16:27       ` Denis Kenzior
2011-01-10 16:34         ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-11  0:26           ` Marcel Holtmann
2011-01-11  7:53             ` Aki Niemi
2011-01-12 16:40               ` Marcel Holtmann
2011-01-13  8:17                 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-10 12:41     ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-10 16:20       ` Denis Kenzior
2011-01-07 16:02 ` [PATCH 4/4] atmodem: packet switch bearer support =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2011-01-07 16:27   ` Denis Kenzior
2011-01-07 16:23 ` [PATCH 1/4] Define packet switched bearers 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.