Add an implementation of GSM 0710 MUX. The implementation currently supports
- Basic and advanced framing (as either end of the link)
- UI or UIH data frames
- Adaption layer 1-4 (1 and 2 via tty, 3 and 4 as skbuff lists)
- Modem and control messages including the correct retry process
- Flow control
and exposes the MUX channels as a set of virtual tty devices including modem
signals.
This is a development patch, but I wanted to get public visibility and also
a chance for people to test this with other devices.
You may also ask "why in kernel" - well there are three good reasons
- Lots of complex locking and timer handling between channels
- Channels affect each other (eg DLCI 0 is control for other bits)
- Performance - on a 3G setup you may be running a 10Mbit plus and we will
want to tap DLCI channels directly into the kernel networking, which means
we need to demux kernel side.
As a side effect we also get a convenient interface where things like pppd,
phone sim tools, sms software and minicom 'just work' on AT mode logical
channels.
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
drivers/char/Kconfig | 8
drivers/char/Makefile | 1
drivers/char/n_gsm.c | 2768 ++++++++++++++++++++++++++++++++++++++++++++++++
include/linux/gsmmux.h | 23
include/linux/tty.h | 5
5 files changed, 2802 insertions(+), 3 deletions(-)
create mode 100644 drivers/char/n_gsm.c
create mode 100644 include/linux/gsmmux.h
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 3141dd3..6beb135 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -276,11 +276,17 @@ config N_HDLC
Allows synchronous HDLC communications with tty device drivers that
support synchronous HDLC such as the Microgate SyncLink adapter.
- This driver can only be built as a module ( = code which can be
+ This driver can be built as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The ...