summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am17
-rw-r--r--plugins/ofono.rules37
2 files changed, 52 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 86da23fb..0ff8335e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,11 +47,19 @@ gatchat_sources = gatchat/gatchat.h gatchat/gatchat.c \
gatchat/gatsyntax.h gatchat/gatsyntax.c \
gatchat/ringbuffer.h gatchat/ringbuffer.c
+udev_files = plugins/ofono.rules
+
if UDEV
builtin_modules += udev
builtin_sources += plugins/udev.c
builtin_cflags += @UDEV_CFLAGS@
builtin_libadd += @UDEV_LIBS@
+
+if DATAFILES
+rulesdir = @UDEV_DATADIR@
+
+rules_DATA = $(foreach file,$(udev_files), plugins/97-$(notdir $(file)))
+endif
endif
if ISIMODEM
@@ -132,7 +140,8 @@ src_ofonod_LDFLAGS = -Wl,--export-dynamic -Wl,--version-script=src/ofono.ver
src_ofonod_DEPENDENCIES = src/ofono.ver
-CLEANFILES = src/ofono.ver src/ofono.exp src/builtin.h $(local_headers)
+CLEANFILES = src/ofono.ver src/ofono.exp src/builtin.h \
+ $(local_headers) $(rules_DATA)
plugindir = $(libdir)/ofono/plugins
@@ -167,7 +176,8 @@ test_files = test/test-manager test/test-modem test/test-voicecall \
conf_files = src/ofono.conf plugins/modem.conf
-EXTRA_DIST = src/genbuiltin $(doc_files) $(test_files) $(conf_files)
+EXTRA_DIST = src/genbuiltin $(doc_files) \
+ $(test_files) $(conf_files) $(udev_files)
dist_man_MANS = doc/ofonod.8
@@ -216,6 +226,9 @@ src/ofono.ver: src/ofono.exp
$(AM_V_GEN)$(SED) -e "s/\(.*\)/\1;/" $< >> $@
$(AM_V_at)echo "local: *; };" >> $@
+plugins/%.rules:
+ $(AM_V_GEN)cp $(subst 97-,,$@) $@
+
$(src_ofonod_OBJECTS) $(unit_objects): $(local_headers)
include/ofono/version.h: include/version.h
diff --git a/plugins/ofono.rules b/plugins/ofono.rules
new file mode 100644
index 00000000..a446f0de
--- /dev/null
+++ b/plugins/ofono.rules
@@ -0,0 +1,37 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION!="add|change", GOTO="ofono_end"
+SUBSYSTEM!="usb", GOTO="ofono_end"
+ENV{DEVTYPE}!="usb_device", GOTO="ofono_end"
+
+# Ericsson F3507g
+ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1900", ENV{OFONO_DRIVER}="mbm"
+ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1902", ENV{OFONO_DRIVER}="mbm"
+
+# Ericsson F3607gw
+ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1904", ENV{OFONO_DRIVER}="mbm"
+ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1905", ENV{OFONO_DRIVER}="mbm"
+ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1906", ENV{OFONO_DRIVER}="mbm"
+
+# Ericsson F3307
+ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="190a", ENV{OFONO_DRIVER}="mbm"
+ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1909", ENV{OFONO_DRIVER}="mbm"
+
+# Sony-Ericsson MD300
+ATTRS{idVendor}=="0fce", ATTRS{idProduct}=="d0cf", ENV{OFONO_DRIVER}="mbm"
+
+# Dell 5530 HSDPA
+ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8147", ENV{OFONO_DRIVER}="mbm"
+
+# Dell F3607gw
+ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8183", ENV{OFONO_DRIVER}="mbm"
+ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8184", ENV{OFONO_DRIVER}="mbm"
+
+# Toshiba
+ATTRS{idVendor}=="0930", ATTRS{idProduct}=="130b", ENV{OFONO_DRIVER}="mbm"
+
+# Toshiba F3607gw
+ATTRS{idVendor}=="0930", ATTRS{idProduct}=="130c", ENV{OFONO_DRIVER}="mbm"
+ATTRS{idVendor}=="0930", ATTRS{idProduct}=="1311", ENV{OFONO_DRIVER}="mbm"
+
+LABEL="ofono_end"