2023-04-20 08:56:25

by D. Starke

[permalink] [raw]
Subject: [PATCH v2 3/9] tty: n_gsm: add missing description to gsm_config

From: Daniel Starke <[email protected]>

Currently, all available structure fields in gsmmux.h except those
for gsm_config are commented.

Fix this by adding appropriate comments to the not commented fields.
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.

Link: https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516
Signed-off-by: Daniel Starke <[email protected]>
---
include/uapi/linux/gsmmux.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

v1 -> v2:
Added remark regarding the mru/mtu size comment as this was unclear in the
review.

Link: https://lore.kernel.org/all/AS4PR10MB5895ADDAF211A669CCF7F8C5E0919@AS4PR10MB5895.EURPRD10.PROD.OUTLOOK.COM/

diff --git a/include/uapi/linux/gsmmux.h b/include/uapi/linux/gsmmux.h
index 33ee7b857c52..422a52e184b3 100644
--- a/include/uapi/linux/gsmmux.h
+++ b/include/uapi/linux/gsmmux.h
@@ -8,17 +8,17 @@

struct gsm_config
{
- unsigned int adaption;
- unsigned int encapsulation;
- unsigned int initiator;
- unsigned int t1;
- unsigned int t2;
- unsigned int t3;
- unsigned int n2;
- unsigned int mru;
- unsigned int mtu;
- unsigned int k;
- unsigned int i;
+ unsigned int adaption; /* Convergence layer type */
+ unsigned int encapsulation; /* Framing (0 = basic option, 1 = advanced option) */
+ unsigned int initiator; /* Initiator or responder */
+ unsigned int t1; /* Acknowledgment timer */
+ unsigned int t2; /* Response timer for multiplexer control channel */
+ unsigned int t3; /* Response timer for wake-up procedure */
+ unsigned int n2; /* Maximum number of retransmissions */
+ unsigned int mru; /* Maximum incoming frame payload size */
+ unsigned int mtu; /* Maximum outgoing frame payload size */
+ unsigned int k; /* Window size */
+ unsigned int i; /* Frame type (1 = UIH, 2 = UI) */
unsigned int unused[8]; /* Can not be used */
};

--
2.34.1


2023-04-20 09:11:55

by Jiri Slaby

[permalink] [raw]
Subject: Re: [PATCH v2 3/9] tty: n_gsm: add missing description to gsm_config

On 20. 04. 23, 10:50, D. Starke wrote:
> From: Daniel Starke <[email protected]>
>
> Currently, all available structure fields in gsmmux.h except those
> for gsm_config are commented.
>
> Fix this by adding appropriate comments to the not commented fields.
> 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.

Maybe you can start documenting them using kernel-doc? And convert the
others and expose them all to Documentation and finally to:
https://www.kernel.org/doc/html/latest/
?

> Link: https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516
> Signed-off-by: Daniel Starke <[email protected]>
> ---
> include/uapi/linux/gsmmux.h | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> v1 -> v2:
> Added remark regarding the mru/mtu size comment as this was unclear in the
> review.
>
> Link: https://lore.kernel.org/all/AS4PR10MB5895ADDAF211A669CCF7F8C5E0919@AS4PR10MB5895.EURPRD10.PROD.OUTLOOK.COM/
>
> diff --git a/include/uapi/linux/gsmmux.h b/include/uapi/linux/gsmmux.h
> index 33ee7b857c52..422a52e184b3 100644
> --- a/include/uapi/linux/gsmmux.h
> +++ b/include/uapi/linux/gsmmux.h
> @@ -8,17 +8,17 @@
>
> struct gsm_config
> {
> - unsigned int adaption;
> - unsigned int encapsulation;
> - unsigned int initiator;
> - unsigned int t1;
> - unsigned int t2;
> - unsigned int t3;
> - unsigned int n2;
> - unsigned int mru;
> - unsigned int mtu;
> - unsigned int k;
> - unsigned int i;
> + unsigned int adaption; /* Convergence layer type */
> + unsigned int encapsulation; /* Framing (0 = basic option, 1 = advanced option) */
> + unsigned int initiator; /* Initiator or responder */
> + unsigned int t1; /* Acknowledgment timer */
> + unsigned int t2; /* Response timer for multiplexer control channel */
> + unsigned int t3; /* Response timer for wake-up procedure */
> + unsigned int n2; /* Maximum number of retransmissions */
> + unsigned int mru; /* Maximum incoming frame payload size */
> + unsigned int mtu; /* Maximum outgoing frame payload size */
> + unsigned int k; /* Window size */
> + unsigned int i; /* Frame type (1 = UIH, 2 = UI) */
> unsigned int unused[8]; /* Can not be used */
> };
>

--
js
suse labs

2023-04-20 11:23:05

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 3/9] tty: n_gsm: add missing description to gsm_config

On Thu, Apr 20, 2023 at 11:08:32AM +0200, Jiri Slaby wrote:
> On 20. 04. 23, 10:50, D. Starke wrote:
> > From: Daniel Starke <[email protected]>
> >
> > Currently, all available structure fields in gsmmux.h except those
> > for gsm_config are commented.
> >
> > Fix this by adding appropriate comments to the not commented fields.
> > 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.
>
> Maybe you can start documenting them using kernel-doc? And convert the
> others and expose them all to Documentation and finally to:
> https://www.kernel.org/doc/html/latest/
> ?

I agree, this should be done in kerneldoc format please.

thanks,

greg k-h