Add udev rules to identify modem driver

This commit is contained in:
Marcel Holtmann 2009-09-02 22:21:42 -07:00
parent 60284f0c4e
commit b6acdcf905
2 changed files with 52 additions and 2 deletions

View File

@ -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

37
plugins/ofono.rules Normal file
View File

@ -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"