GNOME Bugzilla – Bug 702190
[review] dcbw/up-down-cleanup
Last modified: 2013-06-14 18:48:55 UTC
Turns out the up/down/is-up functions weren't really used anymore, and we can clean up them nicely. Only a couple device classes used them, and what the functions did was already done in other places (like in device state handlers), could be moved elsewhere (ethernet supplicant manager init, wifi periodic state handler) or was dead code (olpc-mesh). If you see code getting removed (like the remove_all_nsps() or remove_all_aps()) and not moved somewhere else, chances are those functions are already called from the device state handler which should cover the cases where take_down() was used. The second commit for WiMAX is a drive-by that I noticed.
You can use g_clear_object() to clear the supplicant_mgr in NMDeviceEthernet:dispose(). In nm-device.c, would it make sense to just move the if (nm_device_get_act_request (self)) nm_device_deactivate (self, reason); into nm_device_hw_take_down()? Also, maybe remove the _hw_ from the names now? (In a second patch)
Looks good. Also if bond's is_available just calls is_up, that could be handled by NMDevice superclass as it looks more like a rule than an exception.
Merged. And just because removing code is awesome: 10 files changed, 85 insertions(+), 257 deletions(-)
We should leave the is_up/is_available thing for another patch to be sure how it works with devices not backed by a netdev; may need to override the parent function there.