public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Tanjeff-Nicolai Moos <tmoos@eltec.de>
To: <netdev@vger.kernel.org>
Subject: qmi_wwan not using netif_carrier_*()
Date: Wed, 17 Jun 2020 15:21:53 +0200	[thread overview]
Message-ID: <20200617152153.2e66ccaf@pm-tm-ubuntu> (raw)

Hi netdevs,

Kernel version:

  I'm working with kernel 4.14.137 (OpenWRT project). But I looked at
  the source of kernel 5.7 and found the same situation.

Problem:

  I'm using the qmi_wwan driver for a Sierra Wireless EM7455 LTE
  modem. This driver does not use
  netif_carrier_on()/netif_carrier_off() to update its link status.
  This confuses ledtrig_netdev which uses netif_carrier_ok() to obtain
  the link status.

My solution:

  As a solution (or workaround?) I would try:

  1) In drivers/net/usb/qmi_wwan.c, lines 904/913: Add the flag
     FLAG_LINK_INTR.

  2) In drivers/net/usb/usbnet.c, functions usbnet_open() and
     usbnet_stop(): Add a call to netif_carrier_*(),
     but only if FLAG_LINK_INTR is set.

Question:

  Is this the intended way to use FLAG_LINK_INTR and netif_carrier_*()?
  Or is there another recommended way to obtain the link status of
  network devices (I could change ledtrig_netdev)?


Kind regards, tanjeff

--

Tanjeff-Nicolai Moos
Dipl.-Inf. (FH)
Senior Software Engineer

ELTEC Elektronik AG, Mainz
_________________________

Fon     +49 6131 918 342
Fax     +49 6131 918 195
Email   tmoos@eltec.de
Web     www.eltec.de

________________________________


*********************************************************
ELTEC Elektronik AG
Galileo-Galilei-Straße 11
D-55129 Mainz

Vorstand: Peter Albert
Aufsichtsratsvorsitzender: Andreas Kochhäuser

Registergericht: Amtsgericht Mainz
Registernummer: HRB 7038
Ust-ID: DE 149 049 790
*********************************************************
Wichtiger Hinweis:
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.
Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Evtl. Anhänge dieser Nachricht wurden auf Viren überprüft!
Jede Form von Vervielfältigung, Abänderung, Verbreitung oder Veröffentlichung dieser E-Mail Nachricht ist untersagt! Das Verwenden von Informationen aus dieser Nachricht für irgendwelche Zwecke ist strengstens untersagt.
Es gelten unsere Allgemeinen Geschäftsbedingungen, zu finden unter www.eltec.de.

             reply	other threads:[~2020-06-17 13:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 13:21 Tanjeff-Nicolai Moos [this message]
2020-06-17 16:48 ` qmi_wwan not using netif_carrier_*() Andrew Lunn
2020-06-17 16:59   ` Dan Williams
2020-06-17 17:24     ` Andrew Lunn
2020-06-17 18:01       ` Dan Williams
2020-06-18 10:08       ` Tanjeff-Nicolai Moos
2020-06-18 20:49         ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200617152153.2e66ccaf@pm-tm-ubuntu \
    --to=tmoos@eltec.de \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox