New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wlanloader] WLAN loader plugin #81
Conversation
|
This second version fixes comments from spiiroin and adds some missing "wlanloader:" prefixes to error / debug prints. Works quite well with patched up connman that does not crash anymore in case wlan module goes away. |
| static void reset_wlan_module(void) | ||
| { | ||
| DBusError err = DBUS_ERROR_INIT; | ||
| DBusPendingCall *pc = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'pc' variable is not really used -> should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, removing.
|
One minor comment, otherwise LGTM |
| } | ||
|
|
||
| if (!dbus_connection_send_with_reply(conn, req, &pc, -1)) | ||
| goto cleanup; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
synchronous call similar to other things, can this block other dsme operations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, this is how async calls are made via libdbus, the callback is assigned in set_notify below
|
LGTM, however it would be probably more efficient to use libkmod but in that case it would be hw adaptation specific instead of current way which can easily change on each hw adaptation. |
|
I had a version with libkmod, but that introduces minimum 500ms blocking calls when loading and unloading modules, which was not acceptable for system critical component like dsme. |
|
V3:
|
Apparently Android by default resets the WLAN driver after every use of WLAN hotspot. To make it easier to work with android kernels whose WLAN module depends on this kind of reset service, this plugin will imitate that behavior by reloading the kernel module via a systemd service after each use of WLAN hotspot. If you want to utilize this plugin, please add a systemd system service that is named "wlan-module-load.service" to your adaptation project. The service should modprobe the wlan kernel module at ExecStart, and rmmod it at ExecStop. If the systemd service is not present in the system, the plugin will not do anything. Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jolla.com>
|
V4:
|
|
All commented issues fixed now. Merging. |
[wlanloader] WLAN loader plugin
Apparently Android by default resets the WLAN driver after
every use of WLAN hotspot. To make it easier to work with android
kernels whose WLAN module depends on this kind of reset service,
this plugin will imitate that behavior by reloading the
kernel module via a systemd service after each use of
WLAN hotspot.
If you want to utilize this plugin, please add a systemd system
service that is named "wlan-module-load.service" to your adaptation
project. The service should modprobe the wlan kernel module at
ExecStart, and rmmod it at ExecStop.
If the systemd service is not present in the system, the plugin will
not do anything.
Signed-off-by: Kalle Jokiniemi kalle.jokiniemi@jolla.com