diff options
author | Sjur Braendeland <sjur.brandeland@stericsson.com> | 2010-06-17 02:55:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-20 22:46:07 -0400 |
commit | 69ad78208ecf4c392f3d323ed050423847c24104 (patch) | |
tree | cf2eba4f98a98b6e4a9820b8ce058cb2fc217596 /include/linux/caif | |
parent | 2aa40aef9debc77d55cc87a50d335b6fe97fbeb0 (diff) |
caif: Add debug connection type for CAIF.
Added new CAIF protocol type CAIFPROTO_DEBUG for accessing
CAIF debug on the ST Ericsson modems.
There are two debug servers on the modem, one for radio related
debug (CAIF_RADIO_DEBUG_SERVICE) and the other for
communication/application related debug (CAIF_COM_DEBUG_SERVICE).
The debug connection can contain trace debug printouts or
interactive debug used for debugging and test.
Debug connections can be of type STREAM or SEQPACKET.
Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/caif')
-rw-r--r-- | include/linux/caif/caif_socket.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/caif/caif_socket.h b/include/linux/caif/caif_socket.h index 2a61eb1beb85..d9cb19b7cff7 100644 --- a/include/linux/caif/caif_socket.h +++ b/include/linux/caif/caif_socket.h | |||
@@ -62,6 +62,7 @@ enum caif_channel_priority { | |||
62 | * @CAIFPROTO_DATAGRAM_LOOP: Datagram loopback channel, used for testing. | 62 | * @CAIFPROTO_DATAGRAM_LOOP: Datagram loopback channel, used for testing. |
63 | * @CAIFPROTO_UTIL: Utility (Psock) channel. | 63 | * @CAIFPROTO_UTIL: Utility (Psock) channel. |
64 | * @CAIFPROTO_RFM: Remote File Manager | 64 | * @CAIFPROTO_RFM: Remote File Manager |
65 | * @CAIFPROTO_DEBUG: Debug link | ||
65 | * | 66 | * |
66 | * This enum defines the CAIF Channel type to be used. This defines | 67 | * This enum defines the CAIF Channel type to be used. This defines |
67 | * the service to connect to on the modem. | 68 | * the service to connect to on the modem. |
@@ -72,6 +73,7 @@ enum caif_protocol_type { | |||
72 | CAIFPROTO_DATAGRAM_LOOP, | 73 | CAIFPROTO_DATAGRAM_LOOP, |
73 | CAIFPROTO_UTIL, | 74 | CAIFPROTO_UTIL, |
74 | CAIFPROTO_RFM, | 75 | CAIFPROTO_RFM, |
76 | CAIFPROTO_DEBUG, | ||
75 | _CAIFPROTO_MAX | 77 | _CAIFPROTO_MAX |
76 | }; | 78 | }; |
77 | #define CAIFPROTO_MAX _CAIFPROTO_MAX | 79 | #define CAIFPROTO_MAX _CAIFPROTO_MAX |
@@ -83,6 +85,28 @@ enum caif_protocol_type { | |||
83 | enum caif_at_type { | 85 | enum caif_at_type { |
84 | CAIF_ATTYPE_PLAIN = 2 | 86 | CAIF_ATTYPE_PLAIN = 2 |
85 | }; | 87 | }; |
88 | /** | ||
89 | * enum caif_debug_type - Content selection for debug connection | ||
90 | * @CAIF_DEBUG_TRACE_INTERACTIVE: Connection will contain | ||
91 | * both trace and interactive debug. | ||
92 | * @CAIF_DEBUG_TRACE: Connection contains trace only. | ||
93 | * @CAIF_DEBUG_INTERACTIVE: Connection to interactive debug. | ||
94 | */ | ||
95 | enum caif_debug_type { | ||
96 | CAIF_DEBUG_TRACE_INTERACTIVE = 0, | ||
97 | CAIF_DEBUG_TRACE, | ||
98 | CAIF_DEBUG_INTERACTIVE, | ||
99 | }; | ||
100 | |||
101 | /** | ||
102 | * enum caif_debug_service - Debug Service Endpoint | ||
103 | * @CAIF_RADIO_DEBUG_SERVICE: Debug service on the Radio sub-system | ||
104 | * @CAIF_APP_DEBUG_SERVICE: Debug for the applications sub-system | ||
105 | */ | ||
106 | enum caif_debug_service { | ||
107 | CAIF_RADIO_DEBUG_SERVICE = 1, | ||
108 | CAIF_APP_DEBUG_SERVICE | ||
109 | }; | ||
86 | 110 | ||
87 | /** | 111 | /** |
88 | * struct sockaddr_caif - the sockaddr structure for CAIF sockets. | 112 | * struct sockaddr_caif - the sockaddr structure for CAIF sockets. |
@@ -109,6 +133,12 @@ enum caif_at_type { | |||
109 | * | 133 | * |
110 | * @u.rfm.volume: Volume to mount. | 134 | * @u.rfm.volume: Volume to mount. |
111 | * | 135 | * |
136 | * @u.dbg: Applies when family = CAIFPROTO_DEBUG. | ||
137 | * | ||
138 | * @u.dbg.type: Type of debug connection to set up | ||
139 | * (caif_debug_type). | ||
140 | * | ||
141 | * @u.dbg.service: Service sub-system to connect (caif_debug_service | ||
112 | * Description: | 142 | * Description: |
113 | * This structure holds the connect parameters used for setting up a | 143 | * This structure holds the connect parameters used for setting up a |
114 | * CAIF Channel. It defines the service to connect to on the modem. | 144 | * CAIF Channel. It defines the service to connect to on the modem. |
@@ -130,6 +160,10 @@ struct sockaddr_caif { | |||
130 | __u32 connection_id; | 160 | __u32 connection_id; |
131 | char volume[16]; | 161 | char volume[16]; |
132 | } rfm; /* CAIFPROTO_RFM */ | 162 | } rfm; /* CAIFPROTO_RFM */ |
163 | struct { | ||
164 | __u8 type; /* type:enum caif_debug_type */ | ||
165 | __u8 service; /* service:caif_debug_service */ | ||
166 | } dbg; /* CAIFPROTO_DEBUG */ | ||
133 | } u; | 167 | } u; |
134 | }; | 168 | }; |
135 | 169 | ||