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.
Unified · Split
| @@ -18,6 +18,28 @@ · 17 unmodified lines | ||
| 18 | 18 | */ |
| 19 | 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 | + */ | |
| 21 | 43 | struct gsm_config |
| 22 | 44 | { |
| 23 | 45 | unsigned int adaption; |
| @@ -31,18 +53,32 @@ struct gsm_config · 7 unmodified lines | ||
| 31 | 53 | unsigned int mtu; |
| 32 | 54 | unsigned int k; |
| 33 | 55 | unsigned int i; |
| 34 | − unsigned int unused[8]; /* Can not be used */ | |
| 56 | + unsigned int unused[8]; | |
| 35 | 57 | }; |
| 36 | 58 | |
| 37 | 59 | #define GSMIOC_GETCONF _IOR('G', 0, struct gsm_config) |
| 38 | 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 | + */ | |
| 40 | 76 | struct gsm_netconfig { |
| 41 | − unsigned int adaption; /* Adaption to use in network mode */ | |
| 42 | − unsigned short protocol;/* Protocol to use - only ETH_P_IP supported */ | |
| 43 | − unsigned short unused2; /* Can not be used */ | |
| 44 | − char if_name[IFNAMSIZ]; /* interface name format string */ | |
| 45 | − __u8 unused[28]; /* Can not be used */ | |
| 77 | + unsigned int adaption; | |
| 78 | + unsigned short protocol; | |
| 79 | + unsigned short unused2; | |
| 80 | + char if_name[IFNAMSIZ]; | |
| 81 | + __u8 unused[28]; | |
| 46 | 82 | }; |
| 47 | 83 | |
| 48 | 84 | #define GSMIOC_ENABLE_NET _IOW('G', 2, struct gsm_netconfig) |
| @@ -51,27 +87,55 @@ struct gsm_netconfig { · 2 unmodified lines | ||
| 51 | 87 | /* get the base tty number for a configured gsmmux tty */ |
| 52 | 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 | + */ | |
| 54 | 103 | struct gsm_config_ext { |
| 55 | − __u32 keep_alive; /* Control channel keep-alive in 1/100th of a | |
| 56 | − * second (0 to disable) | |
| 57 | − */ | |
| 58 | − __u32 wait_config; /* Wait for DLCI config before opening virtual link? */ | |
| 59 | − __u32 reserved[6]; /* For future use, must be initialized to zero */ | |
| 104 | + __u32 keep_alive; | |
| 105 | + __u32 wait_config; | |
| 106 | + __u32 reserved[6]; | |
| 60 | 107 | }; |
| 61 | 108 | |
| 62 | 109 | #define GSMIOC_GETCONF_EXT _IOR('G', 5, struct gsm_config_ext) |
| 63 | 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 | + */ | |
| 66 | 130 | struct gsm_dlci_config { |
| 67 | − __u32 channel; /* DLCI (0 for the associated DLCI) */ | |
| 68 | − __u32 adaption; /* Convergence layer type */ | |
| 69 | − __u32 mtu; /* Maximum transfer unit */ | |
| 70 | − __u32 priority; /* Priority (0 for default value) */ | |
| 71 | − __u32 i; /* Frame type (1 = UIH, 2 = UI) */ | |
| 72 | − __u32 k; /* Window size (0 for default value) */ | |
| 73 | − __u32 flags; /* DLCI specific flags. */ | |
| 74 | − __u32 reserved[7]; /* For future use, must be initialized to zero */ | |
| 131 | + __u32 channel; | |
| 132 | + __u32 adaption; | |
| 133 | + __u32 mtu; | |
| 134 | + __u32 priority; | |
| 135 | + __u32 i; | |
| 136 | + __u32 k; | |
| 137 | + __u32 flags; | |
| 138 | + __u32 reserved[7]; | |
| 75 | 139 | }; |
| 76 | 140 | |
| 77 | 141 | #define GSMIOC_GETCONF_DLCI _IOWR('G', 7, struct gsm_dlci_config) |