Skip to content

Commit 67d1a89

Browse files
lkundrakkuba-moo
authored andcommitted
rndis_host: Flag RNDIS modems as WWAN devices
Set FLAG_WWAN instead of FLAG_ETHERNET for RNDIS interfaces on Mobile Broadband Modems, as opposed to regular Ethernet adapters. Otherwise NetworkManager gets confused, misjudges the device type, and wouldn't know it should connect a modem to get the device to work. What would be the result depends on ModemManager version -- older ModemManager would end up disconnecting a device after an unsuccessful probe attempt (if it connected without needing to unlock a SIM), while a newer one might spawn a separate PPP connection over a tty interface instead, resulting in a general confusion and no end of chaos. The only way to get this work reliably is to fix the device type and have good enough version ModemManager (or equivalent). Fixes: 63ba395 ("rndis_host: support Novatel Verizon USB730L") Signed-off-by: Lubomir Rintel <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 23f0080 commit 67d1a89

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

drivers/net/usb/rndis_host.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,16 @@ static const struct driver_info zte_rndis_info = {
630630
.tx_fixup = rndis_tx_fixup,
631631
};
632632

633+
static const struct driver_info wwan_rndis_info = {
634+
.description = "Mobile Broadband RNDIS device",
635+
.flags = FLAG_WWAN | FLAG_POINTTOPOINT | FLAG_FRAMING_RN | FLAG_NO_SETINT,
636+
.bind = rndis_bind,
637+
.unbind = rndis_unbind,
638+
.status = rndis_status,
639+
.rx_fixup = rndis_rx_fixup,
640+
.tx_fixup = rndis_tx_fixup,
641+
};
642+
633643
/*-------------------------------------------------------------------------*/
634644

635645
static const struct usb_device_id products [] = {
@@ -666,9 +676,11 @@ static const struct usb_device_id products [] = {
666676
USB_INTERFACE_INFO(USB_CLASS_WIRELESS_CONTROLLER, 1, 3),
667677
.driver_info = (unsigned long) &rndis_info,
668678
}, {
669-
/* Novatel Verizon USB730L */
679+
/* Mobile Broadband Modem, seen in Novatel Verizon USB730L and
680+
* Telit FN990A (RNDIS)
681+
*/
670682
USB_INTERFACE_INFO(USB_CLASS_MISC, 4, 1),
671-
.driver_info = (unsigned long) &rndis_info,
683+
.driver_info = (unsigned long)&wwan_rndis_info,
672684
},
673685
{ }, // END
674686
};

0 commit comments

Comments
 (0)