Re: [PATCH net-next v2 5/6] net/lapb: support netdev events

Xie He
2020-11-16T20:16:15Z

On Mon, Nov 16, 2020 at 6:01 AM Martin Schiller <ms@dev.tdt.de> wrote:
>
> This makes it possible to handle carrier loss and detection.
> In case of Carrier Loss, layer 2 is terminated
> In case of Carrier Detection, we start timer t1 on a DCE interface,
> and on a DTE interface we change to state LAPB_STATE_1 and start
> sending SABM(E).

> + lapb_dbg(0, "(%p): Carrier detected: %s\n",
> + dev, dev->name);
> + if (lapb->mode & LAPB_DCE) {
> + lapb_start_t1timer(lapb);
> + } else {
> + if (lapb->state == LAPB_STATE_0) {
> + lapb->state = LAPB_STATE_1;
> + lapb_establish_data_link(lapb);
> + }
> + }

Do you mean we will now automatically establish LAPB connections
without upper layers instructing us to do so?

If that is the case, is the one-byte header for instructing the LAPB
layer to connect / disconnect no longer needed?