Skip to content

Commit

Permalink
Phonet: Implement Pipe Controller to support Nokia Slim Modems
Browse files Browse the repository at this point in the history
Phonet stack assumes the presence of Pipe Controller, either in Modem or
on Application Processing Engine user-space for the Pipe data.
Nokia Slim Modems like WG2.5 used in ST-Ericsson U8500 platform do not
implement Pipe controller in them.
This patch adds Pipe Controller implemenation to Phonet stack to support
Pipe data over Phonet stack for Nokia Slim Modems.

Signed-off-by: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kumar Sanghvi authored and David S. Miller committed Sep 28, 2010
1 parent e40051d commit 8d98efa
Show file tree
Hide file tree
Showing 4 changed files with 479 additions and 6 deletions.
5 changes: 5 additions & 0 deletions include/linux/phonet.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
/* Socket options for SOL_PNPIPE level */
#define PNPIPE_ENCAP 1
#define PNPIPE_IFINDEX 2
#define PNPIPE_CREATE 3
#define PNPIPE_ENABLE 4
#define PNPIPE_DISABLE 5
#define PNPIPE_DESTROY 6
#define PNPIPE_INQ 7

#define PNADDR_ANY 0
#define PNADDR_BROADCAST 0xFC
Expand Down
21 changes: 21 additions & 0 deletions include/net/phonet/pep.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ struct pep_sock {
u8 tx_fc; /* TX flow control */
u8 init_enable; /* auto-enable at creation */
u8 aligned;
#ifdef CONFIG_PHONET_PIPECTRLR
u16 remote_pep;
u8 pipe_state;
#endif
};

static inline struct pep_sock *pep_sk(struct sock *sk)
Expand Down Expand Up @@ -165,4 +169,21 @@ enum {
PEP_IND_READY,
};

#ifdef CONFIG_PHONET_PIPECTRLR
#define PNS_PEP_CONNECT_UTID 0x02
#define PNS_PIPE_CREATED_IND_UTID 0x04
#define PNS_PIPE_ENABLE_UTID 0x0A
#define PNS_PIPE_ENABLED_IND_UTID 0x0C
#define PNS_PIPE_DISABLE_UTID 0x0F
#define PNS_PIPE_DISABLED_IND_UTID 0x11
#define PNS_PEP_DISCONNECT_UTID 0x06

/* Used for tracking state of a pipe */
enum {
PIPE_IDLE,
PIPE_DISABLED,
PIPE_ENABLED,
};
#endif /* CONFIG_PHONET_PIPECTRLR */

#endif
11 changes: 11 additions & 0 deletions net/phonet/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,14 @@ config PHONET

To compile this driver as a module, choose M here: the module
will be called phonet. If unsure, say N.

config PHONET_PIPECTRLR
bool "Phonet Pipe Controller"
depends on PHONET
default N
help
The Pipe Controller implementation in Phonet stack to support Pipe
data with Nokia Slim modems like WG2.5 used on ST-Ericsson U8500
platform.

If unsure, say N.
Loading

0 comments on commit 8d98efa

Please sign in to comment.