NetworkManager/src/devices/bluetooth
Dan Williams 27f91d054c core: simplify hardware address reading
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.
2014-07-23 12:53:55 -05:00
..
exports.ver bluez: implement plugin symbol visibility 2014-05-13 13:50:25 -05:00
Makefile.am core: fill in nm-types.h, clean out other headers 2014-07-23 10:56:26 -04:00
nm-bluez-common.h bluez: make Bluetooth support a plugin 2014-03-03 09:32:41 -06:00
nm-bluez-device.c bluez: suppress warning when already disconnected 2014-07-03 18:50:50 -05:00
nm-bluez-device.h bluez: make Bluetooth support a plugin 2014-03-03 09:32:41 -06:00
nm-bluez-manager.c devices: simplify plugin type checking 2014-05-13 13:50:25 -05:00
nm-bluez-manager.h bluez: make Bluetooth support a plugin 2014-03-03 09:32:41 -06:00
nm-bluez4-adapter.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-bluez4-adapter.h bluez: make Bluetooth support a plugin 2014-03-03 09:32:41 -06:00
nm-bluez4-manager.c bluez: make Bluetooth support a plugin 2014-03-03 09:32:41 -06:00
nm-bluez4-manager.h bluez: make Bluetooth support a plugin 2014-03-03 09:32:41 -06:00
nm-bluez5-manager.c bluez: make Bluetooth support a plugin 2014-03-03 09:32:41 -06:00
nm-bluez5-manager.h bluez: make Bluetooth support a plugin 2014-03-03 09:32:41 -06:00
nm-device-bt.c core: simplify hardware address reading 2014-07-23 12:53:55 -05:00
nm-device-bt.h bluez: make Bluetooth support a plugin 2014-03-03 09:32:41 -06:00