modemmanager: Check only whitelisted devices
With this whitelist, we make sure that only toby-l2 devices are handled by ModemManager and that it won't mess up with other serial or net devices. BugzID: 59772 BugzID: 59771
This commit is contained in:
parent
4310ef1b0a
commit
7ced09c9c9
|
|
@ -0,0 +1,12 @@
|
||||||
|
ACTION!="add|change|move|bind", GOTO="mm_netmodule_whitelist_end"
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1546", GOTO="mm_netmodule_whitelist"
|
||||||
|
GOTO="mm_netmodule_whitelist_end"
|
||||||
|
|
||||||
|
LABEL="mm_netmodule_whitelist"
|
||||||
|
|
||||||
|
# TOBY-L200
|
||||||
|
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="1141", ENV{ID_MM_DEVICE_PROCESS}="1"
|
||||||
|
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="1143", ENV{ID_MM_DEVICE_PROCESS}="1"
|
||||||
|
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="1146", ENV{ID_MM_DEVICE_PROCESS}="1"
|
||||||
|
|
||||||
|
LABEL="mm_netmodule_whitelist_end"
|
||||||
|
|
@ -4,3 +4,10 @@ SRC_URI = "git://gitlab.com/netmodule/third-party/ModemManager;protocol=ssh;user
|
||||||
SRCREV = "${AUTOREV}"
|
SRCREV = "${AUTOREV}"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
SRC_URI += "file://77-mm-netmodule-whitelist.rules"
|
||||||
|
|
||||||
|
do_install_append() {
|
||||||
|
install -m 0644 ${WORKDIR}/77-mm-netmodule-whitelist.rules ${D}${libdir}/udev/rules.d/
|
||||||
|
sed -i -e 's/bin\/ModemManager/bin\/ModemManager --filter-policy=WHITELIST-ONLY/g' ${D}${systemd_unitdir}/system/ModemManager.service
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue