aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/caif/caif_socket.h34
-rw-r--r--net/caif/caif_config_util.c5
2 files changed, 39 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 {
83enum caif_at_type { 85enum 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 */
95enum 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 */
106enum 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
diff --git a/net/caif/caif_config_util.c b/net/caif/caif_config_util.c
index 6f36580366f0..76ae68303d3a 100644
--- a/net/caif/caif_config_util.c
+++ b/net/caif/caif_config_util.c
@@ -80,6 +80,11 @@ int connect_req_to_link_param(struct cfcnfg *cnfg,
80 l->u.utility.paramlen); 80 l->u.utility.paramlen);
81 81
82 break; 82 break;
83 case CAIFPROTO_DEBUG:
84 l->linktype = CFCTRL_SRV_DBG;
85 l->endpoint = s->sockaddr.u.dbg.service;
86 l->chtype = s->sockaddr.u.dbg.type;
87 break;
83 default: 88 default:
84 return -EINVAL; 89 return -EINVAL;
85 } 90 }