public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* qmi_wwan not using netif_carrier_*()
@ 2020-06-17 13:21 Tanjeff-Nicolai Moos
  2020-06-17 16:48 ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: Tanjeff-Nicolai Moos @ 2020-06-17 13:21 UTC (permalink / raw)
  To: netdev

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-06-18 20:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-17 13:21 qmi_wwan not using netif_carrier_*() Tanjeff-Nicolai Moos
2020-06-17 16:48 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox