mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-15 11:30:32 +01:00
We no longer need a class method for reading the hardware address length, for a couple reasons: 1) Using the IP interface hardware address for IP operations now makes NMDevice's priv->hw_addr_len constant. So there's no reason to re-read it all the time. 2) get_hw_address_length() is now only used for determining whether the hardware address is permanent, and that only mattered for Bluetooth. Since Bluetooth interfaces have a bogus interface name, they will never have a valid ifindex, and thus nm_platform_link_get_address() would be useless. So instead of using the 'permanent' stuff, just don't bother updating the hardware address if the NMDevice's ifindex isn't valid, and let subclasses pass the initial hardware address at device creation. This also works correctly for NMDevice classes that previously implemented get_hw_address_length() like ADSL and WWAN, since those too will never have a valid ifindex or a valid hardware address. 3) Reading the device's hardware address length just ended up calling nm_platform_link_get_address() for most devices anyway, so nm_device_update_hw_address() would effectively read the link address twice (once to read the length, the second time to read the actual address). Let's just read the address once. |
||
|---|---|---|
| .. | ||
| exports.ver | ||
| Makefile.am | ||
| nm-bluez-common.h | ||
| nm-bluez-device.c | ||
| nm-bluez-device.h | ||
| nm-bluez-manager.c | ||
| nm-bluez-manager.h | ||
| nm-bluez4-adapter.c | ||
| nm-bluez4-adapter.h | ||
| nm-bluez4-manager.c | ||
| nm-bluez4-manager.h | ||
| nm-bluez5-manager.c | ||
| nm-bluez5-manager.h | ||
| nm-device-bt.c | ||
| nm-device-bt.h | ||