RE: [PATCH 7/9] tty: n_gsm: increase gsm_mux unsupported counted where appropriate

From: Starke, Daniel
Date: Thu Apr 06 2023 - 01:57:16 EST


> > From: Daniel Starke <daniel.starke@xxxxxxxxxxx>
> >
> > 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).

A wrong adaption is nothing we can detect with sufficient accuracy as this
changes the structure of the UI/UIH frames. E.g. a one byte header is added
in case of convergence layer type 2 instead of 1 and contains the modem
signal octet with the state of the signal lines. There is no checksum or
other value which indicates of this field is correct or should be present.
Therefore, we can only assume protocol correctness here.
See also function 'gsm_dlci_data' where this is handled.

Best regards,
Daniel Starke