Hi,
Here is a fix for handling properly rfkill events.
Currently, all technologies are handled the same way, whether they are related
to rfkill events or not.
If the backend (wpa_s, bluetoothd...) dies: technology is set as unpowered.
However, in case of rfkill driven technology: the switch can be still on, so
the technology is
actually powered but is not shown as powered, so here is a bug.
Might lead to such fishy situtation also in different contexts.
Due to that this patchset introduce a full separation on how a technology is
set as enabled
depending on whether it's rfkill driven or not.
I had to refactor quite a lot of code, to make it cleaner (lot's of style
issue) and to adapt
to the new logic.
Fixes also an issue on hardblock, when an rfkill is removed.
Tested it on two machines, both with weird cascading rfkill devices (one on bt,
one on wifi), worked
well. Though I would not be surprised that crappy hw/drivers might create
corner issues but that has
to be verified.
Please review,
Tomasz Bursztyka (10):
technology: Refactor how technology is set to enable or disable
technology: Add a marker to know if a technology is rfkill driven
technology: Add and handle a marker for softblock status
technology: Refactor rfkill event handling according to soft/hard
block
technology: Refactor and split functions setting enabled state
technology: Change enabled as a boolean and refactor accordingly
technology: Use the right method to enable or disable
device: Add a getter for powered property
technology: Handle fully and properly rfkill driven state
technology: Recompute hardblocked state on rfkill remove event
include/device.h | 1 +
src/device.c | 5 +
src/technology.c | 303 +++++++++++++++++++++++++++++++++----------------------
3 files changed, 187 insertions(+), 122 deletions(-)
--
1.7.12
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman