[PATCH] filter: fix option1 driver name

Dan Williams dcbw at redhat.com
Mon May 7 17:07:44 UTC 2018


On Mon, 2018-05-07 at 18:33 +0200, Aleksander Morgado wrote:
> This was preventing TTY-only ZTE and Huawei modules from being
> grabbed
> in STRICT mode.
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=106253
> https://bugs.freedesktop.org/show_bug.cgi?id=106234

LGTM; the history here is that driver module names (that show up in
sysfs) can be anything, not necessarily the actual name of the module.
Option used to have a "3-port" mode and a "1-port" mode.  The 3-port
mode was removed in 2006, but the name never changed to just "option1"
probably for backwards compatibility reasons.

Dan

> ---
>  src/mm-filter.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mm-filter.c b/src/mm-filter.c
> index 6526cfaa..41529e59 100644
> --- a/src/mm-filter.c
> +++ b/src/mm-filter.c
> @@ -127,7 +127,7 @@ mm_filter_port (MMFilter        *self,
>          /* If the TTY kernel driver is one expected modem kernel
> driver, allow it */
>          driver = mm_kernel_device_get_driver (port);
>          if ((self->priv->enabled_rules & MM_FILTER_RULE_TTY_DRIVER)
> &&
> -            (!g_strcmp0 (driver, "option") ||
> +            (!g_strcmp0 (driver, "option1") ||
>               !g_strcmp0 (driver, "qcserial") ||
>               !g_strcmp0 (driver, "sierra"))) {
>              mm_dbg ("[filter] (%s/%s): port allowed: modem-specific
> kernel driver detected", subsystem, name);


More information about the ModemManager-devel mailing list