huaweimodem: Move CDMA network registration into default driver

With merging the GSM/UTMS and CDMA modem plugin into a unified version,
it also makes sense to merge the Huawei specific vendor atom drivers
into one.
This commit is contained in:
Marcel Holtmann 2012-01-06 19:52:34 -08:00
parent c7ec6efa4e
commit b9e86d98be
6 changed files with 17 additions and 83 deletions

View File

@ -192,7 +192,8 @@ builtin_sources += drivers/atmodem/atutil.h \
drivers/huaweimodem/voicecall.c \
drivers/huaweimodem/audio-settings.c \
drivers/huaweimodem/gprs-context.c \
drivers/huaweimodem/radio-settings.c
drivers/huaweimodem/radio-settings.c \
drivers/huaweimodem/cdma-netreg.c
builtin_modules += calypsomodem
builtin_sources += drivers/atmodem/atutil.h \
@ -274,12 +275,6 @@ builtin_sources += drivers/cdmamodem/cdmamodem.h \
drivers/cdmamodem/voicecall.c \
drivers/cdmamodem/devinfo.c \
drivers/cdmamodem/connman.c
builtin_modules += huaweicdmamodem
builtin_sources += drivers/huaweicdmamodem/huaweicdmamodem.h \
drivers/huaweicdmamodem/huaweicdmamodem.c \
drivers/huaweicdmamodem/network-registration.c
endif
builtin_modules += g1

View File

@ -1,45 +0,0 @@
/*
*
* oFono - Open Source Telephony
*
* Copyright (C) 2008-2011 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#define OFONO_API_SUBJECT_TO_CHANGE
#include <ofono/plugin.h>
#include "huaweicdmamodem.h"
static int huaweicdmamodem_init(void)
{
huaweicdma_netreg_init();
return 0;
}
static void huaweicdmamodem_exit(void)
{
huaweicdma_netreg_exit();
}
OFONO_PLUGIN_DEFINE(huaweicdmamodem, "Huawei CDMA modem driver", VERSION,
OFONO_PLUGIN_PRIORITY_DEFAULT,
huaweicdmamodem_init, huaweicdmamodem_exit)

View File

@ -1,23 +0,0 @@
/*
*
* oFono - Open Source Telephony
*
* Copyright (C) 2008-2011 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
extern void huaweicdma_netreg_init(void);
extern void huaweicdma_netreg_exit(void);

View File

@ -33,7 +33,7 @@
#include "gatchat.h"
#include "huaweicdmamodem.h"
#include "huaweimodem.h"
static const char *sysinfo_prefix[] = { "^SYSINFO:", NULL };
@ -188,7 +188,7 @@ static void probe_cb(gboolean ok, GAtResult *result, gpointer user_data)
ofono_cdma_netreg_register(netreg);
}
static int huaweicdma_netreg_probe(struct ofono_cdma_netreg *netreg,
static int huawei_cdma_netreg_probe(struct ofono_cdma_netreg *netreg,
unsigned int vendor, void *data)
{
GAtChat *chat = g_at_chat_clone(data);
@ -201,7 +201,7 @@ static int huaweicdma_netreg_probe(struct ofono_cdma_netreg *netreg,
return 0;
}
static void huaweicdma_netreg_remove(struct ofono_cdma_netreg *netreg)
static void huawei_cdma_netreg_remove(struct ofono_cdma_netreg *netreg)
{
GAtChat *chat = ofono_cdma_netreg_get_data(netreg);
@ -211,17 +211,17 @@ static void huaweicdma_netreg_remove(struct ofono_cdma_netreg *netreg)
}
static struct ofono_cdma_netreg_driver driver = {
.name = "huaweicdmamodem",
.probe = huaweicdma_netreg_probe,
.remove = huaweicdma_netreg_remove,
.name = "huaweimodem",
.probe = huawei_cdma_netreg_probe,
.remove = huawei_cdma_netreg_remove,
};
void huaweicdma_netreg_init(void)
void huawei_cdma_netreg_init(void)
{
ofono_cdma_netreg_driver_register(&driver);
}
void huaweicdma_netreg_exit(void)
void huawei_cdma_netreg_exit(void)
{
ofono_cdma_netreg_driver_unregister(&driver);
}

View File

@ -39,11 +39,15 @@ static int huaweimodem_init(void)
huawei_radio_settings_init();
huawei_gprs_context_init();
huawei_cdma_netreg_init();
return 0;
}
static void huaweimodem_exit(void)
{
huawei_cdma_netreg_exit();
huawei_gprs_context_exit();
huawei_radio_settings_exit();
huawei_audio_settings_exit();

View File

@ -32,3 +32,6 @@ extern void huawei_radio_settings_exit(void);
extern void huawei_gprs_context_init(void);
extern void huawei_gprs_context_exit(void);
extern void huawei_cdma_netreg_init(void);
extern void huawei_cdma_netreg_exit(void);