mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 09:30:13 +01:00
modem: use only usb interface 0 for Option modems driven by 'option'
Actual Option cards (not cards by other manufacturers that just happen to use the 'option' driver) are supposed to always use usb interface 0 as the "modem" port, per mail with Option engineering. Only the "modem" port will emit unsolicited responses like CONNECT which of course are required to drive the card.
This commit is contained in:
parent
153cb64d4e
commit
9d7f5b3d08
1 changed files with 23 additions and 1 deletions
|
|
@ -570,7 +570,7 @@ modem_device_creator (NMHalManager *self,
|
|||
type_gsm ? "GSM" : "CDMA",
|
||||
udev ? "udev" : "HAL");
|
||||
|
||||
/* Special handling of 'hso' cards (until punted out to a modem manager) */
|
||||
/* Special handling of 'hso' cards (until punted to ModemManager) */
|
||||
if (type_gsm && !strcmp (driver, "hso")) {
|
||||
char *hsotype_path;
|
||||
char *contents = NULL;
|
||||
|
|
@ -595,6 +595,28 @@ modem_device_creator (NMHalManager *self,
|
|||
netdev = get_hso_netdev (priv->hal_ctx, udi);
|
||||
}
|
||||
|
||||
/* Special handling of Option cards (until punted to ModemManager). Only
|
||||
* the first USB interface can be used for control and PPP.
|
||||
*/
|
||||
if (type_gsm && !strcmp (driver, "option")) {
|
||||
char *parent;
|
||||
guint32 vendor_id = 0, usb_interface = 0;
|
||||
|
||||
parent = libhal_device_get_property_string (priv->hal_ctx, udi, "info.parent", NULL);
|
||||
if (!parent)
|
||||
goto out;
|
||||
|
||||
vendor_id = libhal_device_get_property_int (priv->hal_ctx, parent, "usb.vendor_id", NULL);
|
||||
if (vendor_id == 0x0AF0) {
|
||||
usb_interface = libhal_device_get_property_int (priv->hal_ctx, parent, "usb.interface.number", NULL);
|
||||
if (usb_interface > 0) {
|
||||
g_free (parent);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
g_free (parent);
|
||||
}
|
||||
|
||||
if (type_gsm) {
|
||||
if (netdev)
|
||||
device = (GObject *) nm_hso_gsm_device_new (udi, ttyname, NULL, netdev, driver, managed);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue