fibocom: MBIM in shared utils is optional
This commit is contained in:
+3
-5
@@ -303,7 +303,7 @@ enable_gtk_doc = get_option('gtk_doc')
|
||||
enable_plugins = not get_option('auto_features').disabled()
|
||||
|
||||
plugins_shared_reqs = {
|
||||
'fibocom': enable_mbim,
|
||||
'fibocom': true,
|
||||
'foxconn': enable_mbim,
|
||||
'icera': true,
|
||||
'novatel': true,
|
||||
@@ -313,13 +313,11 @@ plugins_shared_reqs = {
|
||||
'xmm': true,
|
||||
}
|
||||
|
||||
|
||||
fibocom_shared_reqs = ['xmm']
|
||||
dell_shared_reqs = ['novatel', 'sierra', 'telit', 'xmm']
|
||||
mtk_shared_reqs = []
|
||||
if enable_mbim
|
||||
fibocom_shared_reqs += ['fibocom']
|
||||
dell_shared_reqs += ['foxconn']
|
||||
# only the MBIM implementation in MTK needs the shared fibocom utils
|
||||
mtk_shared_reqs += ['fibocom']
|
||||
endif
|
||||
|
||||
@@ -330,7 +328,7 @@ plugins_options_reqs = {
|
||||
'cinterion': {'available': true, 'shared': []},
|
||||
'dell': {'available': true, 'shared': dell_shared_reqs},
|
||||
'dlink': {'available': true, 'shared': []},
|
||||
'fibocom': {'available': true, 'shared': fibocom_shared_reqs},
|
||||
'fibocom': {'available': true, 'shared': ['xmm', 'fibocom']},
|
||||
'foxconn': {'available': enable_mbim, 'shared': ['foxconn']},
|
||||
'generic': {'available': true, 'shared': []},
|
||||
'gosuncn': {'available': true, 'shared': []},
|
||||
|
||||
@@ -24,11 +24,12 @@
|
||||
|
||||
#include "mm-log-object.h"
|
||||
#include "mm-broadband-modem.h"
|
||||
#include "mm-broadband-modem-mbim.h"
|
||||
#include "mm-iface-modem.h"
|
||||
#include "mm-shared-fibocom.h"
|
||||
#include "mm-port-mbim-fibocom.h"
|
||||
#include "mm-base-modem-at.h"
|
||||
#if defined WITH_MBIM
|
||||
# include "mm-port-mbim-fibocom.h"
|
||||
#endif
|
||||
|
||||
G_DEFINE_INTERFACE (MMSharedFibocom, mm_shared_fibocom, MM_TYPE_IFACE_MODEM)
|
||||
|
||||
@@ -79,6 +80,8 @@ get_private (MMSharedFibocom *self)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#if defined WITH_MBIM
|
||||
|
||||
MMPort *
|
||||
mm_shared_fibocom_create_usbmisc_port (MMBaseModem *self,
|
||||
const gchar *name,
|
||||
@@ -111,6 +114,8 @@ mm_shared_fibocom_create_wwan_port (MMBaseModem *self,
|
||||
return priv->class_parent->create_wwan_port (self, name, ptype);
|
||||
}
|
||||
|
||||
#endif /* WITH_MBIM */
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
void
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#ifndef MM_SHARED_FIBOCOM_H
|
||||
#define MM_SHARED_FIBOCOM_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
@@ -38,6 +40,8 @@ struct _MMSharedFibocomInterface {
|
||||
|
||||
void mm_shared_fibocom_setup_ports (MMBroadbandModem *self);
|
||||
|
||||
#if defined WITH_MBIM
|
||||
|
||||
MMPort *mm_shared_fibocom_create_usbmisc_port (MMBaseModem *self,
|
||||
const gchar *name,
|
||||
MMPortType ptype);
|
||||
@@ -45,6 +49,8 @@ MMPort *mm_shared_fibocom_create_wwan_port (MMBaseModem *self,
|
||||
const gchar *name,
|
||||
MMPortType ptype);
|
||||
|
||||
#endif
|
||||
|
||||
void mm_shared_fibocom_firmware_load_update_settings (MMIfaceModemFirmware *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
@@ -66,18 +66,23 @@ if enable_qmi
|
||||
plugins_deps += qmi_glib_dep
|
||||
endif
|
||||
|
||||
# common Fibocom support library (MBIM only)
|
||||
# common Fibocom support library
|
||||
if plugins_shared['fibocom']
|
||||
fibocom_inc = include_directories('fibocom')
|
||||
|
||||
c_args = '-DMM_MODULE_NAME="shared-fibocom"'
|
||||
|
||||
sources = files(
|
||||
'fibocom/mm-port-mbim-fibocom.c',
|
||||
'fibocom/mm-shared.c',
|
||||
'fibocom/mm-shared-fibocom.c',
|
||||
)
|
||||
|
||||
if enable_mbim
|
||||
sources += files(
|
||||
'fibocom/mm-port-mbim-fibocom.c',
|
||||
)
|
||||
endif
|
||||
|
||||
plugins += {'shared-fibocom': {
|
||||
'plugin': false,
|
||||
'module': {'sources': sources, 'include_directories': plugins_incs, 'c_args': c_args},
|
||||
@@ -375,7 +380,7 @@ if plugins_options['fibocom']
|
||||
test_udev_rules_dir_c_args = ['-DTESTUDEVRULESDIR_FIBOCOM="@0@"'.format(plugins_dir / 'fibocom')]
|
||||
plugins_test_udev_rules_dir_c_args += test_udev_rules_dir_c_args
|
||||
|
||||
incs = plugins_incs + [xmm_inc]
|
||||
incs = plugins_incs + [xmm_inc] + [fibocom_inc]
|
||||
|
||||
sources = files(
|
||||
'fibocom/mm-broadband-bearer-fibocom-ecm.c',
|
||||
@@ -383,8 +388,6 @@ if plugins_options['fibocom']
|
||||
'fibocom/mm-plugin-fibocom.c',
|
||||
)
|
||||
if enable_mbim
|
||||
incs += [fibocom_inc]
|
||||
|
||||
sources += files(
|
||||
'fibocom/mm-broadband-modem-mbim-xmm-fibocom.c',
|
||||
'fibocom/mm-broadband-modem-mbim-fibocom.c',
|
||||
|
||||
Reference in New Issue
Block a user