[PATCH hal-info] add a WWAN (Wireless WAN/Cellular) killswitch for Dell laptops

Faidon Liambotis paravoid at debian.org
Sun Aug 5 05:27:14 PDT 2007


Add Dell's WWAN killswitch (HAL 0.5.10) to the FDI.
---
 configure.in                                       |   11 ++++++++
 .../10freedesktop/10-dell-rfkill-switch-wwan.fdi   |   26 ++++++++++++++++++++
 2 files changed, 37 insertions(+), 0 deletions(-)
 create mode 100644 fdi/information/10freedesktop/10-dell-rfkill-switch-wwan.fdi

diff --git a/configure.in b/configure.in
index 7442a11..301d0e7 100644
--- a/configure.in
+++ b/configure.in
@@ -40,6 +40,12 @@ AC_ARG_ENABLE(killswitch_dell_bluetooth, [  --enable-killswitch-dell-bluetooth
 AM_CONDITIONAL(BUILD_KILLSWITCH_DELL_BLUETOOTH, test x$enable_killswitch_dell_bluetooth == xyes)
 
 dnl ---------------------------------------------------------------------------
+dnl - Should we enable WWAN killswitch support for Dell laptops?
+dnl ---------------------------------------------------------------------------
+AC_ARG_ENABLE(killswitch_dell_wwan, [  --enable-killswitch-dell-wwan   Include support for WWAN killswitch],enable_killswitch_dell_wwan=$enableval,enable_killswitch_dell_wwan=yes)
+AM_CONDITIONAL(BUILD_KILLSWITCH_DELL_WWAN, test x$enable_killswitch_dell_wwan == xyes)
+
+dnl ---------------------------------------------------------------------------
 dnl - Should we enable Bluetooth killswitch support for Sony laptops?
 dnl ---------------------------------------------------------------------------
 AC_ARG_ENABLE(killswitch_sony_bluetooth, [  --enable-killswitch-sony-bluetooth   Include support for Bluetooth killswitch],enable_killswitch_sony_bluetooth=$enableval,enable_killswitch_sony_bluetooth=yes)
@@ -55,6 +61,10 @@ if ! $PKG_CONFIG --atleast-version 0.5.10 hal; then
       AC_MSG_WARN([hal 0.5.10 or later is required for ipw killswitch. Disabling this feature.])
       enable_killswitch_ipw_wlan=no
    fi
+   if test x$enable_killswitch_dell_wwan == xyes ; then
+      AC_MSG_WARN([hal 0.5.10 or later is required for Dell WWAN killswitch. Disabling this feature.])
+      enable_killswitch_dell_wwan=no
+   fi
 fi
 
 AM_CONDITIONAL(BUILD_KILLSWITCH_IPW_WLAN, test x$enable_killswitch_ipw_wlan == xyes)
@@ -85,6 +95,7 @@ echo "
         video suspend data:                     ${enable_video}
         killswitch support for Dell wlan:       ${enable_killswitch_dell_wlan}
         killswitch support for Dell Bluetooth:  ${enable_killswitch_dell_bluetooth}
+        killswitch support for Dell wwan:       ${enable_killswitch_dell_wwan}
         killswitch support for Sony Bluetooth:  ${enable_killswitch_sony_bluetooth}
         killswitch support for IPW wlan:        ${enable_killswitch_ipw_wlan} (requires hal >= 0.5.10)
 "
diff --git a/fdi/information/10freedesktop/10-dell-rfkill-switch-wwan.fdi b/fdi/information/10freedesktop/10-dell-rfkill-switch-wwan.fdi
new file mode 100644
index 0000000..b975a8a
--- /dev/null
+++ b/fdi/information/10freedesktop/10-dell-rfkill-switch-wwan.fdi
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deviceinfo version="0.2">
+
+  <device>
+    <match key="system.kernel.name" string="Linux"> 
+      <match key="system.hardware.vendor" string="Dell Inc.">
+        <match key="system.formfactor" string="laptop">
+	  <!-- TODO: check if laptop actually sports an SMI interface -->
+          <spawn udi="/org/freedesktop/Hal/devices/dell_wwan_switch"/>
+        </match>
+      </match>
+    </match>
+  </device>
+
+  <device>
+    <match key="info.udi" string="/org/freedesktop/Hal/devices/dell_wwan_switch">
+      <append key="info.capabilities" type="strlist">killswitch</append>
+      <merge key="info.product" type="string">Dell WWAN Switch</merge>
+      <merge key="info.category" type="string">killswitch</merge>
+      <merge key="killswitch.type" type="string">wwan</merge>
+      <merge key="killswitch.access_method" type="string">dell</merge>
+    </match>
+  </device>
+
+</deviceinfo>
-- 
1.5.2.4



More information about the hal mailing list