History

tty: n_gsm: add missing description to structs in gsmmux.h

Currently, all available structure fields in gsmmux.h except those for gsm_config are commented. Furthermore, no kernel doc comments are used. Fix this by adding appropriate comments to the not commented fields of gsm_config. Convert the comments of the other structs to kernel doc format. Note that 'mru' and 'mtu' refer to the size without basic/advanced option mode header and byte stuffing as defined in the standard in chapter 5.7.2.

Daniel Starke committed 3 years ago

Commit 901de5a1 parent a031c771 file · +84 −20Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/gsmmux.h+84−20
@@ -18,6 +18,28 @@ · 17 unmodified lines
18 */18 */
19#define GSM_FL_RESTART _BITUL(0)19#define GSM_FL_RESTART _BITUL(0)
20 20
21/**
22 * struct gsm_config - n_gsm basic configuration parameters
23 *
24 * This structure is used in combination with GSMIOC_GETCONF and GSMIOC_SETCONF
25 * to retrieve and set the basic parameters of an n_gsm ldisc.
26 * struct gsm_config_ext can be used to configure extended ldisc parameters.
27 *
28 * All timers are in units of 1/100th of a second.
29 *
30 * @adaption: Convergence layer type
31 * @encapsulation: Framing (0 = basic option, 1 = advanced option)
32 * @initiator: Initiator or responder
33 * @t1: Acknowledgment timer
34 * @t2: Response timer for multiplexer control channel
35 * @t3: Response timer for wake-up procedure
36 * @n2: Maximum number of retransmissions
37 * @mru: Maximum incoming frame payload size
38 * @mtu: Maximum outgoing frame payload size
39 * @k: Window size
40 * @i: Frame type (1 = UIH, 2 = UI)
41 * @unused: Can not be used
42 */
21struct gsm_config43struct gsm_config
22{44{
23 unsigned int adaption;45 unsigned int adaption;
@@ -31,18 +53,32 @@ struct gsm_config · 7 unmodified lines
31 unsigned int mtu;53 unsigned int mtu;
32 unsigned int k;54 unsigned int k;
33 unsigned int i;55 unsigned int i;
34 unsigned int unused[8]; /* Can not be used */56 unsigned int unused[8];
35};57};
36 58
37#define GSMIOC_GETCONF _IOR('G', 0, struct gsm_config)59#define GSMIOC_GETCONF _IOR('G', 0, struct gsm_config)
38#define GSMIOC_SETCONF _IOW('G', 1, struct gsm_config)60#define GSMIOC_SETCONF _IOW('G', 1, struct gsm_config)
39 61
62/**
63 * struct gsm_netconfig - n_gsm network configuration parameters
64 *
65 * This structure is used in combination with GSMIOC_ENABLE_NET and
66 * GSMIOC_DISABLE_NET to enable or disable a network data connection
67 * over a mux virtual tty channel. This is for modems that support
68 * data connections with raw IP frames instead of PPP.
69 *
70 * @adaption: Adaption to use in network mode.
71 * @protocol: Protocol to use - only ETH_P_IP supported.
72 * @unused2: Can not be used.
73 * @if_name: Interface name format string.
74 * @unused: Can not be used.
75 */
40struct gsm_netconfig {76struct gsm_netconfig {
41 unsigned int adaption; /* Adaption to use in network mode */77 unsigned int adaption;
42 unsigned short protocol;/* Protocol to use - only ETH_P_IP supported */78 unsigned short protocol;
43 unsigned short unused2; /* Can not be used */79 unsigned short unused2;
44 char if_name[IFNAMSIZ]; /* interface name format string */80 char if_name[IFNAMSIZ];
45 __u8 unused[28]; /* Can not be used */81 __u8 unused[28];
46};82};
47 83
48#define GSMIOC_ENABLE_NET _IOW('G', 2, struct gsm_netconfig)84#define GSMIOC_ENABLE_NET _IOW('G', 2, struct gsm_netconfig)
@@ -51,27 +87,55 @@ struct gsm_netconfig { · 2 unmodified lines
51/* get the base tty number for a configured gsmmux tty */87/* get the base tty number for a configured gsmmux tty */
52#define GSMIOC_GETFIRST _IOR('G', 4, __u32)88#define GSMIOC_GETFIRST _IOR('G', 4, __u32)
53 89
90/**
91 * struct gsm_config_ext - n_gsm extended configuration parameters
92 *
93 * This structure is used in combination with GSMIOC_GETCONF_EXT and
94 * GSMIOC_SETCONF_EXT to retrieve and set the extended parameters of an
95 * n_gsm ldisc.
96 *
97 * All timers are in units of 1/100th of a second.
98 *
99 * @keep_alive: Control channel keep-alive in 1/100th of a second (0 to disable).
100 * @wait_config: Wait for DLCI config before opening virtual link?
101 * @reserved: For future use, must be initialized to zero.
102 */
54struct gsm_config_ext {103struct gsm_config_ext {
55 __u32 keep_alive; /* Control channel keep-alive in 1/100th of a104 __u32 keep_alive;
56 * second (0 to disable)105 __u32 wait_config;
57 */106 __u32 reserved[6];
58 __u32 wait_config; /* Wait for DLCI config before opening virtual link? */
59 __u32 reserved[6]; /* For future use, must be initialized to zero */
60};107};
61 108
62#define GSMIOC_GETCONF_EXT _IOR('G', 5, struct gsm_config_ext)109#define GSMIOC_GETCONF_EXT _IOR('G', 5, struct gsm_config_ext)
63#define GSMIOC_SETCONF_EXT _IOW('G', 6, struct gsm_config_ext)110#define GSMIOC_SETCONF_EXT _IOW('G', 6, struct gsm_config_ext)
64 111
65/* Set channel accordingly before calling GSMIOC_GETCONF_DLCI. */112/**
113 * struct gsm_dlci_config - n_gsm channel configuration parameters
114 *
115 * This structure is used in combination with GSMIOC_GETCONF_DLCI and
116 * GSMIOC_SETCONF_DLCI to retrieve and set the channel specific parameters
117 * of an n_gsm ldisc.
118 *
119 * Set the channel accordingly before calling GSMIOC_GETCONF_DLCI.
120 *
121 * @channel: DLCI (0 for the associated DLCI).
122 * @adaption: Convergence layer type.
123 * @mtu: Maximum transfer unit.
124 * @priority: Priority (0 for default value).
125 * @i: Frame type (1 = UIH, 2 = UI).
126 * @k: Window size (0 for default value).
127 * @flags: DLCI specific flags.
128 * @reserved: For future use, must be initialized to zero.
129 */
66struct gsm_dlci_config {130struct gsm_dlci_config {
67 __u32 channel; /* DLCI (0 for the associated DLCI) */131 __u32 channel;
68 __u32 adaption; /* Convergence layer type */132 __u32 adaption;
69 __u32 mtu; /* Maximum transfer unit */133 __u32 mtu;
70 __u32 priority; /* Priority (0 for default value) */134 __u32 priority;
71 __u32 i; /* Frame type (1 = UIH, 2 = UI) */135 __u32 i;
72 __u32 k; /* Window size (0 for default value) */136 __u32 k;
73 __u32 flags; /* DLCI specific flags. */137 __u32 flags;
74 __u32 reserved[7]; /* For future use, must be initialized to zero */138 __u32 reserved[7];
75};139};
76 140
77#define GSMIOC_GETCONF_DLCI _IOWR('G', 7, struct gsm_dlci_config)141#define GSMIOC_GETCONF_DLCI _IOWR('G', 7, struct gsm_dlci_config)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t