mbm: merge updated Ericsson 'mbm' driver from git://gitorious.org/~torgny_j/modemmanager/mbm-mainline.git
And other cleanups by Dan.
This commit is contained in:

committed by
Dan Williams

parent
440cd967e2
commit
ef0a604dc2
File diff suppressed because it is too large
Load Diff
@@ -1,27 +1,27 @@
|
|||||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
/*
|
/*
|
||||||
Additions to NetworkManager, network-manager-applet and modemmanager
|
* Copyright (C) 2008 Ericsson AB
|
||||||
for supporting Ericsson modules like F3507g.
|
*
|
||||||
|
* Author: Per Hallsmark <per.hallsmark@ericsson.com>
|
||||||
Author: Per Hallsmark <per@hallsmark.se>
|
* Bjorn Runaker <bjorn.runaker@ericsson.com>
|
||||||
Bjorn Runaker <bjorn.runaker@ericsson.com>
|
* Torgny Johansson <torgny.johansson@ericsson.com>
|
||||||
|
* Jonas Sjöquist <jonas.sjoquist@ericsson.com>
|
||||||
This program is free software; you can redistribute it and/or modify
|
*
|
||||||
it under the terms of the GNU General Public License as published by
|
* This program is free software; you can redistribute it and/or modify
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
* it under the terms of the GNU General Public License as published by
|
||||||
(at your option) any later version.
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
This program is distributed in the hope that it will be useful,
|
*
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* This program is distributed in the hope that it will be useful,
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MM_MODEM_MBM_H
|
#ifndef MM_MODEM_MBM_H
|
||||||
#define MM_MODEM_MBM_H
|
#define MM_MODEM_MBM_H
|
||||||
@@ -35,6 +35,8 @@
|
|||||||
#define MM_IS_MODEM_MBM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_MODEM_MBM))
|
#define MM_IS_MODEM_MBM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_MODEM_MBM))
|
||||||
#define MM_MODEM_MBM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_MODEM_MBM, MMModemMbmClass))
|
#define MM_MODEM_MBM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_MODEM_MBM, MMModemMbmClass))
|
||||||
|
|
||||||
|
#define MM_MODEM_MBM_NETWORK_DEVICE "network-device"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
MMGenericGsm parent;
|
MMGenericGsm parent;
|
||||||
} MMModemMbm;
|
} MMModemMbm;
|
||||||
|
@@ -1,26 +1,24 @@
|
|||||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
/*
|
/*
|
||||||
Additions to NetworkManager, network-manager-applet and modemmanager
|
* Copyright (C) 2008 Ericsson AB
|
||||||
for supporting Ericsson modules like F3507g.
|
*
|
||||||
|
* Author: Per Hallsmark <per.hallsmark@ericsson.com>
|
||||||
Author: Per Hallsmark <per@hallsmark.se>
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
This program is free software; you can redistribute it and/or modify
|
* it under the terms of the GNU General Public License as published by
|
||||||
it under the terms of the GNU General Public License as published by
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
* (at your option) any later version.
|
||||||
(at your option) any later version.
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
This program is distributed in the hope that it will be useful,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
GNU General Public License for more details.
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
You should have received a copy of the GNU General Public License
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
along with this program; if not, write to the Free Software
|
*
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
*/
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gmodule.h>
|
#include <gmodule.h>
|
||||||
@@ -187,7 +185,7 @@ supports_udi (MMPlugin *plugin, LibHalContext *hal_ctx, const char *udi)
|
|||||||
gboolean supported = FALSE;
|
gboolean supported = FALSE;
|
||||||
|
|
||||||
driver_name = get_driver (hal_ctx, udi);
|
driver_name = get_driver (hal_ctx, udi);
|
||||||
if (driver_name && !strcmp (driver_name, "mbm")) {
|
if (driver_name && (!strcmp (driver_name, "cdc_ether") || !strcmp (driver_name, "mbm"))) {
|
||||||
char **capabilities;
|
char **capabilities;
|
||||||
char **iter;
|
char **iter;
|
||||||
|
|
||||||
|
@@ -1,26 +1,24 @@
|
|||||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
/*
|
/*
|
||||||
Additions to NetworkManager, network-manager-applet and modemmanager
|
* Copyright (C) 2008 Ericsson AB
|
||||||
for supporting Ericsson modules like F3507g.
|
*
|
||||||
|
* Author: Per Hallsmark <per.hallsmark@ericsson.com>
|
||||||
Author: Per Hallsmark <per@hallsmark.se>
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
This program is free software; you can redistribute it and/or modify
|
* it under the terms of the GNU General Public License as published by
|
||||||
it under the terms of the GNU General Public License as published by
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
* (at your option) any later version.
|
||||||
(at your option) any later version.
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
This program is distributed in the hope that it will be useful,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
GNU General Public License for more details.
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
You should have received a copy of the GNU General Public License
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
along with this program; if not, write to the Free Software
|
*
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
*/
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MM_PLUGIN_MBM_H
|
#ifndef MM_PLUGIN_MBM_H
|
||||||
#define MM_PLUGIN_MBM_H
|
#define MM_PLUGIN_MBM_H
|
||||||
|
@@ -881,7 +881,7 @@ scan_done (MMSerial *serial,
|
|||||||
reply += 7;
|
reply += 7;
|
||||||
|
|
||||||
/* Pattern without crazy escaping using | for matching: (|\d|,"|.+|","|.+|","|.+|",|\d|) */
|
/* Pattern without crazy escaping using | for matching: (|\d|,"|.+|","|.+|","|.+|",|\d|) */
|
||||||
r = g_regex_new ("\\((\\d),\"(.+)\",\"(.+)\",\"(.+)\",(\\d)\\)", G_REGEX_UNGREEDY, 0, &err);
|
r = g_regex_new ("\\((\\d),\"(.*)\",\"(.*)\",\"(.*)\",(\\d)\\)", G_REGEX_UNGREEDY, 0, &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
g_error ("Invalid regular expression: %s", err->message);
|
g_error ("Invalid regular expression: %s", err->message);
|
||||||
g_error_free (err);
|
g_error_free (err);
|
||||||
|
Reference in New Issue
Block a user