aboutsummaryrefslogtreecommitdiffstats
path: root/fsodeviced
diff options
context:
space:
mode:
authorSimon Busch <morphis@gravedo.de>2012-07-09 15:16:09 +0200
committerSimon Busch <morphis@gravedo.de>2012-07-09 15:16:09 +0200
commit078a92ad83c09fe239d7f7aab35d7dd93cc89fe2 (patch)
treee07eb136c61eab1b95cefc88408059759adee5a6 /fsodeviced
parent68fa682a28466d66700eeec9794bfe48f1acd361 (diff)
downloadcornucopia-078a92ad83c09fe239d7f7aab35d7dd93cc89fe2.tar.gz
cornucopia-078a92ad83c09fe239d7f7aab35d7dd93cc89fe2.tar.bz2
cornucopia-078a92ad83c09fe239d7f7aab35d7dd93cc89fe2.zip
fsodeviced: kernel26_rfkill: add config option to ignore wifi rfkill
Diffstat (limited to 'fsodeviced')
-rw-r--r--fsodeviced/src/plugins/kernel26_rfkill/plugin.vala8
1 files changed, 8 insertions, 0 deletions
diff --git a/fsodeviced/src/plugins/kernel26_rfkill/plugin.vala b/fsodeviced/src/plugins/kernel26_rfkill/plugin.vala
index 95c68074..053ebfae 100644
--- a/fsodeviced/src/plugins/kernel26_rfkill/plugin.vala
+++ b/fsodeviced/src/plugins/kernel26_rfkill/plugin.vala
@@ -132,6 +132,12 @@ class RfKillPowerControl : FsoDevice.ISimplePowerControl, FreeSmartphone.Device.
switch ( event.op )
{
case Linux.RfKillOp.ADD:
+ if ( event.type == Linux.RfKillType.WLAN && ignore_wifi )
+ {
+ warning( @"Ignore WiFi rfkill as defined by configuration" );
+ break;
+ }
+
instances.insert( (int)event.idx, new Kernel26.RfKillPowerControl( event.idx, event.type, event.soft == 1, event.hard == 1 ) );
break;
case Linux.RfKillOp.DEL:
@@ -197,6 +203,7 @@ class RfKillPowerControl : FsoDevice.ISimplePowerControl, FreeSmartphone.Device.
internal HashTable<int,Kernel26.RfKillPowerControl> instances;
internal static string devfs_root;
internal weak FsoFramework.Subsystem subsystem;
+internal static bool ignore_wifi = false;
internal static int fd;
internal static uint watch;
@@ -214,6 +221,7 @@ public static string fso_factory_function( FsoFramework.Subsystem system ) throw
subsystem = system;
devfs_root = FsoFramework.theConfig.stringValue( "cornucopia", "devfs_root", "/dev" );
+ ignore_wifi = FsoFramework.theConfig.boolValue( "fsodevice.kernel26_wifi", "ignore_wifi", false );
fd = Posix.open( Path.build_filename( devfs_root, "rfkill" ), Posix.O_RDWR );
if ( fd == -1 )