[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe8c6288-1df-bdb0-34d-68e6cb983a7a@linux.intel.com>
Date: Wed, 5 Apr 2023 12:00:28 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: "D. Starke" <daniel.starke@...mens.com>
cc: linux-serial <linux-serial@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 7/9] tty: n_gsm: increase gsm_mux unsupported counted
where appropriate
On Wed, 5 Apr 2023, D. Starke wrote:
> From: Daniel Starke <daniel.starke@...mens.com>
>
> The structure gsm_mux contains the 'unsupported' field. However, there is
> currently no place in the code which increases this counter.
>
> Increase the 'unsupported' statistics counter in the following case:
> - an unsupported frame type has been requested by the peer via parameter
> negotiation
> - a control frame with an unsupported but known command has been received
So inconsistent/unsupported adaptation doesn't fall under the second
bullet?
(Please excuse my ignorance, I'm trying to review your patches with
somewhat limited knowledge about how things work).
--
i.
> Signed-off-by: Daniel Starke <daniel.starke@...mens.com>
> ---
> drivers/tty/n_gsm.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
> index 317aa67ed169..49cb2dbfa233 100644
> --- a/drivers/tty/n_gsm.c
> +++ b/drivers/tty/n_gsm.c
> @@ -1589,6 +1589,7 @@ static int gsm_process_negotiation(struct gsm_mux *gsm, unsigned int addr,
> if (debug & DBG_ERRORS)
> pr_info("%s unsupported I frame request in PN\n",
> __func__);
> + gsm->unsupported++;
> return -EINVAL;
> default:
> if (debug & DBG_ERRORS)
> @@ -1896,6 +1897,8 @@ static void gsm_control_message(struct gsm_mux *gsm, unsigned int command,
> /* Optional unsupported commands */
> case CMD_RPN: /* Remote port negotiation */
> case CMD_SNC: /* Service negotiation command */
> + gsm->unsupported++;
> + fallthrough;
> default:
> /* Reply to bad commands with an NSC */
> buf[0] = command;
>
Powered by blists - more mailing lists