hso: Set modem name based on udev network interface name
PATCH 1/1 hso: Set modem name based on udev network interface name
Useful if you have multiple identical modems and you need a way to know which modem you're talking to.
--- plugins/udev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
plugins/udev.c +1 -0
@@ -191,6 +191,7 @@ static void add_hso(struct ofono_modem *modem, } else if (g_str_equal(subsystem, "net") == TRUE) { devnode = get_property(udev_device, "INTERFACE"); ofono_modem_set_string(modem, NETWORK_INTERFACE, devnode); + ofono_modem_set_name(modem, devnode); } else { return; }
--
Hi Benoît,
Quoted 11 lines · Benoît Monin
Useful if you have multiple identical modems and you need a way to know which modem you're talking to.
--- plugins/udev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)plugins/udev.c +0
-0
plugins/udev.c static void add_hso(struct ofono_modem *modem, · line 194
Quoted 4 lines
plugins/udev.c +1
-0@@ -191,6 +191,7 @@ static void add_hso(struct ofono_modem *modem, }else if (g_str_equal (subsystem,"net" ) == TRUE) { devnode =get_property (udev_device,"INTERFACE" );ofono_modem_set_string (modem,NETWORK_INTERFACE , devnode); +ofono_modem_set_name (modem, devnode);
I prefer you do this in plugins/hso and not in udev.
Regards,
-Denis