Commit 69ad78208ecf4c392f3d323ed050423847c24104
Committed by
David S. Miller
1 parent
2aa40aef9d
Exists in
master
and in
7 other branches
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>
Showing 2 changed files with 39 additions and 0 deletions Side-by-side Diff
include/linux/caif/caif_socket.h
... | ... | @@ -62,6 +62,7 @@ |
62 | 62 | * @CAIFPROTO_DATAGRAM_LOOP: Datagram loopback channel, used for testing. |
63 | 63 | * @CAIFPROTO_UTIL: Utility (Psock) channel. |
64 | 64 | * @CAIFPROTO_RFM: Remote File Manager |
65 | + * @CAIFPROTO_DEBUG: Debug link | |
65 | 66 | * |
66 | 67 | * This enum defines the CAIF Channel type to be used. This defines |
67 | 68 | * the service to connect to on the modem. |
... | ... | @@ -72,6 +73,7 @@ |
72 | 73 | CAIFPROTO_DATAGRAM_LOOP, |
73 | 74 | CAIFPROTO_UTIL, |
74 | 75 | CAIFPROTO_RFM, |
76 | + CAIFPROTO_DEBUG, | |
75 | 77 | _CAIFPROTO_MAX |
76 | 78 | }; |
77 | 79 | #define CAIFPROTO_MAX _CAIFPROTO_MAX |
78 | 80 | |
... | ... | @@ -83,8 +85,30 @@ |
83 | 85 | enum caif_at_type { |
84 | 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 | +}; | |
86 | 100 | |
87 | 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 | +}; | |
110 | + | |
111 | +/** | |
88 | 112 | * struct sockaddr_caif - the sockaddr structure for CAIF sockets. |
89 | 113 | * @family: Address family number, must be AF_CAIF. |
90 | 114 | * @u: Union of address data 'switched' by family. |
... | ... | @@ -109,6 +133,12 @@ |
109 | 133 | * |
110 | 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 | 142 | * Description: |
113 | 143 | * This structure holds the connect parameters used for setting up a |
114 | 144 | * CAIF Channel. It defines the service to connect to on the modem. |
... | ... | @@ -130,6 +160,10 @@ |
130 | 160 | __u32 connection_id; |
131 | 161 | char volume[16]; |
132 | 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 | 167 | } u; |
134 | 168 | }; |
135 | 169 |
net/caif/caif_config_util.c