Merge lp:~binli/ubuntu/trusty/modemmanager/lp1441095 into lp:ubuntu/trusty/modemmanager
- Trusty (14.04)
- lp1441095
- Merge into trusty
Status: | Merged |
---|---|
Merged at revision: | 43 |
Proposed branch: | lp:~binli/ubuntu/trusty/modemmanager/lp1441095 |
Merge into: | lp:ubuntu/trusty/modemmanager |
Diff against target: |
7408 lines (+6673/-382) 33 files modified
.pc/applied-patches (+7/-0) .pc/dell-mbim-plugin.patch/plugins/Makefile.am (+419/-0) .pc/dell-mbim-plugin.patch/plugins/novatel/mm-plugin-novatel.c (+127/-0) .pc/mbm-common-library.patch/plugins/Makefile.am (+400/-0) .pc/new-sierra-legacy-plugin.patch/plugins/Makefile.am (+411/-0) .pc/new-sierra-legacy-plugin.patch/plugins/sierra/mm-plugin-sierra.c (+129/-0) .pc/novatel-common-library.patch/plugins/Makefile.am (+381/-0) .pc/novatel-custom-init.patch/plugins/Makefile.am (+379/-0) .pc/novatel-custom-init.patch/plugins/novatel/mm-plugin-novatel.c (+259/-0) .pc/sierra-common-library.patch/plugins/Makefile.am (+391/-0) .pc/sierra-custom-init.patch/plugins/sierra/mm-common-sierra.c (+312/-0) .pc/sierra-custom-init.patch/plugins/sierra/mm-common-sierra.h (+49/-0) .pc/sierra-custom-init.patch/plugins/sierra/mm-plugin-sierra.c (+332/-0) debian/changelog (+6/-0) debian/patches/dell-mbim-plugin.patch (+566/-0) debian/patches/mbm-common-library.patch (+49/-0) debian/patches/new-sierra-legacy-plugin.patch (+295/-0) debian/patches/novatel-common-library.patch (+51/-0) debian/patches/novatel-custom-init.patch (+392/-0) debian/patches/series (+7/-0) debian/patches/sierra-common-library.patch (+54/-0) debian/patches/sierra-custom-init.patch (+531/-0) plugins/Makefile.am (+66/-17) plugins/dell/mm-plugin-dell.c (+440/-0) plugins/dell/mm-plugin-dell.h (+46/-0) plugins/novatel/mm-common-novatel.c (+165/-0) plugins/novatel/mm-common-novatel.h (+31/-0) plugins/novatel/mm-plugin-novatel.c (+4/-138) plugins/sierra/mm-common-sierra.c (+208/-0) plugins/sierra/mm-common-sierra.h (+17/-0) plugins/sierra/mm-plugin-sierra-legacy.c (+99/-0) plugins/sierra/mm-plugin-sierra-legacy.h (+40/-0) plugins/sierra/mm-plugin-sierra.c (+10/-227) |
To merge this branch: | bzr merge lp:~binli/ubuntu/trusty/modemmanager/lp1441095 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu branches | Pending | ||
Bin Li | Pending | ||
Review via email: mp+272054@code.launchpad.net |
This proposal supersedes a proposal from 2015-04-13.
Commit message
Description of the change
Support the MBIM for Dell.
dell-mbim-
It built successfully, but not test it yet.
Sebastien Bacher (seb128) wrote : Posted in a previous version of this proposal | # |
Iain Lane (laney) wrote : Posted in a previous version of this proposal | # |
said on #ubuntu-desktop
02/09 11:56:37 <Laney> BinLi: hi, I hope you're the right BinLi. Can you look to fix wily for https:/
02/09 11:57:45 <Laney> If it's cherry-picks from upstream this can probably go via Debian and maybe cyphermox can help you there
-> Work In Progress - please reset to Needs Review once this is done. Also could you merge the two changelog entries into one please?
Bin Li (binli) wrote : Posted in a previous version of this proposal | # |
Iain & seb128,
Thanks for your reply, this week is holiday in China, I will update it next week.
Bin Li (binli) wrote : Posted in a previous version of this proposal | # |
@Iain, @Seb128,
In trusty, I have finished the patches, I separated the previous patches based on the upstream commit, I merged these together for convenient in first version, I back-ported modemmanager from master branch(1.5) to trusty(1.0), some data structure was changed which I have updated in the backported patches.
For Wily, we need to backport these patch from master branch(1.5) to 1.4 which is used by wily, I'm still working on it.
And yes, if it could be cherry-picks from upstream(1.5) to 1.4, it's the best way, could we let cyphermox to help us? Thanks!
Bin Li (binli) wrote : Posted in a previous version of this proposal | # |
@Iain, @Seb128,
I have done for trusty and wily. Thanks!
Bin Li (binli) wrote : Posted in a previous version of this proposal | # |
Sorry, I just resubmit it to change the status
Shih-Yuan Lee (fourdollars) : | # |
Bin Li (binli) wrote : | # |
Follow Shi-Yuan's advice, I uncommitted the seven commits, and do one commit.
And update the bug number and series for release.
Thanks a lot!
Bin Li (binli) wrote : | # |
Again, with Shi-Yuan's feedback, we should follow the previous code.
http://
I just recommit it with applying all the patches with 'quilt push -a', and ignore all the .timestamp files.
Thanks a lot!
Preview Diff
1 | === modified file '.pc/applied-patches' |
2 | --- .pc/applied-patches 2014-01-14 10:02:26 +0000 |
3 | +++ .pc/applied-patches 2015-09-25 10:05:24 +0000 |
4 | @@ -3,3 +3,10 @@ |
5 | linux-default-usb-id.patch |
6 | glib_fixes.patch |
7 | lp1229748_bluegiga_blacklist.patch |
8 | +novatel-custom-init.patch |
9 | +novatel-common-library.patch |
10 | +sierra-common-library.patch |
11 | +mbm-common-library.patch |
12 | +sierra-custom-init.patch |
13 | +new-sierra-legacy-plugin.patch |
14 | +dell-mbim-plugin.patch |
15 | |
16 | === added directory '.pc/dell-mbim-plugin.patch' |
17 | === added directory '.pc/dell-mbim-plugin.patch/plugins' |
18 | === added file '.pc/dell-mbim-plugin.patch/plugins/Makefile.am' |
19 | --- .pc/dell-mbim-plugin.patch/plugins/Makefile.am 1970-01-01 00:00:00 +0000 |
20 | +++ .pc/dell-mbim-plugin.patch/plugins/Makefile.am 2015-09-25 10:05:24 +0000 |
21 | @@ -0,0 +1,419 @@ |
22 | +include $(top_srcdir)/gtester.make |
23 | + |
24 | +# Common CPPFLAGS and LDFLAGS |
25 | + |
26 | +PLUGIN_COMMON_COMPILER_FLAGS = \ |
27 | + $(MM_CFLAGS) \ |
28 | + $(GUDEV_CFLAGS) \ |
29 | + -I$(top_srcdir) \ |
30 | + -I$(top_srcdir)/src \ |
31 | + -I$(top_builddir)/src \ |
32 | + -I$(top_srcdir)/include \ |
33 | + -I$(top_builddir)/include \ |
34 | + -I$(top_srcdir)/libmm-glib \ |
35 | + -I$(top_srcdir)/libmm-glib/generated \ |
36 | + -I$(top_builddir)/libmm-glib/generated |
37 | + |
38 | +PLUGIN_COMMON_LINKER_FLAGS = \ |
39 | + $(GUDEV_LDFLAGS) \ |
40 | + -module \ |
41 | + -avoid-version |
42 | + |
43 | +if WITH_QMI |
44 | +PLUGIN_COMMON_COMPILER_FLAGS += $(QMI_CFLAGS) |
45 | +endif |
46 | + |
47 | +if WITH_MBIM |
48 | +PLUGIN_COMMON_COMPILER_FLAGS += $(MBIM_CFLAGS) |
49 | +endif |
50 | + |
51 | +# UDev rules |
52 | +udevrulesdir = $(UDEV_BASE_DIR)/rules.d |
53 | +udevrules_DATA = |
54 | + |
55 | +# Unit tests |
56 | +noinst_PROGRAMS = |
57 | + |
58 | +######################################## |
59 | + |
60 | +# Icera-specific support |
61 | +noinst_LTLIBRARIES = libmm-utils-icera.la |
62 | +libmm_utils_icera_la_SOURCES = \ |
63 | + icera/mm-broadband-modem-icera.h \ |
64 | + icera/mm-broadband-modem-icera.c \ |
65 | + icera/mm-broadband-bearer-icera.h \ |
66 | + icera/mm-broadband-bearer-icera.c |
67 | +libmm_utils_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
68 | +libmm_utils_icera_la_LIBADD = $(GUDEV_LDFLAGS) |
69 | + |
70 | +ICERA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/icera |
71 | +ICERA_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-icera.la |
72 | + |
73 | +######################################## |
74 | + |
75 | +pkglib_LTLIBRARIES = \ |
76 | + libmm-plugin-generic.la \ |
77 | + libmm-plugin-nokia.la \ |
78 | + libmm-plugin-nokia-icera.la \ |
79 | + libmm-plugin-cinterion.la \ |
80 | + libmm-plugin-iridium.la \ |
81 | + libmm-plugin-gobi.la \ |
82 | + libmm-plugin-motorola.la \ |
83 | + libmm-plugin-novatel.la \ |
84 | + libmm-plugin-novatel-lte.la \ |
85 | + libmm-plugin-altair-lte.la \ |
86 | + libmm-plugin-samsung.la \ |
87 | + libmm-plugin-option.la \ |
88 | + libmm-plugin-hso.la \ |
89 | + libmm-plugin-anydata.la \ |
90 | + libmm-plugin-linktop.la \ |
91 | + libmm-plugin-simtech.la \ |
92 | + libmm-plugin-wavecom.la \ |
93 | + libmm-plugin-huawei.la \ |
94 | + libmm-plugin-longcheer.la \ |
95 | + libmm-plugin-x22x.la \ |
96 | + libmm-plugin-pantech.la \ |
97 | + libmm-plugin-zte.la \ |
98 | + libmm-plugin-sierra.la \ |
99 | + libmm-plugin-sierra-legacy.la \ |
100 | + libmm-plugin-mbm.la \ |
101 | + libmm-plugin-via.la \ |
102 | + libmm-plugin-telit.la |
103 | + |
104 | +# Generic |
105 | +libmm_plugin_generic_la_SOURCES = \ |
106 | + generic/mm-plugin-generic.c \ |
107 | + generic/mm-plugin-generic.h |
108 | +libmm_plugin_generic_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
109 | +libmm_plugin_generic_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
110 | + |
111 | +## Motorola |
112 | +libmm_plugin_motorola_la_SOURCES = \ |
113 | + motorola/mm-plugin-motorola.c \ |
114 | + motorola/mm-plugin-motorola.h \ |
115 | + motorola/mm-broadband-modem-motorola.c \ |
116 | + motorola/mm-broadband-modem-motorola.h |
117 | +libmm_plugin_motorola_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
118 | +libmm_plugin_motorola_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
119 | + |
120 | +# Gobi |
121 | +libmm_plugin_gobi_la_SOURCES = \ |
122 | + gobi/mm-plugin-gobi.c \ |
123 | + gobi/mm-plugin-gobi.h \ |
124 | + gobi/mm-broadband-modem-gobi.c \ |
125 | + gobi/mm-broadband-modem-gobi.h |
126 | +libmm_plugin_gobi_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
127 | +libmm_plugin_gobi_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
128 | + |
129 | +# Huawei |
130 | +libmm_plugin_huawei_la_SOURCES = \ |
131 | + huawei/mm-plugin-huawei.c \ |
132 | + huawei/mm-plugin-huawei.h \ |
133 | + huawei/mm-modem-helpers-huawei.c \ |
134 | + huawei/mm-modem-helpers-huawei.h \ |
135 | + huawei/mm-broadband-modem-huawei.c \ |
136 | + huawei/mm-broadband-modem-huawei.h \ |
137 | + huawei/mm-broadband-bearer-huawei.c \ |
138 | + huawei/mm-broadband-bearer-huawei.h |
139 | +libmm_plugin_huawei_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
140 | +libmm_plugin_huawei_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
141 | + |
142 | +udevrules_DATA += huawei/77-mm-huawei-net-port-types.rules |
143 | + |
144 | +noinst_PROGRAMS += test-modem-helpers-huawei |
145 | +test_modem_helpers_huawei_SOURCES = \ |
146 | + huawei/mm-modem-helpers-huawei.c \ |
147 | + huawei/mm-modem-helpers-huawei.h \ |
148 | + huawei/tests/test-modem-helpers-huawei.c |
149 | +test_modem_helpers_huawei_CPPFLAGS = \ |
150 | + -I$(top_srcdir)/plugins/huawei \ |
151 | + $(PLUGIN_COMMON_COMPILER_FLAGS) |
152 | +test_modem_helpers_huawei_LDFLAGS = $(MM_LIBS) $(top_builddir)/libmm-glib/libmm-glib.la |
153 | + |
154 | + |
155 | +# Common Mbm modem support library |
156 | +noinst_LTLIBRARIES += libmm-utils-mbm.la |
157 | +libmm_utils_mbm_la_SOURCES = \ |
158 | + mbm/mm-broadband-modem-mbm.c \ |
159 | + mbm/mm-broadband-modem-mbm.h \ |
160 | + mbm/mm-broadband-bearer-mbm.c \ |
161 | + mbm/mm-broadband-bearer-mbm.h \ |
162 | + mbm/mm-sim-mbm.c \ |
163 | + mbm/mm-sim-mbm.h |
164 | +libmm_utils_mbm_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
165 | +libmm_utils_mbm_la_LIBADD = $(GUDEV_LIBS) $(MM_LIBS) |
166 | + |
167 | +MBM_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/mbm |
168 | +MBM_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-mbm.la |
169 | + |
170 | +# MBM |
171 | +libmm_plugin_mbm_la_SOURCES = \ |
172 | + mbm/mm-plugin-mbm.c \ |
173 | + mbm/mm-plugin-mbm.h |
174 | +libmm_plugin_mbm_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(MBM_COMMON_COMPILER_FLAGS) |
175 | +libmm_plugin_mbm_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
176 | +libmm_plugin_mbm_la_LIBADD = $(MBM_COMMON_LIBADD_FLAGS) |
177 | + |
178 | +udevrules_DATA += mbm/77-mm-ericsson-mbm.rules |
179 | + |
180 | +# Option |
181 | +libmm_plugin_option_la_SOURCES = \ |
182 | + option/mm-plugin-option.c \ |
183 | + option/mm-plugin-option.h \ |
184 | + option/mm-broadband-modem-option.c \ |
185 | + option/mm-broadband-modem-option.h |
186 | +libmm_plugin_option_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
187 | +libmm_plugin_option_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
188 | + |
189 | +# HSO |
190 | +libmm_plugin_hso_la_SOURCES = \ |
191 | + option/mm-plugin-hso.c \ |
192 | + option/mm-plugin-hso.h \ |
193 | + option/mm-broadband-modem-option.c \ |
194 | + option/mm-broadband-modem-option.h \ |
195 | + option/mm-broadband-bearer-hso.c \ |
196 | + option/mm-broadband-bearer-hso.h \ |
197 | + option/mm-broadband-modem-hso.c \ |
198 | + option/mm-broadband-modem-hso.h |
199 | +libmm_plugin_hso_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
200 | +libmm_plugin_hso_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
201 | + |
202 | +# Common Sierra modem support library |
203 | +noinst_LTLIBRARIES += libmm-utils-sierra.la |
204 | +libmm_utils_sierra_la_SOURCES = \ |
205 | + sierra/mm-common-sierra.c \ |
206 | + sierra/mm-common-sierra.h \ |
207 | + sierra/mm-sim-sierra.c \ |
208 | + sierra/mm-sim-sierra.h \ |
209 | + sierra/mm-broadband-bearer-sierra.c \ |
210 | + sierra/mm-broadband-bearer-sierra.h \ |
211 | + sierra/mm-broadband-modem-sierra.c \ |
212 | + sierra/mm-broadband-modem-sierra.h |
213 | +libmm_utils_sierra_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
214 | +libmm_utils_sierra_la_LIBADD = $(GUDEV_LIBS) $(MM_LIBS) |
215 | + |
216 | +SIERRA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/sierra |
217 | +SIERRA_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-sierra.la |
218 | + |
219 | +# Sierra (new QMI or MBIM modems) |
220 | +libmm_plugin_sierra_la_SOURCES = \ |
221 | + sierra/mm-plugin-sierra.c \ |
222 | + sierra/mm-plugin-sierra.h |
223 | +libmm_plugin_sierra_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
224 | +libmm_plugin_sierra_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
225 | + |
226 | +# Sierra (legacy) |
227 | +libmm_plugin_sierra_legacy_la_SOURCES = \ |
228 | + sierra/mm-plugin-sierra-legacy.c \ |
229 | + sierra/mm-plugin-sierra-legacy.h \ |
230 | + sierra/mm-broadband-modem-sierra-icera.c \ |
231 | + sierra/mm-broadband-modem-sierra-icera.h |
232 | +libmm_plugin_sierra_legacy_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) $(SIERRA_COMMON_COMPILER_FLAGS) |
233 | +libmm_plugin_sierra_legacy_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
234 | +libmm_plugin_sierra_legacy_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) $(SIERRA_COMMON_LIBADD_FLAGS) |
235 | + |
236 | +# Wavecom (Sierra Airlink) |
237 | +libmm_plugin_wavecom_la_SOURCES = \ |
238 | + wavecom/mm-plugin-wavecom.c \ |
239 | + wavecom/mm-plugin-wavecom.h \ |
240 | + wavecom/mm-broadband-modem-wavecom.c \ |
241 | + wavecom/mm-broadband-modem-wavecom.h |
242 | +libmm_plugin_wavecom_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
243 | +libmm_plugin_wavecom_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
244 | + |
245 | +# Nokia |
246 | +libmm_plugin_nokia_la_SOURCES = \ |
247 | + nokia/mm-plugin-nokia.c \ |
248 | + nokia/mm-plugin-nokia.h \ |
249 | + nokia/mm-sim-nokia.c \ |
250 | + nokia/mm-sim-nokia.h \ |
251 | + nokia/mm-broadband-modem-nokia.c \ |
252 | + nokia/mm-broadband-modem-nokia.h |
253 | +libmm_plugin_nokia_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
254 | +libmm_plugin_nokia_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
255 | + |
256 | +# Nokia (Icera) |
257 | +libmm_plugin_nokia_icera_la_SOURCES = \ |
258 | + nokia/mm-plugin-nokia-icera.c \ |
259 | + nokia/mm-plugin-nokia-icera.h |
260 | +libmm_plugin_nokia_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
261 | +libmm_plugin_nokia_icera_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
262 | +libmm_plugin_nokia_icera_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
263 | +udevrules_DATA += nokia/77-mm-nokia-port-types.rules |
264 | + |
265 | +# Zte |
266 | +libmm_plugin_zte_la_SOURCES = \ |
267 | + zte/mm-plugin-zte.c \ |
268 | + zte/mm-plugin-zte.h \ |
269 | + zte/mm-common-zte.h \ |
270 | + zte/mm-common-zte.c \ |
271 | + zte/mm-broadband-modem-zte.h \ |
272 | + zte/mm-broadband-modem-zte.c \ |
273 | + zte/mm-broadband-modem-zte-icera.h \ |
274 | + zte/mm-broadband-modem-zte-icera.c |
275 | +libmm_plugin_zte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
276 | +libmm_plugin_zte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
277 | +libmm_plugin_zte_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
278 | +udevrules_DATA += zte/77-mm-zte-port-types.rules |
279 | + |
280 | +# Longcheer (and rebranded dongles) |
281 | +libmm_plugin_longcheer_la_SOURCES = \ |
282 | + longcheer/mm-plugin-longcheer.c \ |
283 | + longcheer/mm-plugin-longcheer.h \ |
284 | + longcheer/mm-broadband-modem-longcheer.h \ |
285 | + longcheer/mm-broadband-modem-longcheer.c |
286 | +libmm_plugin_longcheer_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
287 | +libmm_plugin_longcheer_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
288 | +udevrules_DATA += longcheer/77-mm-longcheer-port-types.rules |
289 | + |
290 | +# AnyData CDMA |
291 | +libmm_plugin_anydata_la_SOURCES = \ |
292 | + anydata/mm-plugin-anydata.c \ |
293 | + anydata/mm-plugin-anydata.h \ |
294 | + anydata/mm-broadband-modem-anydata.h \ |
295 | + anydata/mm-broadband-modem-anydata.c |
296 | +libmm_plugin_anydata_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
297 | +libmm_plugin_anydata_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
298 | + |
299 | +# Linktop CDMA |
300 | +libmm_plugin_linktop_la_SOURCES = \ |
301 | + linktop/mm-plugin-linktop.c \ |
302 | + linktop/mm-plugin-linktop.h \ |
303 | + linktop/mm-broadband-modem-linktop.h \ |
304 | + linktop/mm-broadband-modem-linktop.c |
305 | +libmm_plugin_linktop_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
306 | +libmm_plugin_linktop_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
307 | + |
308 | +# SimTech |
309 | +libmm_plugin_simtech_la_SOURCES = \ |
310 | + simtech/mm-plugin-simtech.c \ |
311 | + simtech/mm-plugin-simtech.h \ |
312 | + simtech/mm-broadband-modem-simtech.h \ |
313 | + simtech/mm-broadband-modem-simtech.c |
314 | +libmm_plugin_simtech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
315 | +libmm_plugin_simtech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
316 | +udevrules_DATA += simtech/77-mm-simtech-port-types.rules |
317 | + |
318 | +# Alcatel/TCT/JRD x220D and possibly others |
319 | +libmm_plugin_x22x_la_SOURCES = \ |
320 | + x22x/mm-plugin-x22x.c \ |
321 | + x22x/mm-plugin-x22x.h \ |
322 | + x22x/mm-broadband-modem-x22x.h \ |
323 | + x22x/mm-broadband-modem-x22x.c |
324 | +libmm_plugin_x22x_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
325 | +libmm_plugin_x22x_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
326 | +udevrules_DATA += x22x/77-mm-x22x-port-types.rules |
327 | + |
328 | +# Pantech |
329 | +libmm_plugin_pantech_la_SOURCES = \ |
330 | + pantech/mm-plugin-pantech.c \ |
331 | + pantech/mm-plugin-pantech.h \ |
332 | + pantech/mm-sim-pantech.c \ |
333 | + pantech/mm-sim-pantech.h \ |
334 | + pantech/mm-broadband-modem-pantech.c \ |
335 | + pantech/mm-broadband-modem-pantech.h |
336 | +libmm_plugin_pantech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
337 | +libmm_plugin_pantech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
338 | + |
339 | +# Samsung modem |
340 | +libmm_plugin_samsung_la_SOURCES = \ |
341 | + samsung/mm-plugin-samsung.c \ |
342 | + samsung/mm-plugin-samsung.h \ |
343 | + samsung/mm-broadband-modem-samsung.c \ |
344 | + samsung/mm-broadband-modem-samsung.h |
345 | +libmm_plugin_samsung_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
346 | +libmm_plugin_samsung_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
347 | +libmm_plugin_samsung_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
348 | + |
349 | +# Cinterion (previously Siemens) modem |
350 | +libmm_plugin_cinterion_la_SOURCES = \ |
351 | + cinterion/mm-plugin-cinterion.c \ |
352 | + cinterion/mm-plugin-cinterion.h \ |
353 | + cinterion/mm-broadband-modem-cinterion.c \ |
354 | + cinterion/mm-broadband-modem-cinterion.h |
355 | +libmm_plugin_cinterion_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
356 | +libmm_plugin_cinterion_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
357 | + |
358 | +# Iridium modem |
359 | +libmm_plugin_iridium_la_SOURCES = \ |
360 | + iridium/mm-plugin-iridium.c \ |
361 | + iridium/mm-plugin-iridium.h \ |
362 | + iridium/mm-broadband-modem-iridium.c \ |
363 | + iridium/mm-broadband-modem-iridium.h \ |
364 | + iridium/mm-bearer-iridium.c \ |
365 | + iridium/mm-bearer-iridium.h \ |
366 | + iridium/mm-sim-iridium.c \ |
367 | + iridium/mm-sim-iridium.h |
368 | +libmm_plugin_iridium_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
369 | +libmm_plugin_iridium_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
370 | + |
371 | +# Common Novatel modem support library |
372 | +noinst_LTLIBRARIES += libmm-utils-novatel.la |
373 | +libmm_utils_novatel_la_SOURCES = \ |
374 | + novatel/mm-common-novatel.c \ |
375 | + novatel/mm-common-novatel.h \ |
376 | + novatel/mm-broadband-modem-novatel.c \ |
377 | + novatel/mm-broadband-modem-novatel.h |
378 | +libmm_utils_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
379 | +libmm_utils_novatel_la_LIBADD = $(GUDEV_LIBS) $(MM_LIBS) |
380 | + |
381 | +NOVATEL_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/novatel |
382 | +NOVATEL_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-novatel.la |
383 | + |
384 | +# Novatel LTE modem |
385 | +libmm_plugin_novatel_lte_la_SOURCES = \ |
386 | + novatel/mm-plugin-novatel-lte.c \ |
387 | + novatel/mm-plugin-novatel-lte.h \ |
388 | + novatel/mm-broadband-modem-novatel-lte.c \ |
389 | + novatel/mm-broadband-modem-novatel-lte.h \ |
390 | + novatel/mm-broadband-bearer-novatel-lte.c \ |
391 | + novatel/mm-broadband-bearer-novatel-lte.h \ |
392 | + novatel/mm-sim-novatel-lte.c \ |
393 | + novatel/mm-sim-novatel-lte.h |
394 | +libmm_plugin_novatel_lte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
395 | +libmm_plugin_novatel_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
396 | + |
397 | +# Novatel non-LTE modem |
398 | +libmm_plugin_novatel_la_SOURCES = \ |
399 | + novatel/mm-plugin-novatel.c \ |
400 | + novatel/mm-plugin-novatel.h |
401 | +libmm_plugin_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(NOVATEL_COMMON_COMPILER_FLAGS) |
402 | +libmm_plugin_novatel_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
403 | +libmm_plugin_novatel_la_LIBADD = $(NOVATEL_COMMON_LIBADD_FLAGS) |
404 | + |
405 | +# Altair LTE modem |
406 | +libmm_plugin_altair_lte_la_SOURCES = \ |
407 | + altair/mm-plugin-altair-lte.c \ |
408 | + altair/mm-plugin-altair-lte.h \ |
409 | + altair/mm-broadband-modem-altair-lte.c \ |
410 | + altair/mm-broadband-modem-altair-lte.h \ |
411 | + altair/mm-broadband-bearer-altair-lte.c \ |
412 | + altair/mm-broadband-bearer-altair-lte.h |
413 | +libmm_plugin_altair_lte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
414 | +libmm_plugin_altair_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
415 | + |
416 | +# VIA modem |
417 | +libmm_plugin_via_la_SOURCES = \ |
418 | + via/mm-plugin-via.c \ |
419 | + via/mm-plugin-via.h \ |
420 | + via/mm-broadband-modem-via.c \ |
421 | + via/mm-broadband-modem-via.h |
422 | +libmm_plugin_via_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
423 | +libmm_plugin_via_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
424 | + |
425 | +# Telit modem |
426 | +libmm_plugin_telit_la_SOURCES = \ |
427 | + telit/mm-plugin-telit.c \ |
428 | + telit/mm-plugin-telit.h \ |
429 | + telit/mm-broadband-modem-telit.c \ |
430 | + telit/mm-broadband-modem-telit.h |
431 | +libmm_plugin_telit_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
432 | +libmm_plugin_telit_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
433 | + |
434 | + |
435 | +# Additional files to include in the distribution |
436 | +EXTRA_DIST += \ |
437 | + $(udevrules_DATA) |
438 | + |
439 | +# Unit tests |
440 | +TEST_PROGS += $(noinst_PROGRAMS) |
441 | |
442 | === added directory '.pc/dell-mbim-plugin.patch/plugins/dell' |
443 | === added file '.pc/dell-mbim-plugin.patch/plugins/dell/mm-plugin-dell.c' |
444 | === added file '.pc/dell-mbim-plugin.patch/plugins/dell/mm-plugin-dell.h' |
445 | === added directory '.pc/dell-mbim-plugin.patch/plugins/novatel' |
446 | === added file '.pc/dell-mbim-plugin.patch/plugins/novatel/mm-plugin-novatel.c' |
447 | --- .pc/dell-mbim-plugin.patch/plugins/novatel/mm-plugin-novatel.c 1970-01-01 00:00:00 +0000 |
448 | +++ .pc/dell-mbim-plugin.patch/plugins/novatel/mm-plugin-novatel.c 2015-09-25 10:05:24 +0000 |
449 | @@ -0,0 +1,127 @@ |
450 | +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
451 | + |
452 | +/* |
453 | + * This program is free software; you can redistribute it and/or |
454 | + * modify it under the terms of the GNU General Public License as |
455 | + * published by the Free Software Foundation; either version 2 of the |
456 | + * License, or (at your option) any later version. |
457 | + * |
458 | + * This program is distributed in the hope that it will be useful, |
459 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
460 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
461 | + * General Public License for more details. |
462 | + * |
463 | + * You should have received a copy of the GNU General Public |
464 | + * License along with this program; if not, write to the |
465 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
466 | + * Boston, MA 02111-1307, USA. |
467 | + * |
468 | + * Copyright (C) 2008 - 2009 Novell, Inc. |
469 | + * Copyright (C) 2009 - 2012 Red Hat, Inc. |
470 | + * Copyright (C) 2012 Aleksander Morgado <aleksander@gnu.org> |
471 | + */ |
472 | + |
473 | +#include <string.h> |
474 | +#include <gmodule.h> |
475 | + |
476 | +#define _LIBMM_INSIDE_MM |
477 | +#include <libmm-glib.h> |
478 | + |
479 | +#include "mm-plugin-novatel.h" |
480 | +#include "mm-common-novatel.h" |
481 | +#include "mm-private-boxed-types.h" |
482 | +#include "mm-broadband-modem-novatel.h" |
483 | +#include "mm-log.h" |
484 | + |
485 | +#if defined WITH_QMI |
486 | +#include "mm-broadband-modem-qmi.h" |
487 | +#endif |
488 | + |
489 | +G_DEFINE_TYPE (MMPluginNovatel, mm_plugin_novatel, MM_TYPE_PLUGIN) |
490 | + |
491 | +int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION; |
492 | +int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; |
493 | + |
494 | +/*****************************************************************************/ |
495 | +/* Custom commands for AT probing */ |
496 | + |
497 | +/* We need to explicitly flip secondary ports to AT mode. |
498 | + * We also use this command also for checking AT support in the current port. |
499 | + */ |
500 | +static const MMPortProbeAtCommand custom_at_probe[] = { |
501 | + { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, |
502 | + { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, |
503 | + { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, |
504 | + { NULL } |
505 | +}; |
506 | + |
507 | +/*****************************************************************************/ |
508 | + |
509 | +static MMBaseModem * |
510 | +create_modem (MMPlugin *self, |
511 | + const gchar *sysfs_path, |
512 | + const gchar **drivers, |
513 | + guint16 vendor, |
514 | + guint16 product, |
515 | + GList *probes, |
516 | + GError **error) |
517 | +{ |
518 | +#if defined WITH_QMI |
519 | + if (mm_port_probe_list_has_qmi_port (probes)) { |
520 | + mm_dbg ("QMI-powered Novatel modem found..."); |
521 | + return MM_BASE_MODEM (mm_broadband_modem_qmi_new (sysfs_path, |
522 | + drivers, |
523 | + mm_plugin_get_name (self), |
524 | + vendor, |
525 | + product)); |
526 | + } |
527 | +#endif |
528 | + |
529 | + return MM_BASE_MODEM (mm_broadband_modem_novatel_new (sysfs_path, |
530 | + drivers, |
531 | + mm_plugin_get_name (self), |
532 | + vendor, |
533 | + product)); |
534 | +} |
535 | + |
536 | +/*****************************************************************************/ |
537 | + |
538 | +G_MODULE_EXPORT MMPlugin * |
539 | +mm_plugin_create (void) |
540 | +{ |
541 | + static const gchar *subsystems[] = { "tty", "net", "usb", NULL }; |
542 | + static const guint16 vendors[] = { 0x1410, /* Novatel */ |
543 | + 0x413c, /* Dell */ |
544 | + 0 }; |
545 | + static const mm_uint16_pair forbidden_products[] = { { 0x1410, 0x9010 }, /* Novatel E362 */ |
546 | + { 0, 0 } }; |
547 | + static const MMAsyncMethod custom_init = { |
548 | + .async = G_CALLBACK (mm_common_novatel_custom_init), |
549 | + .finish = G_CALLBACK (mm_common_novatel_custom_init_finish), |
550 | + }; |
551 | + |
552 | + return MM_PLUGIN ( |
553 | + g_object_new (MM_TYPE_PLUGIN_NOVATEL, |
554 | + MM_PLUGIN_NAME, "Novatel", |
555 | + MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems, |
556 | + MM_PLUGIN_ALLOWED_VENDOR_IDS, vendors, |
557 | + MM_PLUGIN_FORBIDDEN_PRODUCT_IDS, forbidden_products, |
558 | + MM_PLUGIN_ALLOWED_AT, TRUE, |
559 | + MM_PLUGIN_CUSTOM_INIT, &custom_init, |
560 | + MM_PLUGIN_ALLOWED_QCDM, TRUE, |
561 | + MM_PLUGIN_ALLOWED_QMI, TRUE, |
562 | + NULL)); |
563 | +} |
564 | + |
565 | +static void |
566 | +mm_plugin_novatel_init (MMPluginNovatel *self) |
567 | +{ |
568 | +} |
569 | + |
570 | +static void |
571 | +mm_plugin_novatel_class_init (MMPluginNovatelClass *klass) |
572 | +{ |
573 | + MMPluginClass *plugin_class = MM_PLUGIN_CLASS (klass); |
574 | + |
575 | + plugin_class->create_modem = create_modem; |
576 | +} |
577 | |
578 | === added directory '.pc/mbm-common-library.patch' |
579 | === added directory '.pc/mbm-common-library.patch/plugins' |
580 | === added file '.pc/mbm-common-library.patch/plugins/Makefile.am' |
581 | --- .pc/mbm-common-library.patch/plugins/Makefile.am 1970-01-01 00:00:00 +0000 |
582 | +++ .pc/mbm-common-library.patch/plugins/Makefile.am 2015-09-25 10:05:24 +0000 |
583 | @@ -0,0 +1,400 @@ |
584 | +include $(top_srcdir)/gtester.make |
585 | + |
586 | +# Common CPPFLAGS and LDFLAGS |
587 | + |
588 | +PLUGIN_COMMON_COMPILER_FLAGS = \ |
589 | + $(MM_CFLAGS) \ |
590 | + $(GUDEV_CFLAGS) \ |
591 | + -I$(top_srcdir) \ |
592 | + -I$(top_srcdir)/src \ |
593 | + -I$(top_builddir)/src \ |
594 | + -I$(top_srcdir)/include \ |
595 | + -I$(top_builddir)/include \ |
596 | + -I$(top_srcdir)/libmm-glib \ |
597 | + -I$(top_srcdir)/libmm-glib/generated \ |
598 | + -I$(top_builddir)/libmm-glib/generated |
599 | + |
600 | +PLUGIN_COMMON_LINKER_FLAGS = \ |
601 | + $(GUDEV_LDFLAGS) \ |
602 | + -module \ |
603 | + -avoid-version |
604 | + |
605 | +if WITH_QMI |
606 | +PLUGIN_COMMON_COMPILER_FLAGS += $(QMI_CFLAGS) |
607 | +endif |
608 | + |
609 | +if WITH_MBIM |
610 | +PLUGIN_COMMON_COMPILER_FLAGS += $(MBIM_CFLAGS) |
611 | +endif |
612 | + |
613 | +# UDev rules |
614 | +udevrulesdir = $(UDEV_BASE_DIR)/rules.d |
615 | +udevrules_DATA = |
616 | + |
617 | +# Unit tests |
618 | +noinst_PROGRAMS = |
619 | + |
620 | +######################################## |
621 | + |
622 | +# Icera-specific support |
623 | +noinst_LTLIBRARIES = libmm-utils-icera.la |
624 | +libmm_utils_icera_la_SOURCES = \ |
625 | + icera/mm-broadband-modem-icera.h \ |
626 | + icera/mm-broadband-modem-icera.c \ |
627 | + icera/mm-broadband-bearer-icera.h \ |
628 | + icera/mm-broadband-bearer-icera.c |
629 | +libmm_utils_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
630 | +libmm_utils_icera_la_LIBADD = $(GUDEV_LDFLAGS) |
631 | + |
632 | +ICERA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/icera |
633 | +ICERA_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-icera.la |
634 | + |
635 | +######################################## |
636 | + |
637 | +pkglib_LTLIBRARIES = \ |
638 | + libmm-plugin-generic.la \ |
639 | + libmm-plugin-nokia.la \ |
640 | + libmm-plugin-nokia-icera.la \ |
641 | + libmm-plugin-cinterion.la \ |
642 | + libmm-plugin-iridium.la \ |
643 | + libmm-plugin-gobi.la \ |
644 | + libmm-plugin-motorola.la \ |
645 | + libmm-plugin-novatel.la \ |
646 | + libmm-plugin-novatel-lte.la \ |
647 | + libmm-plugin-altair-lte.la \ |
648 | + libmm-plugin-samsung.la \ |
649 | + libmm-plugin-option.la \ |
650 | + libmm-plugin-hso.la \ |
651 | + libmm-plugin-anydata.la \ |
652 | + libmm-plugin-linktop.la \ |
653 | + libmm-plugin-simtech.la \ |
654 | + libmm-plugin-wavecom.la \ |
655 | + libmm-plugin-huawei.la \ |
656 | + libmm-plugin-longcheer.la \ |
657 | + libmm-plugin-x22x.la \ |
658 | + libmm-plugin-pantech.la \ |
659 | + libmm-plugin-zte.la \ |
660 | + libmm-plugin-sierra.la \ |
661 | + libmm-plugin-mbm.la \ |
662 | + libmm-plugin-via.la \ |
663 | + libmm-plugin-telit.la |
664 | + |
665 | +# Generic |
666 | +libmm_plugin_generic_la_SOURCES = \ |
667 | + generic/mm-plugin-generic.c \ |
668 | + generic/mm-plugin-generic.h |
669 | +libmm_plugin_generic_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
670 | +libmm_plugin_generic_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
671 | + |
672 | +## Motorola |
673 | +libmm_plugin_motorola_la_SOURCES = \ |
674 | + motorola/mm-plugin-motorola.c \ |
675 | + motorola/mm-plugin-motorola.h \ |
676 | + motorola/mm-broadband-modem-motorola.c \ |
677 | + motorola/mm-broadband-modem-motorola.h |
678 | +libmm_plugin_motorola_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
679 | +libmm_plugin_motorola_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
680 | + |
681 | +# Gobi |
682 | +libmm_plugin_gobi_la_SOURCES = \ |
683 | + gobi/mm-plugin-gobi.c \ |
684 | + gobi/mm-plugin-gobi.h \ |
685 | + gobi/mm-broadband-modem-gobi.c \ |
686 | + gobi/mm-broadband-modem-gobi.h |
687 | +libmm_plugin_gobi_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
688 | +libmm_plugin_gobi_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
689 | + |
690 | +# Huawei |
691 | +libmm_plugin_huawei_la_SOURCES = \ |
692 | + huawei/mm-plugin-huawei.c \ |
693 | + huawei/mm-plugin-huawei.h \ |
694 | + huawei/mm-modem-helpers-huawei.c \ |
695 | + huawei/mm-modem-helpers-huawei.h \ |
696 | + huawei/mm-broadband-modem-huawei.c \ |
697 | + huawei/mm-broadband-modem-huawei.h \ |
698 | + huawei/mm-broadband-bearer-huawei.c \ |
699 | + huawei/mm-broadband-bearer-huawei.h |
700 | +libmm_plugin_huawei_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
701 | +libmm_plugin_huawei_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
702 | + |
703 | +udevrules_DATA += huawei/77-mm-huawei-net-port-types.rules |
704 | + |
705 | +noinst_PROGRAMS += test-modem-helpers-huawei |
706 | +test_modem_helpers_huawei_SOURCES = \ |
707 | + huawei/mm-modem-helpers-huawei.c \ |
708 | + huawei/mm-modem-helpers-huawei.h \ |
709 | + huawei/tests/test-modem-helpers-huawei.c |
710 | +test_modem_helpers_huawei_CPPFLAGS = \ |
711 | + -I$(top_srcdir)/plugins/huawei \ |
712 | + $(PLUGIN_COMMON_COMPILER_FLAGS) |
713 | +test_modem_helpers_huawei_LDFLAGS = $(MM_LIBS) $(top_builddir)/libmm-glib/libmm-glib.la |
714 | + |
715 | + |
716 | +# MBM |
717 | +libmm_plugin_mbm_la_SOURCES = \ |
718 | + mbm/mm-plugin-mbm.c \ |
719 | + mbm/mm-plugin-mbm.h \ |
720 | + mbm/mm-broadband-modem-mbm.c \ |
721 | + mbm/mm-broadband-modem-mbm.h \ |
722 | + mbm/mm-broadband-bearer-mbm.c \ |
723 | + mbm/mm-broadband-bearer-mbm.h \ |
724 | + mbm/mm-sim-mbm.c \ |
725 | + mbm/mm-sim-mbm.h |
726 | +libmm_plugin_mbm_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
727 | +libmm_plugin_mbm_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
728 | +udevrules_DATA += mbm/77-mm-ericsson-mbm.rules |
729 | + |
730 | +# Option |
731 | +libmm_plugin_option_la_SOURCES = \ |
732 | + option/mm-plugin-option.c \ |
733 | + option/mm-plugin-option.h \ |
734 | + option/mm-broadband-modem-option.c \ |
735 | + option/mm-broadband-modem-option.h |
736 | +libmm_plugin_option_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
737 | +libmm_plugin_option_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
738 | + |
739 | +# HSO |
740 | +libmm_plugin_hso_la_SOURCES = \ |
741 | + option/mm-plugin-hso.c \ |
742 | + option/mm-plugin-hso.h \ |
743 | + option/mm-broadband-modem-option.c \ |
744 | + option/mm-broadband-modem-option.h \ |
745 | + option/mm-broadband-bearer-hso.c \ |
746 | + option/mm-broadband-bearer-hso.h \ |
747 | + option/mm-broadband-modem-hso.c \ |
748 | + option/mm-broadband-modem-hso.h |
749 | +libmm_plugin_hso_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
750 | +libmm_plugin_hso_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
751 | + |
752 | +# Common Sierra modem support library |
753 | +noinst_LTLIBRARIES += libmm-utils-sierra.la |
754 | +libmm_utils_sierra_la_SOURCES = \ |
755 | + sierra/mm-common-sierra.c \ |
756 | + sierra/mm-common-sierra.h \ |
757 | + sierra/mm-sim-sierra.c \ |
758 | + sierra/mm-sim-sierra.h \ |
759 | + sierra/mm-broadband-bearer-sierra.c \ |
760 | + sierra/mm-broadband-bearer-sierra.h \ |
761 | + sierra/mm-broadband-modem-sierra.c \ |
762 | + sierra/mm-broadband-modem-sierra.h |
763 | +libmm_utils_sierra_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
764 | +libmm_utils_sierra_la_LIBADD = $(GUDEV_LIBS) $(MM_LIBS) |
765 | + |
766 | +SIERRA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/sierra |
767 | +SIERRA_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-sierra.la |
768 | + |
769 | +# Sierra |
770 | +libmm_plugin_sierra_la_SOURCES = \ |
771 | + sierra/mm-plugin-sierra.c \ |
772 | + sierra/mm-plugin-sierra.h \ |
773 | + sierra/mm-broadband-modem-sierra-icera.c \ |
774 | + sierra/mm-broadband-modem-sierra-icera.h |
775 | +libmm_plugin_sierra_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) $(SIERRA_COMMON_COMPILER_FLAGS) |
776 | +libmm_plugin_sierra_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
777 | +libmm_plugin_sierra_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) $(SIERRA_COMMON_LIBADD_FLAGS) |
778 | + |
779 | +# Wavecom (Sierra Airlink) |
780 | +libmm_plugin_wavecom_la_SOURCES = \ |
781 | + wavecom/mm-plugin-wavecom.c \ |
782 | + wavecom/mm-plugin-wavecom.h \ |
783 | + wavecom/mm-broadband-modem-wavecom.c \ |
784 | + wavecom/mm-broadband-modem-wavecom.h |
785 | +libmm_plugin_wavecom_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
786 | +libmm_plugin_wavecom_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
787 | + |
788 | +# Nokia |
789 | +libmm_plugin_nokia_la_SOURCES = \ |
790 | + nokia/mm-plugin-nokia.c \ |
791 | + nokia/mm-plugin-nokia.h \ |
792 | + nokia/mm-sim-nokia.c \ |
793 | + nokia/mm-sim-nokia.h \ |
794 | + nokia/mm-broadband-modem-nokia.c \ |
795 | + nokia/mm-broadband-modem-nokia.h |
796 | +libmm_plugin_nokia_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
797 | +libmm_plugin_nokia_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
798 | + |
799 | +# Nokia (Icera) |
800 | +libmm_plugin_nokia_icera_la_SOURCES = \ |
801 | + nokia/mm-plugin-nokia-icera.c \ |
802 | + nokia/mm-plugin-nokia-icera.h |
803 | +libmm_plugin_nokia_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
804 | +libmm_plugin_nokia_icera_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
805 | +libmm_plugin_nokia_icera_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
806 | +udevrules_DATA += nokia/77-mm-nokia-port-types.rules |
807 | + |
808 | +# Zte |
809 | +libmm_plugin_zte_la_SOURCES = \ |
810 | + zte/mm-plugin-zte.c \ |
811 | + zte/mm-plugin-zte.h \ |
812 | + zte/mm-common-zte.h \ |
813 | + zte/mm-common-zte.c \ |
814 | + zte/mm-broadband-modem-zte.h \ |
815 | + zte/mm-broadband-modem-zte.c \ |
816 | + zte/mm-broadband-modem-zte-icera.h \ |
817 | + zte/mm-broadband-modem-zte-icera.c |
818 | +libmm_plugin_zte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
819 | +libmm_plugin_zte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
820 | +libmm_plugin_zte_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
821 | +udevrules_DATA += zte/77-mm-zte-port-types.rules |
822 | + |
823 | +# Longcheer (and rebranded dongles) |
824 | +libmm_plugin_longcheer_la_SOURCES = \ |
825 | + longcheer/mm-plugin-longcheer.c \ |
826 | + longcheer/mm-plugin-longcheer.h \ |
827 | + longcheer/mm-broadband-modem-longcheer.h \ |
828 | + longcheer/mm-broadband-modem-longcheer.c |
829 | +libmm_plugin_longcheer_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
830 | +libmm_plugin_longcheer_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
831 | +udevrules_DATA += longcheer/77-mm-longcheer-port-types.rules |
832 | + |
833 | +# AnyData CDMA |
834 | +libmm_plugin_anydata_la_SOURCES = \ |
835 | + anydata/mm-plugin-anydata.c \ |
836 | + anydata/mm-plugin-anydata.h \ |
837 | + anydata/mm-broadband-modem-anydata.h \ |
838 | + anydata/mm-broadband-modem-anydata.c |
839 | +libmm_plugin_anydata_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
840 | +libmm_plugin_anydata_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
841 | + |
842 | +# Linktop CDMA |
843 | +libmm_plugin_linktop_la_SOURCES = \ |
844 | + linktop/mm-plugin-linktop.c \ |
845 | + linktop/mm-plugin-linktop.h \ |
846 | + linktop/mm-broadband-modem-linktop.h \ |
847 | + linktop/mm-broadband-modem-linktop.c |
848 | +libmm_plugin_linktop_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
849 | +libmm_plugin_linktop_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
850 | + |
851 | +# SimTech |
852 | +libmm_plugin_simtech_la_SOURCES = \ |
853 | + simtech/mm-plugin-simtech.c \ |
854 | + simtech/mm-plugin-simtech.h \ |
855 | + simtech/mm-broadband-modem-simtech.h \ |
856 | + simtech/mm-broadband-modem-simtech.c |
857 | +libmm_plugin_simtech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
858 | +libmm_plugin_simtech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
859 | +udevrules_DATA += simtech/77-mm-simtech-port-types.rules |
860 | + |
861 | +# Alcatel/TCT/JRD x220D and possibly others |
862 | +libmm_plugin_x22x_la_SOURCES = \ |
863 | + x22x/mm-plugin-x22x.c \ |
864 | + x22x/mm-plugin-x22x.h \ |
865 | + x22x/mm-broadband-modem-x22x.h \ |
866 | + x22x/mm-broadband-modem-x22x.c |
867 | +libmm_plugin_x22x_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
868 | +libmm_plugin_x22x_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
869 | +udevrules_DATA += x22x/77-mm-x22x-port-types.rules |
870 | + |
871 | +# Pantech |
872 | +libmm_plugin_pantech_la_SOURCES = \ |
873 | + pantech/mm-plugin-pantech.c \ |
874 | + pantech/mm-plugin-pantech.h \ |
875 | + pantech/mm-sim-pantech.c \ |
876 | + pantech/mm-sim-pantech.h \ |
877 | + pantech/mm-broadband-modem-pantech.c \ |
878 | + pantech/mm-broadband-modem-pantech.h |
879 | +libmm_plugin_pantech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
880 | +libmm_plugin_pantech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
881 | + |
882 | +# Samsung modem |
883 | +libmm_plugin_samsung_la_SOURCES = \ |
884 | + samsung/mm-plugin-samsung.c \ |
885 | + samsung/mm-plugin-samsung.h \ |
886 | + samsung/mm-broadband-modem-samsung.c \ |
887 | + samsung/mm-broadband-modem-samsung.h |
888 | +libmm_plugin_samsung_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
889 | +libmm_plugin_samsung_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
890 | +libmm_plugin_samsung_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
891 | + |
892 | +# Cinterion (previously Siemens) modem |
893 | +libmm_plugin_cinterion_la_SOURCES = \ |
894 | + cinterion/mm-plugin-cinterion.c \ |
895 | + cinterion/mm-plugin-cinterion.h \ |
896 | + cinterion/mm-broadband-modem-cinterion.c \ |
897 | + cinterion/mm-broadband-modem-cinterion.h |
898 | +libmm_plugin_cinterion_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
899 | +libmm_plugin_cinterion_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
900 | + |
901 | +# Iridium modem |
902 | +libmm_plugin_iridium_la_SOURCES = \ |
903 | + iridium/mm-plugin-iridium.c \ |
904 | + iridium/mm-plugin-iridium.h \ |
905 | + iridium/mm-broadband-modem-iridium.c \ |
906 | + iridium/mm-broadband-modem-iridium.h \ |
907 | + iridium/mm-bearer-iridium.c \ |
908 | + iridium/mm-bearer-iridium.h \ |
909 | + iridium/mm-sim-iridium.c \ |
910 | + iridium/mm-sim-iridium.h |
911 | +libmm_plugin_iridium_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
912 | +libmm_plugin_iridium_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
913 | + |
914 | +# Common Novatel modem support library |
915 | +noinst_LTLIBRARIES += libmm-utils-novatel.la |
916 | +libmm_utils_novatel_la_SOURCES = \ |
917 | + novatel/mm-common-novatel.c \ |
918 | + novatel/mm-common-novatel.h \ |
919 | + novatel/mm-broadband-modem-novatel.c \ |
920 | + novatel/mm-broadband-modem-novatel.h |
921 | +libmm_utils_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
922 | +libmm_utils_novatel_la_LIBADD = $(GUDEV_LIBS) $(MM_LIBS) |
923 | + |
924 | +NOVATEL_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/novatel |
925 | +NOVATEL_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-novatel.la |
926 | + |
927 | +# Novatel LTE modem |
928 | +libmm_plugin_novatel_lte_la_SOURCES = \ |
929 | + novatel/mm-plugin-novatel-lte.c \ |
930 | + novatel/mm-plugin-novatel-lte.h \ |
931 | + novatel/mm-broadband-modem-novatel-lte.c \ |
932 | + novatel/mm-broadband-modem-novatel-lte.h \ |
933 | + novatel/mm-broadband-bearer-novatel-lte.c \ |
934 | + novatel/mm-broadband-bearer-novatel-lte.h \ |
935 | + novatel/mm-sim-novatel-lte.c \ |
936 | + novatel/mm-sim-novatel-lte.h |
937 | +libmm_plugin_novatel_lte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
938 | +libmm_plugin_novatel_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
939 | + |
940 | +# Novatel non-LTE modem |
941 | +libmm_plugin_novatel_la_SOURCES = \ |
942 | + novatel/mm-plugin-novatel.c \ |
943 | + novatel/mm-plugin-novatel.h |
944 | +libmm_plugin_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(NOVATEL_COMMON_COMPILER_FLAGS) |
945 | +libmm_plugin_novatel_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
946 | +libmm_plugin_novatel_la_LIBADD = $(NOVATEL_COMMON_LIBADD_FLAGS) |
947 | + |
948 | +# Altair LTE modem |
949 | +libmm_plugin_altair_lte_la_SOURCES = \ |
950 | + altair/mm-plugin-altair-lte.c \ |
951 | + altair/mm-plugin-altair-lte.h \ |
952 | + altair/mm-broadband-modem-altair-lte.c \ |
953 | + altair/mm-broadband-modem-altair-lte.h \ |
954 | + altair/mm-broadband-bearer-altair-lte.c \ |
955 | + altair/mm-broadband-bearer-altair-lte.h |
956 | +libmm_plugin_altair_lte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
957 | +libmm_plugin_altair_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
958 | + |
959 | +# VIA modem |
960 | +libmm_plugin_via_la_SOURCES = \ |
961 | + via/mm-plugin-via.c \ |
962 | + via/mm-plugin-via.h \ |
963 | + via/mm-broadband-modem-via.c \ |
964 | + via/mm-broadband-modem-via.h |
965 | +libmm_plugin_via_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
966 | +libmm_plugin_via_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
967 | + |
968 | +# Telit modem |
969 | +libmm_plugin_telit_la_SOURCES = \ |
970 | + telit/mm-plugin-telit.c \ |
971 | + telit/mm-plugin-telit.h \ |
972 | + telit/mm-broadband-modem-telit.c \ |
973 | + telit/mm-broadband-modem-telit.h |
974 | +libmm_plugin_telit_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
975 | +libmm_plugin_telit_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
976 | + |
977 | + |
978 | +# Additional files to include in the distribution |
979 | +EXTRA_DIST += \ |
980 | + $(udevrules_DATA) |
981 | + |
982 | +# Unit tests |
983 | +TEST_PROGS += $(noinst_PROGRAMS) |
984 | |
985 | === added directory '.pc/new-sierra-legacy-plugin.patch' |
986 | === added directory '.pc/new-sierra-legacy-plugin.patch/plugins' |
987 | === added file '.pc/new-sierra-legacy-plugin.patch/plugins/Makefile.am' |
988 | --- .pc/new-sierra-legacy-plugin.patch/plugins/Makefile.am 1970-01-01 00:00:00 +0000 |
989 | +++ .pc/new-sierra-legacy-plugin.patch/plugins/Makefile.am 2015-09-25 10:05:24 +0000 |
990 | @@ -0,0 +1,411 @@ |
991 | +include $(top_srcdir)/gtester.make |
992 | + |
993 | +# Common CPPFLAGS and LDFLAGS |
994 | + |
995 | +PLUGIN_COMMON_COMPILER_FLAGS = \ |
996 | + $(MM_CFLAGS) \ |
997 | + $(GUDEV_CFLAGS) \ |
998 | + -I$(top_srcdir) \ |
999 | + -I$(top_srcdir)/src \ |
1000 | + -I$(top_builddir)/src \ |
1001 | + -I$(top_srcdir)/include \ |
1002 | + -I$(top_builddir)/include \ |
1003 | + -I$(top_srcdir)/libmm-glib \ |
1004 | + -I$(top_srcdir)/libmm-glib/generated \ |
1005 | + -I$(top_builddir)/libmm-glib/generated |
1006 | + |
1007 | +PLUGIN_COMMON_LINKER_FLAGS = \ |
1008 | + $(GUDEV_LDFLAGS) \ |
1009 | + -module \ |
1010 | + -avoid-version |
1011 | + |
1012 | +if WITH_QMI |
1013 | +PLUGIN_COMMON_COMPILER_FLAGS += $(QMI_CFLAGS) |
1014 | +endif |
1015 | + |
1016 | +if WITH_MBIM |
1017 | +PLUGIN_COMMON_COMPILER_FLAGS += $(MBIM_CFLAGS) |
1018 | +endif |
1019 | + |
1020 | +# UDev rules |
1021 | +udevrulesdir = $(UDEV_BASE_DIR)/rules.d |
1022 | +udevrules_DATA = |
1023 | + |
1024 | +# Unit tests |
1025 | +noinst_PROGRAMS = |
1026 | + |
1027 | +######################################## |
1028 | + |
1029 | +# Icera-specific support |
1030 | +noinst_LTLIBRARIES = libmm-utils-icera.la |
1031 | +libmm_utils_icera_la_SOURCES = \ |
1032 | + icera/mm-broadband-modem-icera.h \ |
1033 | + icera/mm-broadband-modem-icera.c \ |
1034 | + icera/mm-broadband-bearer-icera.h \ |
1035 | + icera/mm-broadband-bearer-icera.c |
1036 | +libmm_utils_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1037 | +libmm_utils_icera_la_LIBADD = $(GUDEV_LDFLAGS) |
1038 | + |
1039 | +ICERA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/icera |
1040 | +ICERA_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-icera.la |
1041 | + |
1042 | +######################################## |
1043 | + |
1044 | +pkglib_LTLIBRARIES = \ |
1045 | + libmm-plugin-generic.la \ |
1046 | + libmm-plugin-nokia.la \ |
1047 | + libmm-plugin-nokia-icera.la \ |
1048 | + libmm-plugin-cinterion.la \ |
1049 | + libmm-plugin-iridium.la \ |
1050 | + libmm-plugin-gobi.la \ |
1051 | + libmm-plugin-motorola.la \ |
1052 | + libmm-plugin-novatel.la \ |
1053 | + libmm-plugin-novatel-lte.la \ |
1054 | + libmm-plugin-altair-lte.la \ |
1055 | + libmm-plugin-samsung.la \ |
1056 | + libmm-plugin-option.la \ |
1057 | + libmm-plugin-hso.la \ |
1058 | + libmm-plugin-anydata.la \ |
1059 | + libmm-plugin-linktop.la \ |
1060 | + libmm-plugin-simtech.la \ |
1061 | + libmm-plugin-wavecom.la \ |
1062 | + libmm-plugin-huawei.la \ |
1063 | + libmm-plugin-longcheer.la \ |
1064 | + libmm-plugin-x22x.la \ |
1065 | + libmm-plugin-pantech.la \ |
1066 | + libmm-plugin-zte.la \ |
1067 | + libmm-plugin-sierra.la \ |
1068 | + libmm-plugin-mbm.la \ |
1069 | + libmm-plugin-via.la \ |
1070 | + libmm-plugin-telit.la |
1071 | + |
1072 | +# Generic |
1073 | +libmm_plugin_generic_la_SOURCES = \ |
1074 | + generic/mm-plugin-generic.c \ |
1075 | + generic/mm-plugin-generic.h |
1076 | +libmm_plugin_generic_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1077 | +libmm_plugin_generic_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1078 | + |
1079 | +## Motorola |
1080 | +libmm_plugin_motorola_la_SOURCES = \ |
1081 | + motorola/mm-plugin-motorola.c \ |
1082 | + motorola/mm-plugin-motorola.h \ |
1083 | + motorola/mm-broadband-modem-motorola.c \ |
1084 | + motorola/mm-broadband-modem-motorola.h |
1085 | +libmm_plugin_motorola_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1086 | +libmm_plugin_motorola_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1087 | + |
1088 | +# Gobi |
1089 | +libmm_plugin_gobi_la_SOURCES = \ |
1090 | + gobi/mm-plugin-gobi.c \ |
1091 | + gobi/mm-plugin-gobi.h \ |
1092 | + gobi/mm-broadband-modem-gobi.c \ |
1093 | + gobi/mm-broadband-modem-gobi.h |
1094 | +libmm_plugin_gobi_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1095 | +libmm_plugin_gobi_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1096 | + |
1097 | +# Huawei |
1098 | +libmm_plugin_huawei_la_SOURCES = \ |
1099 | + huawei/mm-plugin-huawei.c \ |
1100 | + huawei/mm-plugin-huawei.h \ |
1101 | + huawei/mm-modem-helpers-huawei.c \ |
1102 | + huawei/mm-modem-helpers-huawei.h \ |
1103 | + huawei/mm-broadband-modem-huawei.c \ |
1104 | + huawei/mm-broadband-modem-huawei.h \ |
1105 | + huawei/mm-broadband-bearer-huawei.c \ |
1106 | + huawei/mm-broadband-bearer-huawei.h |
1107 | +libmm_plugin_huawei_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1108 | +libmm_plugin_huawei_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1109 | + |
1110 | +udevrules_DATA += huawei/77-mm-huawei-net-port-types.rules |
1111 | + |
1112 | +noinst_PROGRAMS += test-modem-helpers-huawei |
1113 | +test_modem_helpers_huawei_SOURCES = \ |
1114 | + huawei/mm-modem-helpers-huawei.c \ |
1115 | + huawei/mm-modem-helpers-huawei.h \ |
1116 | + huawei/tests/test-modem-helpers-huawei.c |
1117 | +test_modem_helpers_huawei_CPPFLAGS = \ |
1118 | + -I$(top_srcdir)/plugins/huawei \ |
1119 | + $(PLUGIN_COMMON_COMPILER_FLAGS) |
1120 | +test_modem_helpers_huawei_LDFLAGS = $(MM_LIBS) $(top_builddir)/libmm-glib/libmm-glib.la |
1121 | + |
1122 | + |
1123 | +# Common Mbm modem support library |
1124 | +noinst_LTLIBRARIES += libmm-utils-mbm.la |
1125 | +libmm_utils_mbm_la_SOURCES = \ |
1126 | + mbm/mm-broadband-modem-mbm.c \ |
1127 | + mbm/mm-broadband-modem-mbm.h \ |
1128 | + mbm/mm-broadband-bearer-mbm.c \ |
1129 | + mbm/mm-broadband-bearer-mbm.h \ |
1130 | + mbm/mm-sim-mbm.c \ |
1131 | + mbm/mm-sim-mbm.h |
1132 | +libmm_utils_mbm_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1133 | +libmm_utils_mbm_la_LIBADD = $(GUDEV_LIBS) $(MM_LIBS) |
1134 | + |
1135 | +MBM_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/mbm |
1136 | +MBM_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-mbm.la |
1137 | + |
1138 | +# MBM |
1139 | +libmm_plugin_mbm_la_SOURCES = \ |
1140 | + mbm/mm-plugin-mbm.c \ |
1141 | + mbm/mm-plugin-mbm.h |
1142 | +libmm_plugin_mbm_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(MBM_COMMON_COMPILER_FLAGS) |
1143 | +libmm_plugin_mbm_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1144 | +libmm_plugin_mbm_la_LIBADD = $(MBM_COMMON_LIBADD_FLAGS) |
1145 | + |
1146 | +udevrules_DATA += mbm/77-mm-ericsson-mbm.rules |
1147 | + |
1148 | +# Option |
1149 | +libmm_plugin_option_la_SOURCES = \ |
1150 | + option/mm-plugin-option.c \ |
1151 | + option/mm-plugin-option.h \ |
1152 | + option/mm-broadband-modem-option.c \ |
1153 | + option/mm-broadband-modem-option.h |
1154 | +libmm_plugin_option_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1155 | +libmm_plugin_option_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1156 | + |
1157 | +# HSO |
1158 | +libmm_plugin_hso_la_SOURCES = \ |
1159 | + option/mm-plugin-hso.c \ |
1160 | + option/mm-plugin-hso.h \ |
1161 | + option/mm-broadband-modem-option.c \ |
1162 | + option/mm-broadband-modem-option.h \ |
1163 | + option/mm-broadband-bearer-hso.c \ |
1164 | + option/mm-broadband-bearer-hso.h \ |
1165 | + option/mm-broadband-modem-hso.c \ |
1166 | + option/mm-broadband-modem-hso.h |
1167 | +libmm_plugin_hso_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1168 | +libmm_plugin_hso_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1169 | + |
1170 | +# Common Sierra modem support library |
1171 | +noinst_LTLIBRARIES += libmm-utils-sierra.la |
1172 | +libmm_utils_sierra_la_SOURCES = \ |
1173 | + sierra/mm-common-sierra.c \ |
1174 | + sierra/mm-common-sierra.h \ |
1175 | + sierra/mm-sim-sierra.c \ |
1176 | + sierra/mm-sim-sierra.h \ |
1177 | + sierra/mm-broadband-bearer-sierra.c \ |
1178 | + sierra/mm-broadband-bearer-sierra.h \ |
1179 | + sierra/mm-broadband-modem-sierra.c \ |
1180 | + sierra/mm-broadband-modem-sierra.h |
1181 | +libmm_utils_sierra_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1182 | +libmm_utils_sierra_la_LIBADD = $(GUDEV_LIBS) $(MM_LIBS) |
1183 | + |
1184 | +SIERRA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/sierra |
1185 | +SIERRA_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-sierra.la |
1186 | + |
1187 | +# Sierra |
1188 | +libmm_plugin_sierra_la_SOURCES = \ |
1189 | + sierra/mm-plugin-sierra.c \ |
1190 | + sierra/mm-plugin-sierra.h \ |
1191 | + sierra/mm-broadband-modem-sierra-icera.c \ |
1192 | + sierra/mm-broadband-modem-sierra-icera.h |
1193 | +libmm_plugin_sierra_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) $(SIERRA_COMMON_COMPILER_FLAGS) |
1194 | +libmm_plugin_sierra_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1195 | +libmm_plugin_sierra_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) $(SIERRA_COMMON_LIBADD_FLAGS) |
1196 | + |
1197 | +# Wavecom (Sierra Airlink) |
1198 | +libmm_plugin_wavecom_la_SOURCES = \ |
1199 | + wavecom/mm-plugin-wavecom.c \ |
1200 | + wavecom/mm-plugin-wavecom.h \ |
1201 | + wavecom/mm-broadband-modem-wavecom.c \ |
1202 | + wavecom/mm-broadband-modem-wavecom.h |
1203 | +libmm_plugin_wavecom_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1204 | +libmm_plugin_wavecom_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1205 | + |
1206 | +# Nokia |
1207 | +libmm_plugin_nokia_la_SOURCES = \ |
1208 | + nokia/mm-plugin-nokia.c \ |
1209 | + nokia/mm-plugin-nokia.h \ |
1210 | + nokia/mm-sim-nokia.c \ |
1211 | + nokia/mm-sim-nokia.h \ |
1212 | + nokia/mm-broadband-modem-nokia.c \ |
1213 | + nokia/mm-broadband-modem-nokia.h |
1214 | +libmm_plugin_nokia_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1215 | +libmm_plugin_nokia_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1216 | + |
1217 | +# Nokia (Icera) |
1218 | +libmm_plugin_nokia_icera_la_SOURCES = \ |
1219 | + nokia/mm-plugin-nokia-icera.c \ |
1220 | + nokia/mm-plugin-nokia-icera.h |
1221 | +libmm_plugin_nokia_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
1222 | +libmm_plugin_nokia_icera_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1223 | +libmm_plugin_nokia_icera_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
1224 | +udevrules_DATA += nokia/77-mm-nokia-port-types.rules |
1225 | + |
1226 | +# Zte |
1227 | +libmm_plugin_zte_la_SOURCES = \ |
1228 | + zte/mm-plugin-zte.c \ |
1229 | + zte/mm-plugin-zte.h \ |
1230 | + zte/mm-common-zte.h \ |
1231 | + zte/mm-common-zte.c \ |
1232 | + zte/mm-broadband-modem-zte.h \ |
1233 | + zte/mm-broadband-modem-zte.c \ |
1234 | + zte/mm-broadband-modem-zte-icera.h \ |
1235 | + zte/mm-broadband-modem-zte-icera.c |
1236 | +libmm_plugin_zte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
1237 | +libmm_plugin_zte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1238 | +libmm_plugin_zte_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
1239 | +udevrules_DATA += zte/77-mm-zte-port-types.rules |
1240 | + |
1241 | +# Longcheer (and rebranded dongles) |
1242 | +libmm_plugin_longcheer_la_SOURCES = \ |
1243 | + longcheer/mm-plugin-longcheer.c \ |
1244 | + longcheer/mm-plugin-longcheer.h \ |
1245 | + longcheer/mm-broadband-modem-longcheer.h \ |
1246 | + longcheer/mm-broadband-modem-longcheer.c |
1247 | +libmm_plugin_longcheer_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1248 | +libmm_plugin_longcheer_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1249 | +udevrules_DATA += longcheer/77-mm-longcheer-port-types.rules |
1250 | + |
1251 | +# AnyData CDMA |
1252 | +libmm_plugin_anydata_la_SOURCES = \ |
1253 | + anydata/mm-plugin-anydata.c \ |
1254 | + anydata/mm-plugin-anydata.h \ |
1255 | + anydata/mm-broadband-modem-anydata.h \ |
1256 | + anydata/mm-broadband-modem-anydata.c |
1257 | +libmm_plugin_anydata_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1258 | +libmm_plugin_anydata_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1259 | + |
1260 | +# Linktop CDMA |
1261 | +libmm_plugin_linktop_la_SOURCES = \ |
1262 | + linktop/mm-plugin-linktop.c \ |
1263 | + linktop/mm-plugin-linktop.h \ |
1264 | + linktop/mm-broadband-modem-linktop.h \ |
1265 | + linktop/mm-broadband-modem-linktop.c |
1266 | +libmm_plugin_linktop_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1267 | +libmm_plugin_linktop_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1268 | + |
1269 | +# SimTech |
1270 | +libmm_plugin_simtech_la_SOURCES = \ |
1271 | + simtech/mm-plugin-simtech.c \ |
1272 | + simtech/mm-plugin-simtech.h \ |
1273 | + simtech/mm-broadband-modem-simtech.h \ |
1274 | + simtech/mm-broadband-modem-simtech.c |
1275 | +libmm_plugin_simtech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1276 | +libmm_plugin_simtech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1277 | +udevrules_DATA += simtech/77-mm-simtech-port-types.rules |
1278 | + |
1279 | +# Alcatel/TCT/JRD x220D and possibly others |
1280 | +libmm_plugin_x22x_la_SOURCES = \ |
1281 | + x22x/mm-plugin-x22x.c \ |
1282 | + x22x/mm-plugin-x22x.h \ |
1283 | + x22x/mm-broadband-modem-x22x.h \ |
1284 | + x22x/mm-broadband-modem-x22x.c |
1285 | +libmm_plugin_x22x_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1286 | +libmm_plugin_x22x_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1287 | +udevrules_DATA += x22x/77-mm-x22x-port-types.rules |
1288 | + |
1289 | +# Pantech |
1290 | +libmm_plugin_pantech_la_SOURCES = \ |
1291 | + pantech/mm-plugin-pantech.c \ |
1292 | + pantech/mm-plugin-pantech.h \ |
1293 | + pantech/mm-sim-pantech.c \ |
1294 | + pantech/mm-sim-pantech.h \ |
1295 | + pantech/mm-broadband-modem-pantech.c \ |
1296 | + pantech/mm-broadband-modem-pantech.h |
1297 | +libmm_plugin_pantech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1298 | +libmm_plugin_pantech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1299 | + |
1300 | +# Samsung modem |
1301 | +libmm_plugin_samsung_la_SOURCES = \ |
1302 | + samsung/mm-plugin-samsung.c \ |
1303 | + samsung/mm-plugin-samsung.h \ |
1304 | + samsung/mm-broadband-modem-samsung.c \ |
1305 | + samsung/mm-broadband-modem-samsung.h |
1306 | +libmm_plugin_samsung_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
1307 | +libmm_plugin_samsung_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1308 | +libmm_plugin_samsung_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
1309 | + |
1310 | +# Cinterion (previously Siemens) modem |
1311 | +libmm_plugin_cinterion_la_SOURCES = \ |
1312 | + cinterion/mm-plugin-cinterion.c \ |
1313 | + cinterion/mm-plugin-cinterion.h \ |
1314 | + cinterion/mm-broadband-modem-cinterion.c \ |
1315 | + cinterion/mm-broadband-modem-cinterion.h |
1316 | +libmm_plugin_cinterion_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1317 | +libmm_plugin_cinterion_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1318 | + |
1319 | +# Iridium modem |
1320 | +libmm_plugin_iridium_la_SOURCES = \ |
1321 | + iridium/mm-plugin-iridium.c \ |
1322 | + iridium/mm-plugin-iridium.h \ |
1323 | + iridium/mm-broadband-modem-iridium.c \ |
1324 | + iridium/mm-broadband-modem-iridium.h \ |
1325 | + iridium/mm-bearer-iridium.c \ |
1326 | + iridium/mm-bearer-iridium.h \ |
1327 | + iridium/mm-sim-iridium.c \ |
1328 | + iridium/mm-sim-iridium.h |
1329 | +libmm_plugin_iridium_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1330 | +libmm_plugin_iridium_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1331 | + |
1332 | +# Common Novatel modem support library |
1333 | +noinst_LTLIBRARIES += libmm-utils-novatel.la |
1334 | +libmm_utils_novatel_la_SOURCES = \ |
1335 | + novatel/mm-common-novatel.c \ |
1336 | + novatel/mm-common-novatel.h \ |
1337 | + novatel/mm-broadband-modem-novatel.c \ |
1338 | + novatel/mm-broadband-modem-novatel.h |
1339 | +libmm_utils_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1340 | +libmm_utils_novatel_la_LIBADD = $(GUDEV_LIBS) $(MM_LIBS) |
1341 | + |
1342 | +NOVATEL_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/novatel |
1343 | +NOVATEL_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-novatel.la |
1344 | + |
1345 | +# Novatel LTE modem |
1346 | +libmm_plugin_novatel_lte_la_SOURCES = \ |
1347 | + novatel/mm-plugin-novatel-lte.c \ |
1348 | + novatel/mm-plugin-novatel-lte.h \ |
1349 | + novatel/mm-broadband-modem-novatel-lte.c \ |
1350 | + novatel/mm-broadband-modem-novatel-lte.h \ |
1351 | + novatel/mm-broadband-bearer-novatel-lte.c \ |
1352 | + novatel/mm-broadband-bearer-novatel-lte.h \ |
1353 | + novatel/mm-sim-novatel-lte.c \ |
1354 | + novatel/mm-sim-novatel-lte.h |
1355 | +libmm_plugin_novatel_lte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1356 | +libmm_plugin_novatel_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1357 | + |
1358 | +# Novatel non-LTE modem |
1359 | +libmm_plugin_novatel_la_SOURCES = \ |
1360 | + novatel/mm-plugin-novatel.c \ |
1361 | + novatel/mm-plugin-novatel.h |
1362 | +libmm_plugin_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(NOVATEL_COMMON_COMPILER_FLAGS) |
1363 | +libmm_plugin_novatel_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1364 | +libmm_plugin_novatel_la_LIBADD = $(NOVATEL_COMMON_LIBADD_FLAGS) |
1365 | + |
1366 | +# Altair LTE modem |
1367 | +libmm_plugin_altair_lte_la_SOURCES = \ |
1368 | + altair/mm-plugin-altair-lte.c \ |
1369 | + altair/mm-plugin-altair-lte.h \ |
1370 | + altair/mm-broadband-modem-altair-lte.c \ |
1371 | + altair/mm-broadband-modem-altair-lte.h \ |
1372 | + altair/mm-broadband-bearer-altair-lte.c \ |
1373 | + altair/mm-broadband-bearer-altair-lte.h |
1374 | +libmm_plugin_altair_lte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1375 | +libmm_plugin_altair_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1376 | + |
1377 | +# VIA modem |
1378 | +libmm_plugin_via_la_SOURCES = \ |
1379 | + via/mm-plugin-via.c \ |
1380 | + via/mm-plugin-via.h \ |
1381 | + via/mm-broadband-modem-via.c \ |
1382 | + via/mm-broadband-modem-via.h |
1383 | +libmm_plugin_via_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1384 | +libmm_plugin_via_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1385 | + |
1386 | +# Telit modem |
1387 | +libmm_plugin_telit_la_SOURCES = \ |
1388 | + telit/mm-plugin-telit.c \ |
1389 | + telit/mm-plugin-telit.h \ |
1390 | + telit/mm-broadband-modem-telit.c \ |
1391 | + telit/mm-broadband-modem-telit.h |
1392 | +libmm_plugin_telit_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1393 | +libmm_plugin_telit_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1394 | + |
1395 | + |
1396 | +# Additional files to include in the distribution |
1397 | +EXTRA_DIST += \ |
1398 | + $(udevrules_DATA) |
1399 | + |
1400 | +# Unit tests |
1401 | +TEST_PROGS += $(noinst_PROGRAMS) |
1402 | |
1403 | === added directory '.pc/new-sierra-legacy-plugin.patch/plugins/sierra' |
1404 | === added file '.pc/new-sierra-legacy-plugin.patch/plugins/sierra/mm-plugin-sierra-legacy.c' |
1405 | === added file '.pc/new-sierra-legacy-plugin.patch/plugins/sierra/mm-plugin-sierra-legacy.h' |
1406 | === added file '.pc/new-sierra-legacy-plugin.patch/plugins/sierra/mm-plugin-sierra.c' |
1407 | --- .pc/new-sierra-legacy-plugin.patch/plugins/sierra/mm-plugin-sierra.c 1970-01-01 00:00:00 +0000 |
1408 | +++ .pc/new-sierra-legacy-plugin.patch/plugins/sierra/mm-plugin-sierra.c 2015-09-25 10:05:24 +0000 |
1409 | @@ -0,0 +1,129 @@ |
1410 | +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
1411 | +/* |
1412 | + * This program is free software; you can redistribute it and/or modify |
1413 | + * it under the terms of the GNU General Public License as published by |
1414 | + * the Free Software Foundation; either version 2 of the License, or |
1415 | + * (at your option) any later version. |
1416 | + * |
1417 | + * This program is distributed in the hope that it will be useful, |
1418 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1419 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1420 | + * GNU General Public License for more details: |
1421 | + * |
1422 | + * Copyright (C) 2008 - 2009 Novell, Inc. |
1423 | + * Copyright (C) 2009 - 2012 Red Hat, Inc. |
1424 | + * Copyright (C) 2012 Lanedo GmbH |
1425 | + */ |
1426 | + |
1427 | +#include <stdlib.h> |
1428 | +#include <gmodule.h> |
1429 | + |
1430 | +#define _LIBMM_INSIDE_MM |
1431 | +#include <libmm-glib.h> |
1432 | + |
1433 | +#include "mm-log.h" |
1434 | +#include "mm-plugin-sierra.h" |
1435 | +#include "mm-common-sierra.h" |
1436 | +#include "mm-broadband-modem-sierra.h" |
1437 | +#include "mm-broadband-modem-sierra-icera.h" |
1438 | + |
1439 | +#if defined WITH_QMI |
1440 | +#include "mm-broadband-modem-qmi.h" |
1441 | +#endif |
1442 | + |
1443 | +#if defined WITH_MBIM |
1444 | +#include "mm-broadband-modem-mbim.h" |
1445 | +#endif |
1446 | + |
1447 | +G_DEFINE_TYPE (MMPluginSierra, mm_plugin_sierra, MM_TYPE_PLUGIN) |
1448 | + |
1449 | +int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION; |
1450 | +int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; |
1451 | + |
1452 | +/*****************************************************************************/ |
1453 | + |
1454 | +static MMBaseModem * |
1455 | +create_modem (MMPlugin *self, |
1456 | + const gchar *sysfs_path, |
1457 | + const gchar **drivers, |
1458 | + guint16 vendor, |
1459 | + guint16 product, |
1460 | + GList *probes, |
1461 | + GError **error) |
1462 | +{ |
1463 | +#if defined WITH_QMI |
1464 | + if (mm_port_probe_list_has_qmi_port (probes)) { |
1465 | + mm_dbg ("QMI-powered Sierra modem found..."); |
1466 | + return MM_BASE_MODEM (mm_broadband_modem_qmi_new (sysfs_path, |
1467 | + drivers, |
1468 | + mm_plugin_get_name (self), |
1469 | + vendor, |
1470 | + product)); |
1471 | + } |
1472 | +#endif |
1473 | + |
1474 | +#if defined WITH_MBIM |
1475 | + if (mm_port_probe_list_has_mbim_port (probes)) { |
1476 | + mm_dbg ("MBIM-powered Sierra modem found..."); |
1477 | + return MM_BASE_MODEM (mm_broadband_modem_mbim_new (sysfs_path, |
1478 | + drivers, |
1479 | + mm_plugin_get_name (self), |
1480 | + vendor, |
1481 | + product)); |
1482 | + } |
1483 | +#endif |
1484 | + |
1485 | + if (mm_common_sierra_port_probe_list_is_icera (probes)) |
1486 | + return MM_BASE_MODEM (mm_broadband_modem_sierra_icera_new (sysfs_path, |
1487 | + drivers, |
1488 | + mm_plugin_get_name (self), |
1489 | + vendor, |
1490 | + product)); |
1491 | + |
1492 | + return MM_BASE_MODEM (mm_broadband_modem_sierra_new (sysfs_path, |
1493 | + drivers, |
1494 | + mm_plugin_get_name (self), |
1495 | + vendor, |
1496 | + product)); |
1497 | +} |
1498 | + |
1499 | +/*****************************************************************************/ |
1500 | + |
1501 | +G_MODULE_EXPORT MMPlugin * |
1502 | +mm_plugin_create (void) |
1503 | +{ |
1504 | + static const gchar *subsystems[] = { "tty", "net", "usb", NULL }; |
1505 | + static const gchar *drivers[] = { "sierra", "sierra_net", NULL }; |
1506 | + static const MMAsyncMethod custom_init = { |
1507 | + .async = G_CALLBACK (mm_common_sierra_custom_init), |
1508 | + .finish = G_CALLBACK (mm_common_sierra_custom_init_finish), |
1509 | + }; |
1510 | + |
1511 | + return MM_PLUGIN ( |
1512 | + g_object_new (MM_TYPE_PLUGIN_SIERRA, |
1513 | + MM_PLUGIN_NAME, "Sierra", |
1514 | + MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems, |
1515 | + MM_PLUGIN_ALLOWED_DRIVERS, drivers, |
1516 | + MM_PLUGIN_ALLOWED_AT, TRUE, |
1517 | + MM_PLUGIN_ALLOWED_QCDM, TRUE, |
1518 | + MM_PLUGIN_ALLOWED_QMI, TRUE, |
1519 | + MM_PLUGIN_ALLOWED_MBIM, TRUE, |
1520 | + MM_PLUGIN_CUSTOM_INIT, &custom_init, |
1521 | + MM_PLUGIN_ICERA_PROBE, TRUE, |
1522 | + MM_PLUGIN_REMOVE_ECHO, FALSE, |
1523 | + NULL)); |
1524 | +} |
1525 | + |
1526 | +static void |
1527 | +mm_plugin_sierra_init (MMPluginSierra *self) |
1528 | +{ |
1529 | +} |
1530 | + |
1531 | +static void |
1532 | +mm_plugin_sierra_class_init (MMPluginSierraClass *klass) |
1533 | +{ |
1534 | + MMPluginClass *plugin_class = MM_PLUGIN_CLASS (klass); |
1535 | + |
1536 | + plugin_class->create_modem = create_modem; |
1537 | + plugin_class->grab_port = mm_common_sierra_grab_port; |
1538 | +} |
1539 | |
1540 | === added directory '.pc/novatel-common-library.patch' |
1541 | === added directory '.pc/novatel-common-library.patch/plugins' |
1542 | === added file '.pc/novatel-common-library.patch/plugins/Makefile.am' |
1543 | --- .pc/novatel-common-library.patch/plugins/Makefile.am 1970-01-01 00:00:00 +0000 |
1544 | +++ .pc/novatel-common-library.patch/plugins/Makefile.am 2015-09-25 10:05:24 +0000 |
1545 | @@ -0,0 +1,381 @@ |
1546 | +include $(top_srcdir)/gtester.make |
1547 | + |
1548 | +# Common CPPFLAGS and LDFLAGS |
1549 | + |
1550 | +PLUGIN_COMMON_COMPILER_FLAGS = \ |
1551 | + $(MM_CFLAGS) \ |
1552 | + $(GUDEV_CFLAGS) \ |
1553 | + -I$(top_srcdir) \ |
1554 | + -I$(top_srcdir)/src \ |
1555 | + -I$(top_builddir)/src \ |
1556 | + -I$(top_srcdir)/include \ |
1557 | + -I$(top_builddir)/include \ |
1558 | + -I$(top_srcdir)/libmm-glib \ |
1559 | + -I$(top_srcdir)/libmm-glib/generated \ |
1560 | + -I$(top_builddir)/libmm-glib/generated |
1561 | + |
1562 | +PLUGIN_COMMON_LINKER_FLAGS = \ |
1563 | + $(GUDEV_LDFLAGS) \ |
1564 | + -module \ |
1565 | + -avoid-version |
1566 | + |
1567 | +if WITH_QMI |
1568 | +PLUGIN_COMMON_COMPILER_FLAGS += $(QMI_CFLAGS) |
1569 | +endif |
1570 | + |
1571 | +if WITH_MBIM |
1572 | +PLUGIN_COMMON_COMPILER_FLAGS += $(MBIM_CFLAGS) |
1573 | +endif |
1574 | + |
1575 | +# UDev rules |
1576 | +udevrulesdir = $(UDEV_BASE_DIR)/rules.d |
1577 | +udevrules_DATA = |
1578 | + |
1579 | +# Unit tests |
1580 | +noinst_PROGRAMS = |
1581 | + |
1582 | +######################################## |
1583 | + |
1584 | +# Icera-specific support |
1585 | +noinst_LTLIBRARIES = libmm-utils-icera.la |
1586 | +libmm_utils_icera_la_SOURCES = \ |
1587 | + icera/mm-broadband-modem-icera.h \ |
1588 | + icera/mm-broadband-modem-icera.c \ |
1589 | + icera/mm-broadband-bearer-icera.h \ |
1590 | + icera/mm-broadband-bearer-icera.c |
1591 | +libmm_utils_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1592 | +libmm_utils_icera_la_LIBADD = $(GUDEV_LDFLAGS) |
1593 | + |
1594 | +ICERA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/icera |
1595 | +ICERA_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-icera.la |
1596 | + |
1597 | +######################################## |
1598 | + |
1599 | +pkglib_LTLIBRARIES = \ |
1600 | + libmm-plugin-generic.la \ |
1601 | + libmm-plugin-nokia.la \ |
1602 | + libmm-plugin-nokia-icera.la \ |
1603 | + libmm-plugin-cinterion.la \ |
1604 | + libmm-plugin-iridium.la \ |
1605 | + libmm-plugin-gobi.la \ |
1606 | + libmm-plugin-motorola.la \ |
1607 | + libmm-plugin-novatel.la \ |
1608 | + libmm-plugin-novatel-lte.la \ |
1609 | + libmm-plugin-altair-lte.la \ |
1610 | + libmm-plugin-samsung.la \ |
1611 | + libmm-plugin-option.la \ |
1612 | + libmm-plugin-hso.la \ |
1613 | + libmm-plugin-anydata.la \ |
1614 | + libmm-plugin-linktop.la \ |
1615 | + libmm-plugin-simtech.la \ |
1616 | + libmm-plugin-wavecom.la \ |
1617 | + libmm-plugin-huawei.la \ |
1618 | + libmm-plugin-longcheer.la \ |
1619 | + libmm-plugin-x22x.la \ |
1620 | + libmm-plugin-pantech.la \ |
1621 | + libmm-plugin-zte.la \ |
1622 | + libmm-plugin-sierra.la \ |
1623 | + libmm-plugin-mbm.la \ |
1624 | + libmm-plugin-via.la \ |
1625 | + libmm-plugin-telit.la |
1626 | + |
1627 | +# Generic |
1628 | +libmm_plugin_generic_la_SOURCES = \ |
1629 | + generic/mm-plugin-generic.c \ |
1630 | + generic/mm-plugin-generic.h |
1631 | +libmm_plugin_generic_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1632 | +libmm_plugin_generic_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1633 | + |
1634 | +## Motorola |
1635 | +libmm_plugin_motorola_la_SOURCES = \ |
1636 | + motorola/mm-plugin-motorola.c \ |
1637 | + motorola/mm-plugin-motorola.h \ |
1638 | + motorola/mm-broadband-modem-motorola.c \ |
1639 | + motorola/mm-broadband-modem-motorola.h |
1640 | +libmm_plugin_motorola_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1641 | +libmm_plugin_motorola_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1642 | + |
1643 | +# Gobi |
1644 | +libmm_plugin_gobi_la_SOURCES = \ |
1645 | + gobi/mm-plugin-gobi.c \ |
1646 | + gobi/mm-plugin-gobi.h \ |
1647 | + gobi/mm-broadband-modem-gobi.c \ |
1648 | + gobi/mm-broadband-modem-gobi.h |
1649 | +libmm_plugin_gobi_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1650 | +libmm_plugin_gobi_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1651 | + |
1652 | +# Huawei |
1653 | +libmm_plugin_huawei_la_SOURCES = \ |
1654 | + huawei/mm-plugin-huawei.c \ |
1655 | + huawei/mm-plugin-huawei.h \ |
1656 | + huawei/mm-modem-helpers-huawei.c \ |
1657 | + huawei/mm-modem-helpers-huawei.h \ |
1658 | + huawei/mm-broadband-modem-huawei.c \ |
1659 | + huawei/mm-broadband-modem-huawei.h \ |
1660 | + huawei/mm-broadband-bearer-huawei.c \ |
1661 | + huawei/mm-broadband-bearer-huawei.h |
1662 | +libmm_plugin_huawei_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1663 | +libmm_plugin_huawei_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1664 | + |
1665 | +udevrules_DATA += huawei/77-mm-huawei-net-port-types.rules |
1666 | + |
1667 | +noinst_PROGRAMS += test-modem-helpers-huawei |
1668 | +test_modem_helpers_huawei_SOURCES = \ |
1669 | + huawei/mm-modem-helpers-huawei.c \ |
1670 | + huawei/mm-modem-helpers-huawei.h \ |
1671 | + huawei/tests/test-modem-helpers-huawei.c |
1672 | +test_modem_helpers_huawei_CPPFLAGS = \ |
1673 | + -I$(top_srcdir)/plugins/huawei \ |
1674 | + $(PLUGIN_COMMON_COMPILER_FLAGS) |
1675 | +test_modem_helpers_huawei_LDFLAGS = $(MM_LIBS) $(top_builddir)/libmm-glib/libmm-glib.la |
1676 | + |
1677 | + |
1678 | +# MBM |
1679 | +libmm_plugin_mbm_la_SOURCES = \ |
1680 | + mbm/mm-plugin-mbm.c \ |
1681 | + mbm/mm-plugin-mbm.h \ |
1682 | + mbm/mm-broadband-modem-mbm.c \ |
1683 | + mbm/mm-broadband-modem-mbm.h \ |
1684 | + mbm/mm-broadband-bearer-mbm.c \ |
1685 | + mbm/mm-broadband-bearer-mbm.h \ |
1686 | + mbm/mm-sim-mbm.c \ |
1687 | + mbm/mm-sim-mbm.h |
1688 | +libmm_plugin_mbm_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1689 | +libmm_plugin_mbm_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1690 | +udevrules_DATA += mbm/77-mm-ericsson-mbm.rules |
1691 | + |
1692 | +# Option |
1693 | +libmm_plugin_option_la_SOURCES = \ |
1694 | + option/mm-plugin-option.c \ |
1695 | + option/mm-plugin-option.h \ |
1696 | + option/mm-broadband-modem-option.c \ |
1697 | + option/mm-broadband-modem-option.h |
1698 | +libmm_plugin_option_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1699 | +libmm_plugin_option_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1700 | + |
1701 | +# HSO |
1702 | +libmm_plugin_hso_la_SOURCES = \ |
1703 | + option/mm-plugin-hso.c \ |
1704 | + option/mm-plugin-hso.h \ |
1705 | + option/mm-broadband-modem-option.c \ |
1706 | + option/mm-broadband-modem-option.h \ |
1707 | + option/mm-broadband-bearer-hso.c \ |
1708 | + option/mm-broadband-bearer-hso.h \ |
1709 | + option/mm-broadband-modem-hso.c \ |
1710 | + option/mm-broadband-modem-hso.h |
1711 | +libmm_plugin_hso_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1712 | +libmm_plugin_hso_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1713 | + |
1714 | +# Sierra |
1715 | +libmm_plugin_sierra_la_SOURCES = \ |
1716 | + sierra/mm-plugin-sierra.c \ |
1717 | + sierra/mm-plugin-sierra.h \ |
1718 | + sierra/mm-common-sierra.c \ |
1719 | + sierra/mm-common-sierra.h \ |
1720 | + sierra/mm-sim-sierra.c \ |
1721 | + sierra/mm-sim-sierra.h \ |
1722 | + sierra/mm-broadband-bearer-sierra.c \ |
1723 | + sierra/mm-broadband-bearer-sierra.h \ |
1724 | + sierra/mm-broadband-modem-sierra.c \ |
1725 | + sierra/mm-broadband-modem-sierra.h \ |
1726 | + sierra/mm-broadband-modem-sierra-icera.c \ |
1727 | + sierra/mm-broadband-modem-sierra-icera.h |
1728 | +libmm_plugin_sierra_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
1729 | +libmm_plugin_sierra_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1730 | +libmm_plugin_sierra_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
1731 | + |
1732 | +# Wavecom (Sierra Airlink) |
1733 | +libmm_plugin_wavecom_la_SOURCES = \ |
1734 | + wavecom/mm-plugin-wavecom.c \ |
1735 | + wavecom/mm-plugin-wavecom.h \ |
1736 | + wavecom/mm-broadband-modem-wavecom.c \ |
1737 | + wavecom/mm-broadband-modem-wavecom.h |
1738 | +libmm_plugin_wavecom_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1739 | +libmm_plugin_wavecom_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1740 | + |
1741 | +# Nokia |
1742 | +libmm_plugin_nokia_la_SOURCES = \ |
1743 | + nokia/mm-plugin-nokia.c \ |
1744 | + nokia/mm-plugin-nokia.h \ |
1745 | + nokia/mm-sim-nokia.c \ |
1746 | + nokia/mm-sim-nokia.h \ |
1747 | + nokia/mm-broadband-modem-nokia.c \ |
1748 | + nokia/mm-broadband-modem-nokia.h |
1749 | +libmm_plugin_nokia_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1750 | +libmm_plugin_nokia_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1751 | + |
1752 | +# Nokia (Icera) |
1753 | +libmm_plugin_nokia_icera_la_SOURCES = \ |
1754 | + nokia/mm-plugin-nokia-icera.c \ |
1755 | + nokia/mm-plugin-nokia-icera.h |
1756 | +libmm_plugin_nokia_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
1757 | +libmm_plugin_nokia_icera_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1758 | +libmm_plugin_nokia_icera_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
1759 | +udevrules_DATA += nokia/77-mm-nokia-port-types.rules |
1760 | + |
1761 | +# Zte |
1762 | +libmm_plugin_zte_la_SOURCES = \ |
1763 | + zte/mm-plugin-zte.c \ |
1764 | + zte/mm-plugin-zte.h \ |
1765 | + zte/mm-common-zte.h \ |
1766 | + zte/mm-common-zte.c \ |
1767 | + zte/mm-broadband-modem-zte.h \ |
1768 | + zte/mm-broadband-modem-zte.c \ |
1769 | + zte/mm-broadband-modem-zte-icera.h \ |
1770 | + zte/mm-broadband-modem-zte-icera.c |
1771 | +libmm_plugin_zte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
1772 | +libmm_plugin_zte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1773 | +libmm_plugin_zte_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
1774 | +udevrules_DATA += zte/77-mm-zte-port-types.rules |
1775 | + |
1776 | +# Longcheer (and rebranded dongles) |
1777 | +libmm_plugin_longcheer_la_SOURCES = \ |
1778 | + longcheer/mm-plugin-longcheer.c \ |
1779 | + longcheer/mm-plugin-longcheer.h \ |
1780 | + longcheer/mm-broadband-modem-longcheer.h \ |
1781 | + longcheer/mm-broadband-modem-longcheer.c |
1782 | +libmm_plugin_longcheer_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1783 | +libmm_plugin_longcheer_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1784 | +udevrules_DATA += longcheer/77-mm-longcheer-port-types.rules |
1785 | + |
1786 | +# AnyData CDMA |
1787 | +libmm_plugin_anydata_la_SOURCES = \ |
1788 | + anydata/mm-plugin-anydata.c \ |
1789 | + anydata/mm-plugin-anydata.h \ |
1790 | + anydata/mm-broadband-modem-anydata.h \ |
1791 | + anydata/mm-broadband-modem-anydata.c |
1792 | +libmm_plugin_anydata_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1793 | +libmm_plugin_anydata_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1794 | + |
1795 | +# Linktop CDMA |
1796 | +libmm_plugin_linktop_la_SOURCES = \ |
1797 | + linktop/mm-plugin-linktop.c \ |
1798 | + linktop/mm-plugin-linktop.h \ |
1799 | + linktop/mm-broadband-modem-linktop.h \ |
1800 | + linktop/mm-broadband-modem-linktop.c |
1801 | +libmm_plugin_linktop_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1802 | +libmm_plugin_linktop_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1803 | + |
1804 | +# SimTech |
1805 | +libmm_plugin_simtech_la_SOURCES = \ |
1806 | + simtech/mm-plugin-simtech.c \ |
1807 | + simtech/mm-plugin-simtech.h \ |
1808 | + simtech/mm-broadband-modem-simtech.h \ |
1809 | + simtech/mm-broadband-modem-simtech.c |
1810 | +libmm_plugin_simtech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1811 | +libmm_plugin_simtech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1812 | +udevrules_DATA += simtech/77-mm-simtech-port-types.rules |
1813 | + |
1814 | +# Alcatel/TCT/JRD x220D and possibly others |
1815 | +libmm_plugin_x22x_la_SOURCES = \ |
1816 | + x22x/mm-plugin-x22x.c \ |
1817 | + x22x/mm-plugin-x22x.h \ |
1818 | + x22x/mm-broadband-modem-x22x.h \ |
1819 | + x22x/mm-broadband-modem-x22x.c |
1820 | +libmm_plugin_x22x_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1821 | +libmm_plugin_x22x_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1822 | +udevrules_DATA += x22x/77-mm-x22x-port-types.rules |
1823 | + |
1824 | +# Pantech |
1825 | +libmm_plugin_pantech_la_SOURCES = \ |
1826 | + pantech/mm-plugin-pantech.c \ |
1827 | + pantech/mm-plugin-pantech.h \ |
1828 | + pantech/mm-sim-pantech.c \ |
1829 | + pantech/mm-sim-pantech.h \ |
1830 | + pantech/mm-broadband-modem-pantech.c \ |
1831 | + pantech/mm-broadband-modem-pantech.h |
1832 | +libmm_plugin_pantech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1833 | +libmm_plugin_pantech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1834 | + |
1835 | +# Samsung modem |
1836 | +libmm_plugin_samsung_la_SOURCES = \ |
1837 | + samsung/mm-plugin-samsung.c \ |
1838 | + samsung/mm-plugin-samsung.h \ |
1839 | + samsung/mm-broadband-modem-samsung.c \ |
1840 | + samsung/mm-broadband-modem-samsung.h |
1841 | +libmm_plugin_samsung_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
1842 | +libmm_plugin_samsung_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1843 | +libmm_plugin_samsung_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
1844 | + |
1845 | +# Cinterion (previously Siemens) modem |
1846 | +libmm_plugin_cinterion_la_SOURCES = \ |
1847 | + cinterion/mm-plugin-cinterion.c \ |
1848 | + cinterion/mm-plugin-cinterion.h \ |
1849 | + cinterion/mm-broadband-modem-cinterion.c \ |
1850 | + cinterion/mm-broadband-modem-cinterion.h |
1851 | +libmm_plugin_cinterion_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1852 | +libmm_plugin_cinterion_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1853 | + |
1854 | +# Iridium modem |
1855 | +libmm_plugin_iridium_la_SOURCES = \ |
1856 | + iridium/mm-plugin-iridium.c \ |
1857 | + iridium/mm-plugin-iridium.h \ |
1858 | + iridium/mm-broadband-modem-iridium.c \ |
1859 | + iridium/mm-broadband-modem-iridium.h \ |
1860 | + iridium/mm-bearer-iridium.c \ |
1861 | + iridium/mm-bearer-iridium.h \ |
1862 | + iridium/mm-sim-iridium.c \ |
1863 | + iridium/mm-sim-iridium.h |
1864 | +libmm_plugin_iridium_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1865 | +libmm_plugin_iridium_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1866 | + |
1867 | +# Novatel LTE modem |
1868 | +libmm_plugin_novatel_lte_la_SOURCES = \ |
1869 | + novatel/mm-plugin-novatel-lte.c \ |
1870 | + novatel/mm-plugin-novatel-lte.h \ |
1871 | + novatel/mm-broadband-modem-novatel-lte.c \ |
1872 | + novatel/mm-broadband-modem-novatel-lte.h \ |
1873 | + novatel/mm-broadband-bearer-novatel-lte.c \ |
1874 | + novatel/mm-broadband-bearer-novatel-lte.h \ |
1875 | + novatel/mm-sim-novatel-lte.c \ |
1876 | + novatel/mm-sim-novatel-lte.h |
1877 | +libmm_plugin_novatel_lte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1878 | +libmm_plugin_novatel_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1879 | + |
1880 | +# Novatel non-LTE modem |
1881 | +libmm_plugin_novatel_la_SOURCES = \ |
1882 | + novatel/mm-plugin-novatel.c \ |
1883 | + novatel/mm-plugin-novatel.h \ |
1884 | + novatel/mm-common-novatel.c \ |
1885 | + novatel/mm-common-novatel.h \ |
1886 | + novatel/mm-broadband-modem-novatel.c \ |
1887 | + novatel/mm-broadband-modem-novatel.h |
1888 | +libmm_plugin_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1889 | +libmm_plugin_novatel_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1890 | + |
1891 | +# Altair LTE modem |
1892 | +libmm_plugin_altair_lte_la_SOURCES = \ |
1893 | + altair/mm-plugin-altair-lte.c \ |
1894 | + altair/mm-plugin-altair-lte.h \ |
1895 | + altair/mm-broadband-modem-altair-lte.c \ |
1896 | + altair/mm-broadband-modem-altair-lte.h \ |
1897 | + altair/mm-broadband-bearer-altair-lte.c \ |
1898 | + altair/mm-broadband-bearer-altair-lte.h |
1899 | +libmm_plugin_altair_lte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1900 | +libmm_plugin_altair_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1901 | + |
1902 | +# VIA modem |
1903 | +libmm_plugin_via_la_SOURCES = \ |
1904 | + via/mm-plugin-via.c \ |
1905 | + via/mm-plugin-via.h \ |
1906 | + via/mm-broadband-modem-via.c \ |
1907 | + via/mm-broadband-modem-via.h |
1908 | +libmm_plugin_via_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1909 | +libmm_plugin_via_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1910 | + |
1911 | +# Telit modem |
1912 | +libmm_plugin_telit_la_SOURCES = \ |
1913 | + telit/mm-plugin-telit.c \ |
1914 | + telit/mm-plugin-telit.h \ |
1915 | + telit/mm-broadband-modem-telit.c \ |
1916 | + telit/mm-broadband-modem-telit.h |
1917 | +libmm_plugin_telit_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1918 | +libmm_plugin_telit_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
1919 | + |
1920 | + |
1921 | +# Additional files to include in the distribution |
1922 | +EXTRA_DIST += \ |
1923 | + $(udevrules_DATA) |
1924 | + |
1925 | +# Unit tests |
1926 | +TEST_PROGS += $(noinst_PROGRAMS) |
1927 | |
1928 | === added directory '.pc/novatel-custom-init.patch' |
1929 | === added directory '.pc/novatel-custom-init.patch/plugins' |
1930 | === added file '.pc/novatel-custom-init.patch/plugins/Makefile.am' |
1931 | --- .pc/novatel-custom-init.patch/plugins/Makefile.am 1970-01-01 00:00:00 +0000 |
1932 | +++ .pc/novatel-custom-init.patch/plugins/Makefile.am 2015-09-25 10:05:24 +0000 |
1933 | @@ -0,0 +1,379 @@ |
1934 | +include $(top_srcdir)/gtester.make |
1935 | + |
1936 | +# Common CPPFLAGS and LDFLAGS |
1937 | + |
1938 | +PLUGIN_COMMON_COMPILER_FLAGS = \ |
1939 | + $(MM_CFLAGS) \ |
1940 | + $(GUDEV_CFLAGS) \ |
1941 | + -I$(top_srcdir) \ |
1942 | + -I$(top_srcdir)/src \ |
1943 | + -I$(top_builddir)/src \ |
1944 | + -I$(top_srcdir)/include \ |
1945 | + -I$(top_builddir)/include \ |
1946 | + -I$(top_srcdir)/libmm-glib \ |
1947 | + -I$(top_srcdir)/libmm-glib/generated \ |
1948 | + -I$(top_builddir)/libmm-glib/generated |
1949 | + |
1950 | +PLUGIN_COMMON_LINKER_FLAGS = \ |
1951 | + $(GUDEV_LDFLAGS) \ |
1952 | + -module \ |
1953 | + -avoid-version |
1954 | + |
1955 | +if WITH_QMI |
1956 | +PLUGIN_COMMON_COMPILER_FLAGS += $(QMI_CFLAGS) |
1957 | +endif |
1958 | + |
1959 | +if WITH_MBIM |
1960 | +PLUGIN_COMMON_COMPILER_FLAGS += $(MBIM_CFLAGS) |
1961 | +endif |
1962 | + |
1963 | +# UDev rules |
1964 | +udevrulesdir = $(UDEV_BASE_DIR)/rules.d |
1965 | +udevrules_DATA = |
1966 | + |
1967 | +# Unit tests |
1968 | +noinst_PROGRAMS = |
1969 | + |
1970 | +######################################## |
1971 | + |
1972 | +# Icera-specific support |
1973 | +noinst_LTLIBRARIES = libmm-utils-icera.la |
1974 | +libmm_utils_icera_la_SOURCES = \ |
1975 | + icera/mm-broadband-modem-icera.h \ |
1976 | + icera/mm-broadband-modem-icera.c \ |
1977 | + icera/mm-broadband-bearer-icera.h \ |
1978 | + icera/mm-broadband-bearer-icera.c |
1979 | +libmm_utils_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
1980 | +libmm_utils_icera_la_LIBADD = $(GUDEV_LDFLAGS) |
1981 | + |
1982 | +ICERA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/icera |
1983 | +ICERA_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-icera.la |
1984 | + |
1985 | +######################################## |
1986 | + |
1987 | +pkglib_LTLIBRARIES = \ |
1988 | + libmm-plugin-generic.la \ |
1989 | + libmm-plugin-nokia.la \ |
1990 | + libmm-plugin-nokia-icera.la \ |
1991 | + libmm-plugin-cinterion.la \ |
1992 | + libmm-plugin-iridium.la \ |
1993 | + libmm-plugin-gobi.la \ |
1994 | + libmm-plugin-motorola.la \ |
1995 | + libmm-plugin-novatel.la \ |
1996 | + libmm-plugin-novatel-lte.la \ |
1997 | + libmm-plugin-altair-lte.la \ |
1998 | + libmm-plugin-samsung.la \ |
1999 | + libmm-plugin-option.la \ |
2000 | + libmm-plugin-hso.la \ |
2001 | + libmm-plugin-anydata.la \ |
2002 | + libmm-plugin-linktop.la \ |
2003 | + libmm-plugin-simtech.la \ |
2004 | + libmm-plugin-wavecom.la \ |
2005 | + libmm-plugin-huawei.la \ |
2006 | + libmm-plugin-longcheer.la \ |
2007 | + libmm-plugin-x22x.la \ |
2008 | + libmm-plugin-pantech.la \ |
2009 | + libmm-plugin-zte.la \ |
2010 | + libmm-plugin-sierra.la \ |
2011 | + libmm-plugin-mbm.la \ |
2012 | + libmm-plugin-via.la \ |
2013 | + libmm-plugin-telit.la |
2014 | + |
2015 | +# Generic |
2016 | +libmm_plugin_generic_la_SOURCES = \ |
2017 | + generic/mm-plugin-generic.c \ |
2018 | + generic/mm-plugin-generic.h |
2019 | +libmm_plugin_generic_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2020 | +libmm_plugin_generic_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2021 | + |
2022 | +## Motorola |
2023 | +libmm_plugin_motorola_la_SOURCES = \ |
2024 | + motorola/mm-plugin-motorola.c \ |
2025 | + motorola/mm-plugin-motorola.h \ |
2026 | + motorola/mm-broadband-modem-motorola.c \ |
2027 | + motorola/mm-broadband-modem-motorola.h |
2028 | +libmm_plugin_motorola_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2029 | +libmm_plugin_motorola_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2030 | + |
2031 | +# Gobi |
2032 | +libmm_plugin_gobi_la_SOURCES = \ |
2033 | + gobi/mm-plugin-gobi.c \ |
2034 | + gobi/mm-plugin-gobi.h \ |
2035 | + gobi/mm-broadband-modem-gobi.c \ |
2036 | + gobi/mm-broadband-modem-gobi.h |
2037 | +libmm_plugin_gobi_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2038 | +libmm_plugin_gobi_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2039 | + |
2040 | +# Huawei |
2041 | +libmm_plugin_huawei_la_SOURCES = \ |
2042 | + huawei/mm-plugin-huawei.c \ |
2043 | + huawei/mm-plugin-huawei.h \ |
2044 | + huawei/mm-modem-helpers-huawei.c \ |
2045 | + huawei/mm-modem-helpers-huawei.h \ |
2046 | + huawei/mm-broadband-modem-huawei.c \ |
2047 | + huawei/mm-broadband-modem-huawei.h \ |
2048 | + huawei/mm-broadband-bearer-huawei.c \ |
2049 | + huawei/mm-broadband-bearer-huawei.h |
2050 | +libmm_plugin_huawei_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2051 | +libmm_plugin_huawei_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2052 | + |
2053 | +udevrules_DATA += huawei/77-mm-huawei-net-port-types.rules |
2054 | + |
2055 | +noinst_PROGRAMS += test-modem-helpers-huawei |
2056 | +test_modem_helpers_huawei_SOURCES = \ |
2057 | + huawei/mm-modem-helpers-huawei.c \ |
2058 | + huawei/mm-modem-helpers-huawei.h \ |
2059 | + huawei/tests/test-modem-helpers-huawei.c |
2060 | +test_modem_helpers_huawei_CPPFLAGS = \ |
2061 | + -I$(top_srcdir)/plugins/huawei \ |
2062 | + $(PLUGIN_COMMON_COMPILER_FLAGS) |
2063 | +test_modem_helpers_huawei_LDFLAGS = $(MM_LIBS) $(top_builddir)/libmm-glib/libmm-glib.la |
2064 | + |
2065 | + |
2066 | +# MBM |
2067 | +libmm_plugin_mbm_la_SOURCES = \ |
2068 | + mbm/mm-plugin-mbm.c \ |
2069 | + mbm/mm-plugin-mbm.h \ |
2070 | + mbm/mm-broadband-modem-mbm.c \ |
2071 | + mbm/mm-broadband-modem-mbm.h \ |
2072 | + mbm/mm-broadband-bearer-mbm.c \ |
2073 | + mbm/mm-broadband-bearer-mbm.h \ |
2074 | + mbm/mm-sim-mbm.c \ |
2075 | + mbm/mm-sim-mbm.h |
2076 | +libmm_plugin_mbm_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2077 | +libmm_plugin_mbm_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2078 | +udevrules_DATA += mbm/77-mm-ericsson-mbm.rules |
2079 | + |
2080 | +# Option |
2081 | +libmm_plugin_option_la_SOURCES = \ |
2082 | + option/mm-plugin-option.c \ |
2083 | + option/mm-plugin-option.h \ |
2084 | + option/mm-broadband-modem-option.c \ |
2085 | + option/mm-broadband-modem-option.h |
2086 | +libmm_plugin_option_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2087 | +libmm_plugin_option_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2088 | + |
2089 | +# HSO |
2090 | +libmm_plugin_hso_la_SOURCES = \ |
2091 | + option/mm-plugin-hso.c \ |
2092 | + option/mm-plugin-hso.h \ |
2093 | + option/mm-broadband-modem-option.c \ |
2094 | + option/mm-broadband-modem-option.h \ |
2095 | + option/mm-broadband-bearer-hso.c \ |
2096 | + option/mm-broadband-bearer-hso.h \ |
2097 | + option/mm-broadband-modem-hso.c \ |
2098 | + option/mm-broadband-modem-hso.h |
2099 | +libmm_plugin_hso_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2100 | +libmm_plugin_hso_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2101 | + |
2102 | +# Sierra |
2103 | +libmm_plugin_sierra_la_SOURCES = \ |
2104 | + sierra/mm-plugin-sierra.c \ |
2105 | + sierra/mm-plugin-sierra.h \ |
2106 | + sierra/mm-common-sierra.c \ |
2107 | + sierra/mm-common-sierra.h \ |
2108 | + sierra/mm-sim-sierra.c \ |
2109 | + sierra/mm-sim-sierra.h \ |
2110 | + sierra/mm-broadband-bearer-sierra.c \ |
2111 | + sierra/mm-broadband-bearer-sierra.h \ |
2112 | + sierra/mm-broadband-modem-sierra.c \ |
2113 | + sierra/mm-broadband-modem-sierra.h \ |
2114 | + sierra/mm-broadband-modem-sierra-icera.c \ |
2115 | + sierra/mm-broadband-modem-sierra-icera.h |
2116 | +libmm_plugin_sierra_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
2117 | +libmm_plugin_sierra_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2118 | +libmm_plugin_sierra_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
2119 | + |
2120 | +# Wavecom (Sierra Airlink) |
2121 | +libmm_plugin_wavecom_la_SOURCES = \ |
2122 | + wavecom/mm-plugin-wavecom.c \ |
2123 | + wavecom/mm-plugin-wavecom.h \ |
2124 | + wavecom/mm-broadband-modem-wavecom.c \ |
2125 | + wavecom/mm-broadband-modem-wavecom.h |
2126 | +libmm_plugin_wavecom_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2127 | +libmm_plugin_wavecom_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2128 | + |
2129 | +# Nokia |
2130 | +libmm_plugin_nokia_la_SOURCES = \ |
2131 | + nokia/mm-plugin-nokia.c \ |
2132 | + nokia/mm-plugin-nokia.h \ |
2133 | + nokia/mm-sim-nokia.c \ |
2134 | + nokia/mm-sim-nokia.h \ |
2135 | + nokia/mm-broadband-modem-nokia.c \ |
2136 | + nokia/mm-broadband-modem-nokia.h |
2137 | +libmm_plugin_nokia_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2138 | +libmm_plugin_nokia_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2139 | + |
2140 | +# Nokia (Icera) |
2141 | +libmm_plugin_nokia_icera_la_SOURCES = \ |
2142 | + nokia/mm-plugin-nokia-icera.c \ |
2143 | + nokia/mm-plugin-nokia-icera.h |
2144 | +libmm_plugin_nokia_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
2145 | +libmm_plugin_nokia_icera_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2146 | +libmm_plugin_nokia_icera_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
2147 | +udevrules_DATA += nokia/77-mm-nokia-port-types.rules |
2148 | + |
2149 | +# Zte |
2150 | +libmm_plugin_zte_la_SOURCES = \ |
2151 | + zte/mm-plugin-zte.c \ |
2152 | + zte/mm-plugin-zte.h \ |
2153 | + zte/mm-common-zte.h \ |
2154 | + zte/mm-common-zte.c \ |
2155 | + zte/mm-broadband-modem-zte.h \ |
2156 | + zte/mm-broadband-modem-zte.c \ |
2157 | + zte/mm-broadband-modem-zte-icera.h \ |
2158 | + zte/mm-broadband-modem-zte-icera.c |
2159 | +libmm_plugin_zte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
2160 | +libmm_plugin_zte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2161 | +libmm_plugin_zte_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
2162 | +udevrules_DATA += zte/77-mm-zte-port-types.rules |
2163 | + |
2164 | +# Longcheer (and rebranded dongles) |
2165 | +libmm_plugin_longcheer_la_SOURCES = \ |
2166 | + longcheer/mm-plugin-longcheer.c \ |
2167 | + longcheer/mm-plugin-longcheer.h \ |
2168 | + longcheer/mm-broadband-modem-longcheer.h \ |
2169 | + longcheer/mm-broadband-modem-longcheer.c |
2170 | +libmm_plugin_longcheer_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2171 | +libmm_plugin_longcheer_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2172 | +udevrules_DATA += longcheer/77-mm-longcheer-port-types.rules |
2173 | + |
2174 | +# AnyData CDMA |
2175 | +libmm_plugin_anydata_la_SOURCES = \ |
2176 | + anydata/mm-plugin-anydata.c \ |
2177 | + anydata/mm-plugin-anydata.h \ |
2178 | + anydata/mm-broadband-modem-anydata.h \ |
2179 | + anydata/mm-broadband-modem-anydata.c |
2180 | +libmm_plugin_anydata_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2181 | +libmm_plugin_anydata_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2182 | + |
2183 | +# Linktop CDMA |
2184 | +libmm_plugin_linktop_la_SOURCES = \ |
2185 | + linktop/mm-plugin-linktop.c \ |
2186 | + linktop/mm-plugin-linktop.h \ |
2187 | + linktop/mm-broadband-modem-linktop.h \ |
2188 | + linktop/mm-broadband-modem-linktop.c |
2189 | +libmm_plugin_linktop_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2190 | +libmm_plugin_linktop_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2191 | + |
2192 | +# SimTech |
2193 | +libmm_plugin_simtech_la_SOURCES = \ |
2194 | + simtech/mm-plugin-simtech.c \ |
2195 | + simtech/mm-plugin-simtech.h \ |
2196 | + simtech/mm-broadband-modem-simtech.h \ |
2197 | + simtech/mm-broadband-modem-simtech.c |
2198 | +libmm_plugin_simtech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2199 | +libmm_plugin_simtech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2200 | +udevrules_DATA += simtech/77-mm-simtech-port-types.rules |
2201 | + |
2202 | +# Alcatel/TCT/JRD x220D and possibly others |
2203 | +libmm_plugin_x22x_la_SOURCES = \ |
2204 | + x22x/mm-plugin-x22x.c \ |
2205 | + x22x/mm-plugin-x22x.h \ |
2206 | + x22x/mm-broadband-modem-x22x.h \ |
2207 | + x22x/mm-broadband-modem-x22x.c |
2208 | +libmm_plugin_x22x_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2209 | +libmm_plugin_x22x_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2210 | +udevrules_DATA += x22x/77-mm-x22x-port-types.rules |
2211 | + |
2212 | +# Pantech |
2213 | +libmm_plugin_pantech_la_SOURCES = \ |
2214 | + pantech/mm-plugin-pantech.c \ |
2215 | + pantech/mm-plugin-pantech.h \ |
2216 | + pantech/mm-sim-pantech.c \ |
2217 | + pantech/mm-sim-pantech.h \ |
2218 | + pantech/mm-broadband-modem-pantech.c \ |
2219 | + pantech/mm-broadband-modem-pantech.h |
2220 | +libmm_plugin_pantech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2221 | +libmm_plugin_pantech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2222 | + |
2223 | +# Samsung modem |
2224 | +libmm_plugin_samsung_la_SOURCES = \ |
2225 | + samsung/mm-plugin-samsung.c \ |
2226 | + samsung/mm-plugin-samsung.h \ |
2227 | + samsung/mm-broadband-modem-samsung.c \ |
2228 | + samsung/mm-broadband-modem-samsung.h |
2229 | +libmm_plugin_samsung_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
2230 | +libmm_plugin_samsung_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2231 | +libmm_plugin_samsung_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
2232 | + |
2233 | +# Cinterion (previously Siemens) modem |
2234 | +libmm_plugin_cinterion_la_SOURCES = \ |
2235 | + cinterion/mm-plugin-cinterion.c \ |
2236 | + cinterion/mm-plugin-cinterion.h \ |
2237 | + cinterion/mm-broadband-modem-cinterion.c \ |
2238 | + cinterion/mm-broadband-modem-cinterion.h |
2239 | +libmm_plugin_cinterion_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2240 | +libmm_plugin_cinterion_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2241 | + |
2242 | +# Iridium modem |
2243 | +libmm_plugin_iridium_la_SOURCES = \ |
2244 | + iridium/mm-plugin-iridium.c \ |
2245 | + iridium/mm-plugin-iridium.h \ |
2246 | + iridium/mm-broadband-modem-iridium.c \ |
2247 | + iridium/mm-broadband-modem-iridium.h \ |
2248 | + iridium/mm-bearer-iridium.c \ |
2249 | + iridium/mm-bearer-iridium.h \ |
2250 | + iridium/mm-sim-iridium.c \ |
2251 | + iridium/mm-sim-iridium.h |
2252 | +libmm_plugin_iridium_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2253 | +libmm_plugin_iridium_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2254 | + |
2255 | +# Novatel LTE modem |
2256 | +libmm_plugin_novatel_lte_la_SOURCES = \ |
2257 | + novatel/mm-plugin-novatel-lte.c \ |
2258 | + novatel/mm-plugin-novatel-lte.h \ |
2259 | + novatel/mm-broadband-modem-novatel-lte.c \ |
2260 | + novatel/mm-broadband-modem-novatel-lte.h \ |
2261 | + novatel/mm-broadband-bearer-novatel-lte.c \ |
2262 | + novatel/mm-broadband-bearer-novatel-lte.h \ |
2263 | + novatel/mm-sim-novatel-lte.c \ |
2264 | + novatel/mm-sim-novatel-lte.h |
2265 | +libmm_plugin_novatel_lte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2266 | +libmm_plugin_novatel_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2267 | + |
2268 | +# Novatel non-LTE modem |
2269 | +libmm_plugin_novatel_la_SOURCES = \ |
2270 | + novatel/mm-plugin-novatel.c \ |
2271 | + novatel/mm-plugin-novatel.h \ |
2272 | + novatel/mm-broadband-modem-novatel.c \ |
2273 | + novatel/mm-broadband-modem-novatel.h |
2274 | +libmm_plugin_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2275 | +libmm_plugin_novatel_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2276 | + |
2277 | +# Altair LTE modem |
2278 | +libmm_plugin_altair_lte_la_SOURCES = \ |
2279 | + altair/mm-plugin-altair-lte.c \ |
2280 | + altair/mm-plugin-altair-lte.h \ |
2281 | + altair/mm-broadband-modem-altair-lte.c \ |
2282 | + altair/mm-broadband-modem-altair-lte.h \ |
2283 | + altair/mm-broadband-bearer-altair-lte.c \ |
2284 | + altair/mm-broadband-bearer-altair-lte.h |
2285 | +libmm_plugin_altair_lte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2286 | +libmm_plugin_altair_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2287 | + |
2288 | +# VIA modem |
2289 | +libmm_plugin_via_la_SOURCES = \ |
2290 | + via/mm-plugin-via.c \ |
2291 | + via/mm-plugin-via.h \ |
2292 | + via/mm-broadband-modem-via.c \ |
2293 | + via/mm-broadband-modem-via.h |
2294 | +libmm_plugin_via_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2295 | +libmm_plugin_via_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2296 | + |
2297 | +# Telit modem |
2298 | +libmm_plugin_telit_la_SOURCES = \ |
2299 | + telit/mm-plugin-telit.c \ |
2300 | + telit/mm-plugin-telit.h \ |
2301 | + telit/mm-broadband-modem-telit.c \ |
2302 | + telit/mm-broadband-modem-telit.h |
2303 | +libmm_plugin_telit_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2304 | +libmm_plugin_telit_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2305 | + |
2306 | + |
2307 | +# Additional files to include in the distribution |
2308 | +EXTRA_DIST += \ |
2309 | + $(udevrules_DATA) |
2310 | + |
2311 | +# Unit tests |
2312 | +TEST_PROGS += $(noinst_PROGRAMS) |
2313 | |
2314 | === added directory '.pc/novatel-custom-init.patch/plugins/novatel' |
2315 | === added file '.pc/novatel-custom-init.patch/plugins/novatel/mm-common-novatel.c' |
2316 | === added file '.pc/novatel-custom-init.patch/plugins/novatel/mm-common-novatel.h' |
2317 | === added file '.pc/novatel-custom-init.patch/plugins/novatel/mm-plugin-novatel.c' |
2318 | --- .pc/novatel-custom-init.patch/plugins/novatel/mm-plugin-novatel.c 1970-01-01 00:00:00 +0000 |
2319 | +++ .pc/novatel-custom-init.patch/plugins/novatel/mm-plugin-novatel.c 2015-09-25 10:05:24 +0000 |
2320 | @@ -0,0 +1,259 @@ |
2321 | +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2322 | + |
2323 | +/* |
2324 | + * This program is free software; you can redistribute it and/or |
2325 | + * modify it under the terms of the GNU General Public License as |
2326 | + * published by the Free Software Foundation; either version 2 of the |
2327 | + * License, or (at your option) any later version. |
2328 | + * |
2329 | + * This program is distributed in the hope that it will be useful, |
2330 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2331 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2332 | + * General Public License for more details. |
2333 | + * |
2334 | + * You should have received a copy of the GNU General Public |
2335 | + * License along with this program; if not, write to the |
2336 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
2337 | + * Boston, MA 02111-1307, USA. |
2338 | + * |
2339 | + * Copyright (C) 2008 - 2009 Novell, Inc. |
2340 | + * Copyright (C) 2009 - 2012 Red Hat, Inc. |
2341 | + * Copyright (C) 2012 Aleksander Morgado <aleksander@gnu.org> |
2342 | + */ |
2343 | + |
2344 | +#include <string.h> |
2345 | +#include <gmodule.h> |
2346 | + |
2347 | +#define _LIBMM_INSIDE_MM |
2348 | +#include <libmm-glib.h> |
2349 | + |
2350 | +#include "mm-plugin-novatel.h" |
2351 | +#include "mm-private-boxed-types.h" |
2352 | +#include "mm-broadband-modem-novatel.h" |
2353 | +#include "mm-log.h" |
2354 | + |
2355 | +#if defined WITH_QMI |
2356 | +#include "mm-broadband-modem-qmi.h" |
2357 | +#endif |
2358 | + |
2359 | +G_DEFINE_TYPE (MMPluginNovatel, mm_plugin_novatel, MM_TYPE_PLUGIN) |
2360 | + |
2361 | +int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION; |
2362 | +int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; |
2363 | + |
2364 | +/*****************************************************************************/ |
2365 | +/* Custom commands for AT probing */ |
2366 | + |
2367 | +/* We need to explicitly flip secondary ports to AT mode. |
2368 | + * We also use this command also for checking AT support in the current port. |
2369 | + */ |
2370 | +static const MMPortProbeAtCommand custom_at_probe[] = { |
2371 | + { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, |
2372 | + { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, |
2373 | + { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, |
2374 | + { NULL } |
2375 | +}; |
2376 | + |
2377 | +/*****************************************************************************/ |
2378 | +/* Custom init */ |
2379 | + |
2380 | +typedef struct { |
2381 | + MMPortProbe *probe; |
2382 | + MMAtSerialPort *port; |
2383 | + GCancellable *cancellable; |
2384 | + GSimpleAsyncResult *result; |
2385 | + guint nwdmat_retries; |
2386 | + guint wait_time; |
2387 | +} CustomInitContext; |
2388 | + |
2389 | +static void |
2390 | +custom_init_context_complete_and_free (CustomInitContext *ctx) |
2391 | +{ |
2392 | + g_simple_async_result_complete_in_idle (ctx->result); |
2393 | + |
2394 | + if (ctx->cancellable) |
2395 | + g_object_unref (ctx->cancellable); |
2396 | + g_object_unref (ctx->port); |
2397 | + g_object_unref (ctx->probe); |
2398 | + g_object_unref (ctx->result); |
2399 | + g_slice_free (CustomInitContext, ctx); |
2400 | +} |
2401 | + |
2402 | +static gboolean |
2403 | +novatel_custom_init_finish (MMPortProbe *probe, |
2404 | + GAsyncResult *result, |
2405 | + GError **error) |
2406 | +{ |
2407 | + return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error); |
2408 | +} |
2409 | + |
2410 | +static void custom_init_step (CustomInitContext *ctx); |
2411 | + |
2412 | +static void |
2413 | +nwdmat_ready (MMAtSerialPort *port, |
2414 | + GString *response, |
2415 | + GError *error, |
2416 | + CustomInitContext *ctx) |
2417 | +{ |
2418 | + if (error) { |
2419 | + if (g_error_matches (error, |
2420 | + MM_SERIAL_ERROR, |
2421 | + MM_SERIAL_ERROR_RESPONSE_TIMEOUT)) { |
2422 | + custom_init_step (ctx); |
2423 | + return; |
2424 | + } |
2425 | + |
2426 | + mm_dbg ("(Novatel) Error flipping secondary ports to AT mode: %s", error->message); |
2427 | + } |
2428 | + |
2429 | + /* Finish custom_init */ |
2430 | + g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
2431 | + custom_init_context_complete_and_free (ctx); |
2432 | +} |
2433 | + |
2434 | +static gboolean |
2435 | +custom_init_wait_cb (CustomInitContext *ctx) |
2436 | +{ |
2437 | + custom_init_step (ctx); |
2438 | + return FALSE; |
2439 | +} |
2440 | + |
2441 | +static void |
2442 | +custom_init_step (CustomInitContext *ctx) |
2443 | +{ |
2444 | + /* If cancelled, end */ |
2445 | + if (g_cancellable_is_cancelled (ctx->cancellable)) { |
2446 | + mm_dbg ("(Novatel) no need to keep on running custom init in (%s)", |
2447 | + mm_port_get_device (MM_PORT (ctx->port))); |
2448 | + g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
2449 | + custom_init_context_complete_and_free (ctx); |
2450 | + return; |
2451 | + } |
2452 | + |
2453 | + /* If device has a QMI port, don't run $NWDMAT */ |
2454 | + if (mm_port_probe_list_has_qmi_port (mm_device_peek_port_probe_list (mm_port_probe_peek_device (ctx->probe)))) { |
2455 | + mm_dbg ("(Novatel) no need to run custom init in (%s): device has QMI port", |
2456 | + mm_port_get_device (MM_PORT (ctx->port))); |
2457 | + g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
2458 | + custom_init_context_complete_and_free (ctx); |
2459 | + return; |
2460 | + } |
2461 | + |
2462 | + if (ctx->wait_time > 0) { |
2463 | + ctx->wait_time--; |
2464 | + g_timeout_add_seconds (1, (GSourceFunc)custom_init_wait_cb, ctx); |
2465 | + return; |
2466 | + } |
2467 | + |
2468 | + if (ctx->nwdmat_retries > 0) { |
2469 | + ctx->nwdmat_retries--; |
2470 | + mm_at_serial_port_queue_command (ctx->port, |
2471 | + "$NWDMAT=1", |
2472 | + 3, |
2473 | + FALSE, /* raw */ |
2474 | + ctx->cancellable, |
2475 | + (MMAtSerialResponseFn)nwdmat_ready, |
2476 | + ctx); |
2477 | + return; |
2478 | + } |
2479 | + |
2480 | + /* Finish custom_init */ |
2481 | + mm_dbg ("(Novatel) couldn't flip secondary port to AT in (%s): all retries consumed", |
2482 | + mm_port_get_device (MM_PORT (ctx->port))); |
2483 | + g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
2484 | + custom_init_context_complete_and_free (ctx); |
2485 | +} |
2486 | + |
2487 | +static void |
2488 | +novatel_custom_init (MMPortProbe *probe, |
2489 | + MMAtSerialPort *port, |
2490 | + GCancellable *cancellable, |
2491 | + GAsyncReadyCallback callback, |
2492 | + gpointer user_data) |
2493 | +{ |
2494 | + CustomInitContext *ctx; |
2495 | + |
2496 | + ctx = g_slice_new (CustomInitContext); |
2497 | + ctx->result = g_simple_async_result_new (G_OBJECT (probe), |
2498 | + callback, |
2499 | + user_data, |
2500 | + novatel_custom_init); |
2501 | + ctx->probe = g_object_ref (probe); |
2502 | + ctx->port = g_object_ref (port); |
2503 | + ctx->cancellable = cancellable ? g_object_ref (cancellable) : NULL; |
2504 | + ctx->nwdmat_retries = 3; |
2505 | + ctx->wait_time = 2; |
2506 | + |
2507 | + custom_init_step (ctx); |
2508 | +} |
2509 | + |
2510 | +/*****************************************************************************/ |
2511 | + |
2512 | +static MMBaseModem * |
2513 | +create_modem (MMPlugin *self, |
2514 | + const gchar *sysfs_path, |
2515 | + const gchar **drivers, |
2516 | + guint16 vendor, |
2517 | + guint16 product, |
2518 | + GList *probes, |
2519 | + GError **error) |
2520 | +{ |
2521 | +#if defined WITH_QMI |
2522 | + if (mm_port_probe_list_has_qmi_port (probes)) { |
2523 | + mm_dbg ("QMI-powered Novatel modem found..."); |
2524 | + return MM_BASE_MODEM (mm_broadband_modem_qmi_new (sysfs_path, |
2525 | + drivers, |
2526 | + mm_plugin_get_name (self), |
2527 | + vendor, |
2528 | + product)); |
2529 | + } |
2530 | +#endif |
2531 | + |
2532 | + return MM_BASE_MODEM (mm_broadband_modem_novatel_new (sysfs_path, |
2533 | + drivers, |
2534 | + mm_plugin_get_name (self), |
2535 | + vendor, |
2536 | + product)); |
2537 | +} |
2538 | + |
2539 | +/*****************************************************************************/ |
2540 | + |
2541 | +G_MODULE_EXPORT MMPlugin * |
2542 | +mm_plugin_create (void) |
2543 | +{ |
2544 | + static const gchar *subsystems[] = { "tty", "net", "usb", NULL }; |
2545 | + static const guint16 vendors[] = { 0x1410, /* Novatel */ |
2546 | + 0x413c, /* Dell */ |
2547 | + 0 }; |
2548 | + static const mm_uint16_pair forbidden_products[] = { { 0x1410, 0x9010 }, /* Novatel E362 */ |
2549 | + { 0, 0 } }; |
2550 | + static const MMAsyncMethod custom_init = { |
2551 | + .async = G_CALLBACK (novatel_custom_init), |
2552 | + .finish = G_CALLBACK (novatel_custom_init_finish), |
2553 | + }; |
2554 | + |
2555 | + return MM_PLUGIN ( |
2556 | + g_object_new (MM_TYPE_PLUGIN_NOVATEL, |
2557 | + MM_PLUGIN_NAME, "Novatel", |
2558 | + MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems, |
2559 | + MM_PLUGIN_ALLOWED_VENDOR_IDS, vendors, |
2560 | + MM_PLUGIN_FORBIDDEN_PRODUCT_IDS, forbidden_products, |
2561 | + MM_PLUGIN_ALLOWED_AT, TRUE, |
2562 | + MM_PLUGIN_CUSTOM_INIT, &custom_init, |
2563 | + MM_PLUGIN_ALLOWED_QCDM, TRUE, |
2564 | + MM_PLUGIN_ALLOWED_QMI, TRUE, |
2565 | + NULL)); |
2566 | +} |
2567 | + |
2568 | +static void |
2569 | +mm_plugin_novatel_init (MMPluginNovatel *self) |
2570 | +{ |
2571 | +} |
2572 | + |
2573 | +static void |
2574 | +mm_plugin_novatel_class_init (MMPluginNovatelClass *klass) |
2575 | +{ |
2576 | + MMPluginClass *plugin_class = MM_PLUGIN_CLASS (klass); |
2577 | + |
2578 | + plugin_class->create_modem = create_modem; |
2579 | +} |
2580 | |
2581 | === added directory '.pc/sierra-common-library.patch' |
2582 | === added directory '.pc/sierra-common-library.patch/plugins' |
2583 | === added file '.pc/sierra-common-library.patch/plugins/Makefile.am' |
2584 | --- .pc/sierra-common-library.patch/plugins/Makefile.am 1970-01-01 00:00:00 +0000 |
2585 | +++ .pc/sierra-common-library.patch/plugins/Makefile.am 2015-09-25 10:05:24 +0000 |
2586 | @@ -0,0 +1,391 @@ |
2587 | +include $(top_srcdir)/gtester.make |
2588 | + |
2589 | +# Common CPPFLAGS and LDFLAGS |
2590 | + |
2591 | +PLUGIN_COMMON_COMPILER_FLAGS = \ |
2592 | + $(MM_CFLAGS) \ |
2593 | + $(GUDEV_CFLAGS) \ |
2594 | + -I$(top_srcdir) \ |
2595 | + -I$(top_srcdir)/src \ |
2596 | + -I$(top_builddir)/src \ |
2597 | + -I$(top_srcdir)/include \ |
2598 | + -I$(top_builddir)/include \ |
2599 | + -I$(top_srcdir)/libmm-glib \ |
2600 | + -I$(top_srcdir)/libmm-glib/generated \ |
2601 | + -I$(top_builddir)/libmm-glib/generated |
2602 | + |
2603 | +PLUGIN_COMMON_LINKER_FLAGS = \ |
2604 | + $(GUDEV_LDFLAGS) \ |
2605 | + -module \ |
2606 | + -avoid-version |
2607 | + |
2608 | +if WITH_QMI |
2609 | +PLUGIN_COMMON_COMPILER_FLAGS += $(QMI_CFLAGS) |
2610 | +endif |
2611 | + |
2612 | +if WITH_MBIM |
2613 | +PLUGIN_COMMON_COMPILER_FLAGS += $(MBIM_CFLAGS) |
2614 | +endif |
2615 | + |
2616 | +# UDev rules |
2617 | +udevrulesdir = $(UDEV_BASE_DIR)/rules.d |
2618 | +udevrules_DATA = |
2619 | + |
2620 | +# Unit tests |
2621 | +noinst_PROGRAMS = |
2622 | + |
2623 | +######################################## |
2624 | + |
2625 | +# Icera-specific support |
2626 | +noinst_LTLIBRARIES = libmm-utils-icera.la |
2627 | +libmm_utils_icera_la_SOURCES = \ |
2628 | + icera/mm-broadband-modem-icera.h \ |
2629 | + icera/mm-broadband-modem-icera.c \ |
2630 | + icera/mm-broadband-bearer-icera.h \ |
2631 | + icera/mm-broadband-bearer-icera.c |
2632 | +libmm_utils_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2633 | +libmm_utils_icera_la_LIBADD = $(GUDEV_LDFLAGS) |
2634 | + |
2635 | +ICERA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/icera |
2636 | +ICERA_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-icera.la |
2637 | + |
2638 | +######################################## |
2639 | + |
2640 | +pkglib_LTLIBRARIES = \ |
2641 | + libmm-plugin-generic.la \ |
2642 | + libmm-plugin-nokia.la \ |
2643 | + libmm-plugin-nokia-icera.la \ |
2644 | + libmm-plugin-cinterion.la \ |
2645 | + libmm-plugin-iridium.la \ |
2646 | + libmm-plugin-gobi.la \ |
2647 | + libmm-plugin-motorola.la \ |
2648 | + libmm-plugin-novatel.la \ |
2649 | + libmm-plugin-novatel-lte.la \ |
2650 | + libmm-plugin-altair-lte.la \ |
2651 | + libmm-plugin-samsung.la \ |
2652 | + libmm-plugin-option.la \ |
2653 | + libmm-plugin-hso.la \ |
2654 | + libmm-plugin-anydata.la \ |
2655 | + libmm-plugin-linktop.la \ |
2656 | + libmm-plugin-simtech.la \ |
2657 | + libmm-plugin-wavecom.la \ |
2658 | + libmm-plugin-huawei.la \ |
2659 | + libmm-plugin-longcheer.la \ |
2660 | + libmm-plugin-x22x.la \ |
2661 | + libmm-plugin-pantech.la \ |
2662 | + libmm-plugin-zte.la \ |
2663 | + libmm-plugin-sierra.la \ |
2664 | + libmm-plugin-mbm.la \ |
2665 | + libmm-plugin-via.la \ |
2666 | + libmm-plugin-telit.la |
2667 | + |
2668 | +# Generic |
2669 | +libmm_plugin_generic_la_SOURCES = \ |
2670 | + generic/mm-plugin-generic.c \ |
2671 | + generic/mm-plugin-generic.h |
2672 | +libmm_plugin_generic_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2673 | +libmm_plugin_generic_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2674 | + |
2675 | +## Motorola |
2676 | +libmm_plugin_motorola_la_SOURCES = \ |
2677 | + motorola/mm-plugin-motorola.c \ |
2678 | + motorola/mm-plugin-motorola.h \ |
2679 | + motorola/mm-broadband-modem-motorola.c \ |
2680 | + motorola/mm-broadband-modem-motorola.h |
2681 | +libmm_plugin_motorola_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2682 | +libmm_plugin_motorola_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2683 | + |
2684 | +# Gobi |
2685 | +libmm_plugin_gobi_la_SOURCES = \ |
2686 | + gobi/mm-plugin-gobi.c \ |
2687 | + gobi/mm-plugin-gobi.h \ |
2688 | + gobi/mm-broadband-modem-gobi.c \ |
2689 | + gobi/mm-broadband-modem-gobi.h |
2690 | +libmm_plugin_gobi_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2691 | +libmm_plugin_gobi_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2692 | + |
2693 | +# Huawei |
2694 | +libmm_plugin_huawei_la_SOURCES = \ |
2695 | + huawei/mm-plugin-huawei.c \ |
2696 | + huawei/mm-plugin-huawei.h \ |
2697 | + huawei/mm-modem-helpers-huawei.c \ |
2698 | + huawei/mm-modem-helpers-huawei.h \ |
2699 | + huawei/mm-broadband-modem-huawei.c \ |
2700 | + huawei/mm-broadband-modem-huawei.h \ |
2701 | + huawei/mm-broadband-bearer-huawei.c \ |
2702 | + huawei/mm-broadband-bearer-huawei.h |
2703 | +libmm_plugin_huawei_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2704 | +libmm_plugin_huawei_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2705 | + |
2706 | +udevrules_DATA += huawei/77-mm-huawei-net-port-types.rules |
2707 | + |
2708 | +noinst_PROGRAMS += test-modem-helpers-huawei |
2709 | +test_modem_helpers_huawei_SOURCES = \ |
2710 | + huawei/mm-modem-helpers-huawei.c \ |
2711 | + huawei/mm-modem-helpers-huawei.h \ |
2712 | + huawei/tests/test-modem-helpers-huawei.c |
2713 | +test_modem_helpers_huawei_CPPFLAGS = \ |
2714 | + -I$(top_srcdir)/plugins/huawei \ |
2715 | + $(PLUGIN_COMMON_COMPILER_FLAGS) |
2716 | +test_modem_helpers_huawei_LDFLAGS = $(MM_LIBS) $(top_builddir)/libmm-glib/libmm-glib.la |
2717 | + |
2718 | + |
2719 | +# MBM |
2720 | +libmm_plugin_mbm_la_SOURCES = \ |
2721 | + mbm/mm-plugin-mbm.c \ |
2722 | + mbm/mm-plugin-mbm.h \ |
2723 | + mbm/mm-broadband-modem-mbm.c \ |
2724 | + mbm/mm-broadband-modem-mbm.h \ |
2725 | + mbm/mm-broadband-bearer-mbm.c \ |
2726 | + mbm/mm-broadband-bearer-mbm.h \ |
2727 | + mbm/mm-sim-mbm.c \ |
2728 | + mbm/mm-sim-mbm.h |
2729 | +libmm_plugin_mbm_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2730 | +libmm_plugin_mbm_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2731 | +udevrules_DATA += mbm/77-mm-ericsson-mbm.rules |
2732 | + |
2733 | +# Option |
2734 | +libmm_plugin_option_la_SOURCES = \ |
2735 | + option/mm-plugin-option.c \ |
2736 | + option/mm-plugin-option.h \ |
2737 | + option/mm-broadband-modem-option.c \ |
2738 | + option/mm-broadband-modem-option.h |
2739 | +libmm_plugin_option_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2740 | +libmm_plugin_option_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2741 | + |
2742 | +# HSO |
2743 | +libmm_plugin_hso_la_SOURCES = \ |
2744 | + option/mm-plugin-hso.c \ |
2745 | + option/mm-plugin-hso.h \ |
2746 | + option/mm-broadband-modem-option.c \ |
2747 | + option/mm-broadband-modem-option.h \ |
2748 | + option/mm-broadband-bearer-hso.c \ |
2749 | + option/mm-broadband-bearer-hso.h \ |
2750 | + option/mm-broadband-modem-hso.c \ |
2751 | + option/mm-broadband-modem-hso.h |
2752 | +libmm_plugin_hso_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2753 | +libmm_plugin_hso_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2754 | + |
2755 | +# Sierra |
2756 | +libmm_plugin_sierra_la_SOURCES = \ |
2757 | + sierra/mm-plugin-sierra.c \ |
2758 | + sierra/mm-plugin-sierra.h \ |
2759 | + sierra/mm-common-sierra.c \ |
2760 | + sierra/mm-common-sierra.h \ |
2761 | + sierra/mm-sim-sierra.c \ |
2762 | + sierra/mm-sim-sierra.h \ |
2763 | + sierra/mm-broadband-bearer-sierra.c \ |
2764 | + sierra/mm-broadband-bearer-sierra.h \ |
2765 | + sierra/mm-broadband-modem-sierra.c \ |
2766 | + sierra/mm-broadband-modem-sierra.h \ |
2767 | + sierra/mm-broadband-modem-sierra-icera.c \ |
2768 | + sierra/mm-broadband-modem-sierra-icera.h |
2769 | +libmm_plugin_sierra_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
2770 | +libmm_plugin_sierra_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2771 | +libmm_plugin_sierra_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
2772 | + |
2773 | +# Wavecom (Sierra Airlink) |
2774 | +libmm_plugin_wavecom_la_SOURCES = \ |
2775 | + wavecom/mm-plugin-wavecom.c \ |
2776 | + wavecom/mm-plugin-wavecom.h \ |
2777 | + wavecom/mm-broadband-modem-wavecom.c \ |
2778 | + wavecom/mm-broadband-modem-wavecom.h |
2779 | +libmm_plugin_wavecom_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2780 | +libmm_plugin_wavecom_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2781 | + |
2782 | +# Nokia |
2783 | +libmm_plugin_nokia_la_SOURCES = \ |
2784 | + nokia/mm-plugin-nokia.c \ |
2785 | + nokia/mm-plugin-nokia.h \ |
2786 | + nokia/mm-sim-nokia.c \ |
2787 | + nokia/mm-sim-nokia.h \ |
2788 | + nokia/mm-broadband-modem-nokia.c \ |
2789 | + nokia/mm-broadband-modem-nokia.h |
2790 | +libmm_plugin_nokia_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2791 | +libmm_plugin_nokia_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2792 | + |
2793 | +# Nokia (Icera) |
2794 | +libmm_plugin_nokia_icera_la_SOURCES = \ |
2795 | + nokia/mm-plugin-nokia-icera.c \ |
2796 | + nokia/mm-plugin-nokia-icera.h |
2797 | +libmm_plugin_nokia_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
2798 | +libmm_plugin_nokia_icera_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2799 | +libmm_plugin_nokia_icera_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
2800 | +udevrules_DATA += nokia/77-mm-nokia-port-types.rules |
2801 | + |
2802 | +# Zte |
2803 | +libmm_plugin_zte_la_SOURCES = \ |
2804 | + zte/mm-plugin-zte.c \ |
2805 | + zte/mm-plugin-zte.h \ |
2806 | + zte/mm-common-zte.h \ |
2807 | + zte/mm-common-zte.c \ |
2808 | + zte/mm-broadband-modem-zte.h \ |
2809 | + zte/mm-broadband-modem-zte.c \ |
2810 | + zte/mm-broadband-modem-zte-icera.h \ |
2811 | + zte/mm-broadband-modem-zte-icera.c |
2812 | +libmm_plugin_zte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
2813 | +libmm_plugin_zte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2814 | +libmm_plugin_zte_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
2815 | +udevrules_DATA += zte/77-mm-zte-port-types.rules |
2816 | + |
2817 | +# Longcheer (and rebranded dongles) |
2818 | +libmm_plugin_longcheer_la_SOURCES = \ |
2819 | + longcheer/mm-plugin-longcheer.c \ |
2820 | + longcheer/mm-plugin-longcheer.h \ |
2821 | + longcheer/mm-broadband-modem-longcheer.h \ |
2822 | + longcheer/mm-broadband-modem-longcheer.c |
2823 | +libmm_plugin_longcheer_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2824 | +libmm_plugin_longcheer_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2825 | +udevrules_DATA += longcheer/77-mm-longcheer-port-types.rules |
2826 | + |
2827 | +# AnyData CDMA |
2828 | +libmm_plugin_anydata_la_SOURCES = \ |
2829 | + anydata/mm-plugin-anydata.c \ |
2830 | + anydata/mm-plugin-anydata.h \ |
2831 | + anydata/mm-broadband-modem-anydata.h \ |
2832 | + anydata/mm-broadband-modem-anydata.c |
2833 | +libmm_plugin_anydata_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2834 | +libmm_plugin_anydata_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2835 | + |
2836 | +# Linktop CDMA |
2837 | +libmm_plugin_linktop_la_SOURCES = \ |
2838 | + linktop/mm-plugin-linktop.c \ |
2839 | + linktop/mm-plugin-linktop.h \ |
2840 | + linktop/mm-broadband-modem-linktop.h \ |
2841 | + linktop/mm-broadband-modem-linktop.c |
2842 | +libmm_plugin_linktop_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2843 | +libmm_plugin_linktop_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2844 | + |
2845 | +# SimTech |
2846 | +libmm_plugin_simtech_la_SOURCES = \ |
2847 | + simtech/mm-plugin-simtech.c \ |
2848 | + simtech/mm-plugin-simtech.h \ |
2849 | + simtech/mm-broadband-modem-simtech.h \ |
2850 | + simtech/mm-broadband-modem-simtech.c |
2851 | +libmm_plugin_simtech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2852 | +libmm_plugin_simtech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2853 | +udevrules_DATA += simtech/77-mm-simtech-port-types.rules |
2854 | + |
2855 | +# Alcatel/TCT/JRD x220D and possibly others |
2856 | +libmm_plugin_x22x_la_SOURCES = \ |
2857 | + x22x/mm-plugin-x22x.c \ |
2858 | + x22x/mm-plugin-x22x.h \ |
2859 | + x22x/mm-broadband-modem-x22x.h \ |
2860 | + x22x/mm-broadband-modem-x22x.c |
2861 | +libmm_plugin_x22x_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2862 | +libmm_plugin_x22x_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2863 | +udevrules_DATA += x22x/77-mm-x22x-port-types.rules |
2864 | + |
2865 | +# Pantech |
2866 | +libmm_plugin_pantech_la_SOURCES = \ |
2867 | + pantech/mm-plugin-pantech.c \ |
2868 | + pantech/mm-plugin-pantech.h \ |
2869 | + pantech/mm-sim-pantech.c \ |
2870 | + pantech/mm-sim-pantech.h \ |
2871 | + pantech/mm-broadband-modem-pantech.c \ |
2872 | + pantech/mm-broadband-modem-pantech.h |
2873 | +libmm_plugin_pantech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2874 | +libmm_plugin_pantech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2875 | + |
2876 | +# Samsung modem |
2877 | +libmm_plugin_samsung_la_SOURCES = \ |
2878 | + samsung/mm-plugin-samsung.c \ |
2879 | + samsung/mm-plugin-samsung.h \ |
2880 | + samsung/mm-broadband-modem-samsung.c \ |
2881 | + samsung/mm-broadband-modem-samsung.h |
2882 | +libmm_plugin_samsung_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) |
2883 | +libmm_plugin_samsung_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2884 | +libmm_plugin_samsung_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) |
2885 | + |
2886 | +# Cinterion (previously Siemens) modem |
2887 | +libmm_plugin_cinterion_la_SOURCES = \ |
2888 | + cinterion/mm-plugin-cinterion.c \ |
2889 | + cinterion/mm-plugin-cinterion.h \ |
2890 | + cinterion/mm-broadband-modem-cinterion.c \ |
2891 | + cinterion/mm-broadband-modem-cinterion.h |
2892 | +libmm_plugin_cinterion_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2893 | +libmm_plugin_cinterion_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2894 | + |
2895 | +# Iridium modem |
2896 | +libmm_plugin_iridium_la_SOURCES = \ |
2897 | + iridium/mm-plugin-iridium.c \ |
2898 | + iridium/mm-plugin-iridium.h \ |
2899 | + iridium/mm-broadband-modem-iridium.c \ |
2900 | + iridium/mm-broadband-modem-iridium.h \ |
2901 | + iridium/mm-bearer-iridium.c \ |
2902 | + iridium/mm-bearer-iridium.h \ |
2903 | + iridium/mm-sim-iridium.c \ |
2904 | + iridium/mm-sim-iridium.h |
2905 | +libmm_plugin_iridium_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2906 | +libmm_plugin_iridium_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2907 | + |
2908 | +# Common Novatel modem support library |
2909 | +noinst_LTLIBRARIES += libmm-utils-novatel.la |
2910 | +libmm_utils_novatel_la_SOURCES = \ |
2911 | + novatel/mm-common-novatel.c \ |
2912 | + novatel/mm-common-novatel.h \ |
2913 | + novatel/mm-broadband-modem-novatel.c \ |
2914 | + novatel/mm-broadband-modem-novatel.h |
2915 | +libmm_utils_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2916 | +libmm_utils_novatel_la_LIBADD = $(GUDEV_LIBS) $(MM_LIBS) |
2917 | + |
2918 | +NOVATEL_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/novatel |
2919 | +NOVATEL_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-novatel.la |
2920 | + |
2921 | +# Novatel LTE modem |
2922 | +libmm_plugin_novatel_lte_la_SOURCES = \ |
2923 | + novatel/mm-plugin-novatel-lte.c \ |
2924 | + novatel/mm-plugin-novatel-lte.h \ |
2925 | + novatel/mm-broadband-modem-novatel-lte.c \ |
2926 | + novatel/mm-broadband-modem-novatel-lte.h \ |
2927 | + novatel/mm-broadband-bearer-novatel-lte.c \ |
2928 | + novatel/mm-broadband-bearer-novatel-lte.h \ |
2929 | + novatel/mm-sim-novatel-lte.c \ |
2930 | + novatel/mm-sim-novatel-lte.h |
2931 | +libmm_plugin_novatel_lte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2932 | +libmm_plugin_novatel_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2933 | + |
2934 | +# Novatel non-LTE modem |
2935 | +libmm_plugin_novatel_la_SOURCES = \ |
2936 | + novatel/mm-plugin-novatel.c \ |
2937 | + novatel/mm-plugin-novatel.h |
2938 | +libmm_plugin_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(NOVATEL_COMMON_COMPILER_FLAGS) |
2939 | +libmm_plugin_novatel_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2940 | +libmm_plugin_novatel_la_LIBADD = $(NOVATEL_COMMON_LIBADD_FLAGS) |
2941 | + |
2942 | +# Altair LTE modem |
2943 | +libmm_plugin_altair_lte_la_SOURCES = \ |
2944 | + altair/mm-plugin-altair-lte.c \ |
2945 | + altair/mm-plugin-altair-lte.h \ |
2946 | + altair/mm-broadband-modem-altair-lte.c \ |
2947 | + altair/mm-broadband-modem-altair-lte.h \ |
2948 | + altair/mm-broadband-bearer-altair-lte.c \ |
2949 | + altair/mm-broadband-bearer-altair-lte.h |
2950 | +libmm_plugin_altair_lte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2951 | +libmm_plugin_altair_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2952 | + |
2953 | +# VIA modem |
2954 | +libmm_plugin_via_la_SOURCES = \ |
2955 | + via/mm-plugin-via.c \ |
2956 | + via/mm-plugin-via.h \ |
2957 | + via/mm-broadband-modem-via.c \ |
2958 | + via/mm-broadband-modem-via.h |
2959 | +libmm_plugin_via_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2960 | +libmm_plugin_via_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2961 | + |
2962 | +# Telit modem |
2963 | +libmm_plugin_telit_la_SOURCES = \ |
2964 | + telit/mm-plugin-telit.c \ |
2965 | + telit/mm-plugin-telit.h \ |
2966 | + telit/mm-broadband-modem-telit.c \ |
2967 | + telit/mm-broadband-modem-telit.h |
2968 | +libmm_plugin_telit_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
2969 | +libmm_plugin_telit_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
2970 | + |
2971 | + |
2972 | +# Additional files to include in the distribution |
2973 | +EXTRA_DIST += \ |
2974 | + $(udevrules_DATA) |
2975 | + |
2976 | +# Unit tests |
2977 | +TEST_PROGS += $(noinst_PROGRAMS) |
2978 | |
2979 | === added directory '.pc/sierra-custom-init.patch' |
2980 | === added directory '.pc/sierra-custom-init.patch/plugins' |
2981 | === added directory '.pc/sierra-custom-init.patch/plugins/sierra' |
2982 | === added file '.pc/sierra-custom-init.patch/plugins/sierra/mm-common-sierra.c' |
2983 | --- .pc/sierra-custom-init.patch/plugins/sierra/mm-common-sierra.c 1970-01-01 00:00:00 +0000 |
2984 | +++ .pc/sierra-custom-init.patch/plugins/sierra/mm-common-sierra.c 2015-09-25 10:05:24 +0000 |
2985 | @@ -0,0 +1,312 @@ |
2986 | +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2987 | +/* |
2988 | + * This program is free software; you can redistribute it and/or modify |
2989 | + * it under the terms of the GNU General Public License as published by |
2990 | + * the Free Software Foundation; either version 2 of the License, or |
2991 | + * (at your option) any later version. |
2992 | + * |
2993 | + * This program is distributed in the hope that it will be useful, |
2994 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2995 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2996 | + * GNU General Public License for more details: |
2997 | + * |
2998 | + * Copyright (C) 2008 - 2009 Novell, Inc. |
2999 | + * Copyright (C) 2009 - 2012 Red Hat, Inc. |
3000 | + * Copyright (C) 2012 Lanedo GmbH |
3001 | + */ |
3002 | + |
3003 | +#include "mm-common-sierra.h" |
3004 | +#include "mm-base-modem-at.h" |
3005 | +#include "mm-log.h" |
3006 | +#include "mm-modem-helpers.h" |
3007 | +#include "mm-sim-sierra.h" |
3008 | + |
3009 | +static MMIfaceModem *iface_modem_parent; |
3010 | + |
3011 | +/*****************************************************************************/ |
3012 | +/* Modem power up (Modem interface) */ |
3013 | + |
3014 | +gboolean |
3015 | +mm_common_sierra_modem_power_up_finish (MMIfaceModem *self, |
3016 | + GAsyncResult *res, |
3017 | + GError **error) |
3018 | +{ |
3019 | + return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error); |
3020 | +} |
3021 | + |
3022 | +static gboolean |
3023 | +sierra_power_up_wait_cb (GSimpleAsyncResult *result) |
3024 | +{ |
3025 | + g_simple_async_result_set_op_res_gboolean (result, TRUE); |
3026 | + g_simple_async_result_complete (result); |
3027 | + g_object_unref (result); |
3028 | + return FALSE; |
3029 | +} |
3030 | + |
3031 | +static void |
3032 | +cfun_enable_ready (MMBaseModem *self, |
3033 | + GAsyncResult *res, |
3034 | + GSimpleAsyncResult *simple) |
3035 | +{ |
3036 | + GError *error = NULL; |
3037 | + guint i; |
3038 | + const gchar **drivers; |
3039 | + gboolean is_new_sierra = FALSE; |
3040 | + |
3041 | + if (!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error)) { |
3042 | + g_simple_async_result_take_error (simple, error); |
3043 | + g_simple_async_result_complete (simple); |
3044 | + g_object_unref (simple); |
3045 | + return; |
3046 | + } |
3047 | + |
3048 | + /* Many Sierra devices return OK immediately in response to CFUN=1 but |
3049 | + * need some time to finish powering up, otherwise subsequent commands |
3050 | + * may return failure or even crash the modem. Give more time for older |
3051 | + * devices like the AC860 and C885, which aren't driven by the 'sierra_net' |
3052 | + * driver. Assume any DirectIP (ie, sierra_net) device is new enough |
3053 | + * to allow a lower timeout. |
3054 | + */ |
3055 | + drivers = mm_base_modem_get_drivers (MM_BASE_MODEM (self)); |
3056 | + for (i = 0; drivers[i]; i++) { |
3057 | + if (g_str_equal (drivers[i], "sierra_net")) { |
3058 | + is_new_sierra = TRUE; |
3059 | + break; |
3060 | + } |
3061 | + } |
3062 | + |
3063 | + /* The modem object will be valid in the callback as 'result' keeps a |
3064 | + * reference to it. */ |
3065 | + g_timeout_add_seconds (is_new_sierra ? 5 : 10, (GSourceFunc)sierra_power_up_wait_cb, simple); |
3066 | +} |
3067 | + |
3068 | +static void |
3069 | +pcstate_enable_ready (MMBaseModem *self, |
3070 | + GAsyncResult *res, |
3071 | + GSimpleAsyncResult *simple) |
3072 | +{ |
3073 | + /* Ignore errors for now; we're not sure if all Sierra CDMA devices support |
3074 | + * at!pcstate. |
3075 | + */ |
3076 | + mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, NULL); |
3077 | + |
3078 | + g_simple_async_result_set_op_res_gboolean (simple, TRUE); |
3079 | + g_simple_async_result_complete (simple); |
3080 | + g_object_unref (simple); |
3081 | +} |
3082 | + |
3083 | +void |
3084 | +mm_common_sierra_modem_power_up (MMIfaceModem *self, |
3085 | + GAsyncReadyCallback callback, |
3086 | + gpointer user_data) |
3087 | +{ |
3088 | + GSimpleAsyncResult *result; |
3089 | + |
3090 | + result = g_simple_async_result_new (G_OBJECT (self), |
3091 | + callback, |
3092 | + user_data, |
3093 | + mm_common_sierra_modem_power_up); |
3094 | + |
3095 | + /* For CDMA modems, run !pcstate */ |
3096 | + if (mm_iface_modem_is_cdma_only (self)) { |
3097 | + mm_base_modem_at_command (MM_BASE_MODEM (self), |
3098 | + "!pcstate=1", |
3099 | + 5, |
3100 | + FALSE, |
3101 | + (GAsyncReadyCallback)pcstate_enable_ready, |
3102 | + result); |
3103 | + return; |
3104 | + } |
3105 | + |
3106 | + mm_warn ("Not in full functionality status, power-up command is needed. " |
3107 | + "Note that it may reboot the modem."); |
3108 | + |
3109 | + /* Try to go to full functionality mode without rebooting the system. |
3110 | + * Works well if we previously switched off the power with CFUN=4 |
3111 | + */ |
3112 | + mm_base_modem_at_command (MM_BASE_MODEM (self), |
3113 | + "+CFUN=1,0", /* ",0" requests no reset */ |
3114 | + 10, |
3115 | + FALSE, |
3116 | + (GAsyncReadyCallback)cfun_enable_ready, |
3117 | + result); |
3118 | +} |
3119 | + |
3120 | +/*****************************************************************************/ |
3121 | +/* Power state loading (Modem interface) */ |
3122 | + |
3123 | +MMModemPowerState |
3124 | +mm_common_sierra_load_power_state_finish (MMIfaceModem *self, |
3125 | + GAsyncResult *res, |
3126 | + GError **error) |
3127 | +{ |
3128 | + if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error)) |
3129 | + return MM_MODEM_POWER_STATE_UNKNOWN; |
3130 | + |
3131 | + return (MMModemPowerState)GPOINTER_TO_UINT (g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (res))); |
3132 | +} |
3133 | + |
3134 | +static void |
3135 | +parent_load_power_state_ready (MMIfaceModem *self, |
3136 | + GAsyncResult *res, |
3137 | + GSimpleAsyncResult *simple) |
3138 | +{ |
3139 | + GError *error = NULL; |
3140 | + MMModemPowerState state; |
3141 | + |
3142 | + state = iface_modem_parent->load_power_state_finish (self, res, &error); |
3143 | + if (error) |
3144 | + g_simple_async_result_take_error (simple, error); |
3145 | + else |
3146 | + g_simple_async_result_set_op_res_gpointer (simple, GUINT_TO_POINTER (state), NULL); |
3147 | + g_simple_async_result_complete (simple); |
3148 | + g_object_unref (simple); |
3149 | +} |
3150 | + |
3151 | +static void |
3152 | +pcstate_query_ready (MMBaseModem *self, |
3153 | + GAsyncResult *res, |
3154 | + GSimpleAsyncResult *simple) |
3155 | +{ |
3156 | + const gchar *result; |
3157 | + guint state; |
3158 | + GError *error = NULL; |
3159 | + |
3160 | + result = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error); |
3161 | + if (!result) { |
3162 | + g_simple_async_result_take_error (simple, error); |
3163 | + g_simple_async_result_complete (simple); |
3164 | + g_object_unref (simple); |
3165 | + return; |
3166 | + } |
3167 | + |
3168 | + /* Parse power state reply */ |
3169 | + result = mm_strip_tag (result, "!PCSTATE:"); |
3170 | + if (!mm_get_uint_from_str (result, &state)) { |
3171 | + g_simple_async_result_set_error (simple, |
3172 | + MM_CORE_ERROR, |
3173 | + MM_CORE_ERROR_FAILED, |
3174 | + "Failed to parse !PCSTATE response '%s'", |
3175 | + result); |
3176 | + } else { |
3177 | + switch (state) { |
3178 | + case 0: |
3179 | + g_simple_async_result_set_op_res_gpointer (simple, GUINT_TO_POINTER (MM_MODEM_POWER_STATE_OFF), NULL); |
3180 | + break; |
3181 | + case 1: |
3182 | + g_simple_async_result_set_op_res_gpointer (simple, GUINT_TO_POINTER (MM_MODEM_POWER_STATE_ON), NULL); |
3183 | + break; |
3184 | + default: |
3185 | + g_simple_async_result_set_error (simple, |
3186 | + MM_CORE_ERROR, |
3187 | + MM_CORE_ERROR_FAILED, |
3188 | + "Unhandled power state: '%u'", |
3189 | + state); |
3190 | + break; |
3191 | + } |
3192 | + } |
3193 | + |
3194 | + g_simple_async_result_complete (simple); |
3195 | + g_object_unref (simple); |
3196 | +} |
3197 | + |
3198 | +void |
3199 | +mm_common_sierra_load_power_state (MMIfaceModem *self, |
3200 | + GAsyncReadyCallback callback, |
3201 | + gpointer user_data) |
3202 | +{ |
3203 | + GSimpleAsyncResult *result; |
3204 | + |
3205 | + result = g_simple_async_result_new (G_OBJECT (self), |
3206 | + callback, |
3207 | + user_data, |
3208 | + mm_common_sierra_load_power_state); |
3209 | + |
3210 | + /* Check power state with AT!PCSTATE? */ |
3211 | + if (mm_iface_modem_is_cdma_only (self)) { |
3212 | + mm_base_modem_at_command (MM_BASE_MODEM (self), |
3213 | + "!pcstate?", |
3214 | + 3, |
3215 | + FALSE, |
3216 | + (GAsyncReadyCallback)pcstate_query_ready, |
3217 | + result); |
3218 | + return; |
3219 | + } |
3220 | + |
3221 | + /* Otherwise run parent's */ |
3222 | + iface_modem_parent->load_power_state (self, |
3223 | + (GAsyncReadyCallback)parent_load_power_state_ready, |
3224 | + result); |
3225 | +} |
3226 | + |
3227 | +/*****************************************************************************/ |
3228 | +/* Create SIM (Modem interface) */ |
3229 | + |
3230 | +MMSim * |
3231 | +mm_common_sierra_create_sim_finish (MMIfaceModem *self, |
3232 | + GAsyncResult *res, |
3233 | + GError **error) |
3234 | +{ |
3235 | + return mm_sim_sierra_new_finish (res, error); |
3236 | +} |
3237 | + |
3238 | +void |
3239 | +mm_common_sierra_create_sim (MMIfaceModem *self, |
3240 | + GAsyncReadyCallback callback, |
3241 | + gpointer user_data) |
3242 | +{ |
3243 | + /* New Sierra SIM */ |
3244 | + mm_sim_sierra_new (MM_BASE_MODEM (self), |
3245 | + NULL, /* cancellable */ |
3246 | + callback, |
3247 | + user_data); |
3248 | +} |
3249 | + |
3250 | +/*****************************************************************************/ |
3251 | +/* Setup ports */ |
3252 | + |
3253 | +void |
3254 | +mm_common_sierra_setup_ports (MMBroadbandModem *self) |
3255 | +{ |
3256 | + MMAtSerialPort *ports[2]; |
3257 | + guint i; |
3258 | + GRegex *pacsp_regex; |
3259 | + |
3260 | + pacsp_regex = g_regex_new ("\\r\\n\\+PACSP.*\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); |
3261 | + |
3262 | + ports[0] = mm_base_modem_peek_port_primary (MM_BASE_MODEM (self)); |
3263 | + ports[1] = mm_base_modem_peek_port_secondary (MM_BASE_MODEM (self)); |
3264 | + |
3265 | + for (i = 0; i < 2; i++) { |
3266 | + if (!ports[i]) |
3267 | + continue; |
3268 | + |
3269 | + g_object_set (ports[i], |
3270 | + MM_PORT_CARRIER_DETECT, FALSE, |
3271 | + NULL); |
3272 | + |
3273 | + if (i == 1) { |
3274 | + /* Built-in echo removal conflicts with the APP1 port's limited AT |
3275 | + * parser, which doesn't always prefix responses with <CR><LF>. |
3276 | + */ |
3277 | + g_object_set (ports[i], |
3278 | + MM_AT_SERIAL_PORT_REMOVE_ECHO, FALSE, |
3279 | + NULL); |
3280 | + } |
3281 | + |
3282 | + mm_at_serial_port_add_unsolicited_msg_handler ( |
3283 | + ports[i], |
3284 | + pacsp_regex, |
3285 | + NULL, NULL, NULL); |
3286 | + } |
3287 | + |
3288 | + g_regex_unref (pacsp_regex); |
3289 | +} |
3290 | + |
3291 | +/*****************************************************************************/ |
3292 | + |
3293 | +void |
3294 | +mm_common_sierra_peek_parent_interfaces (MMIfaceModem *iface) |
3295 | +{ |
3296 | + iface_modem_parent = g_type_interface_peek_parent (iface); |
3297 | +} |
3298 | |
3299 | === added file '.pc/sierra-custom-init.patch/plugins/sierra/mm-common-sierra.h' |
3300 | --- .pc/sierra-custom-init.patch/plugins/sierra/mm-common-sierra.h 1970-01-01 00:00:00 +0000 |
3301 | +++ .pc/sierra-custom-init.patch/plugins/sierra/mm-common-sierra.h 2015-09-25 10:05:24 +0000 |
3302 | @@ -0,0 +1,49 @@ |
3303 | +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
3304 | +/* |
3305 | + * This program is free software; you can redistribute it and/or modify |
3306 | + * it under the terms of the GNU General Public License as published by |
3307 | + * the Free Software Foundation; either version 2 of the License, or |
3308 | + * (at your option) any later version. |
3309 | + * |
3310 | + * This program is distributed in the hope that it will be useful, |
3311 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3312 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3313 | + * GNU General Public License for more details: |
3314 | + * |
3315 | + * Copyright (C) 2008 - 2009 Novell, Inc. |
3316 | + * Copyright (C) 2009 - 2012 Red Hat, Inc. |
3317 | + * Copyright (C) 2012 Lanedo GmbH |
3318 | + */ |
3319 | + |
3320 | +#ifndef MM_COMMON_SIERRA_H |
3321 | +#define MM_COMMON_SIERRA_H |
3322 | + |
3323 | +#include "mm-broadband-modem.h" |
3324 | +#include "mm-iface-modem.h" |
3325 | + |
3326 | +void mm_common_sierra_load_power_state (MMIfaceModem *self, |
3327 | + GAsyncReadyCallback callback, |
3328 | + gpointer user_data); |
3329 | +MMModemPowerState mm_common_sierra_load_power_state_finish (MMIfaceModem *self, |
3330 | + GAsyncResult *res, |
3331 | + GError **error); |
3332 | + |
3333 | +void mm_common_sierra_modem_power_up (MMIfaceModem *self, |
3334 | + GAsyncReadyCallback callback, |
3335 | + gpointer user_data); |
3336 | +gboolean mm_common_sierra_modem_power_up_finish (MMIfaceModem *self, |
3337 | + GAsyncResult *res, |
3338 | + GError **error); |
3339 | + |
3340 | +void mm_common_sierra_create_sim (MMIfaceModem *self, |
3341 | + GAsyncReadyCallback callback, |
3342 | + gpointer user_data); |
3343 | +MMSim *mm_common_sierra_create_sim_finish (MMIfaceModem *self, |
3344 | + GAsyncResult *res, |
3345 | + GError **error); |
3346 | + |
3347 | +void mm_common_sierra_setup_ports (MMBroadbandModem *self); |
3348 | + |
3349 | +void mm_common_sierra_peek_parent_interfaces (MMIfaceModem *iface); |
3350 | + |
3351 | +#endif /* MM_COMMON_SIERRA_H */ |
3352 | |
3353 | === added file '.pc/sierra-custom-init.patch/plugins/sierra/mm-plugin-sierra.c' |
3354 | --- .pc/sierra-custom-init.patch/plugins/sierra/mm-plugin-sierra.c 1970-01-01 00:00:00 +0000 |
3355 | +++ .pc/sierra-custom-init.patch/plugins/sierra/mm-plugin-sierra.c 2015-09-25 10:05:24 +0000 |
3356 | @@ -0,0 +1,332 @@ |
3357 | +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
3358 | +/* |
3359 | + * This program is free software; you can redistribute it and/or modify |
3360 | + * it under the terms of the GNU General Public License as published by |
3361 | + * the Free Software Foundation; either version 2 of the License, or |
3362 | + * (at your option) any later version. |
3363 | + * |
3364 | + * This program is distributed in the hope that it will be useful, |
3365 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3366 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3367 | + * GNU General Public License for more details: |
3368 | + * |
3369 | + * Copyright (C) 2008 - 2009 Novell, Inc. |
3370 | + * Copyright (C) 2009 - 2012 Red Hat, Inc. |
3371 | + * Copyright (C) 2012 Lanedo GmbH |
3372 | + */ |
3373 | + |
3374 | +#include <string.h> |
3375 | +#include <stdlib.h> |
3376 | +#include <gmodule.h> |
3377 | + |
3378 | +#define _LIBMM_INSIDE_MM |
3379 | +#include <libmm-glib.h> |
3380 | + |
3381 | +#include "mm-log.h" |
3382 | +#include "mm-plugin-sierra.h" |
3383 | +#include "mm-broadband-modem-sierra.h" |
3384 | +#include "mm-broadband-modem-sierra-icera.h" |
3385 | + |
3386 | +#if defined WITH_QMI |
3387 | +#include "mm-broadband-modem-qmi.h" |
3388 | +#endif |
3389 | + |
3390 | +#if defined WITH_MBIM |
3391 | +#include "mm-broadband-modem-mbim.h" |
3392 | +#endif |
3393 | + |
3394 | +G_DEFINE_TYPE (MMPluginSierra, mm_plugin_sierra, MM_TYPE_PLUGIN) |
3395 | + |
3396 | +int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION; |
3397 | +int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; |
3398 | + |
3399 | +/*****************************************************************************/ |
3400 | +/* Custom init */ |
3401 | + |
3402 | +#define TAG_SIERRA_APP_PORT "sierra-app-port" |
3403 | +#define TAG_SIERRA_APP1_PPP_OK "sierra-app1-ppp-ok" |
3404 | + |
3405 | +typedef struct { |
3406 | + MMPortProbe *probe; |
3407 | + MMAtSerialPort *port; |
3408 | + GCancellable *cancellable; |
3409 | + GSimpleAsyncResult *result; |
3410 | + guint retries; |
3411 | +} SierraCustomInitContext; |
3412 | + |
3413 | +static void |
3414 | +sierra_custom_init_context_complete_and_free (SierraCustomInitContext *ctx) |
3415 | +{ |
3416 | + g_simple_async_result_complete_in_idle (ctx->result); |
3417 | + |
3418 | + if (ctx->cancellable) |
3419 | + g_object_unref (ctx->cancellable); |
3420 | + g_object_unref (ctx->port); |
3421 | + g_object_unref (ctx->probe); |
3422 | + g_object_unref (ctx->result); |
3423 | + g_slice_free (SierraCustomInitContext, ctx); |
3424 | +} |
3425 | + |
3426 | +static gboolean |
3427 | +sierra_custom_init_finish (MMPortProbe *probe, |
3428 | + GAsyncResult *result, |
3429 | + GError **error) |
3430 | +{ |
3431 | + return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error); |
3432 | +} |
3433 | + |
3434 | +static void sierra_custom_init_step (SierraCustomInitContext *ctx); |
3435 | + |
3436 | +static void |
3437 | +gcap_ready (MMAtSerialPort *port, |
3438 | + GString *response, |
3439 | + GError *error, |
3440 | + SierraCustomInitContext *ctx) |
3441 | +{ |
3442 | + if (error) { |
3443 | + /* If consumed all tries and the last error was a timeout, assume the |
3444 | + * port is not AT */ |
3445 | + if (ctx->retries == 0 && |
3446 | + g_error_matches (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_RESPONSE_TIMEOUT)) { |
3447 | + mm_port_probe_set_result_at (ctx->probe, FALSE); |
3448 | + } |
3449 | + /* If reported a hard parse error, this port is definitely not an AT |
3450 | + * port, skip trying. */ |
3451 | + else if (g_error_matches (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_PARSE_FAILED)) { |
3452 | + mm_port_probe_set_result_at (ctx->probe, FALSE); |
3453 | + ctx->retries = 0; |
3454 | + } |
3455 | + /* Some Icera-based devices (eg, USB305) have an AT-style port that |
3456 | + * replies to everything with ERROR, so tag as unsupported; sometimes |
3457 | + * the real AT ports do this too, so let a retry tag the port as |
3458 | + * supported if it responds correctly later. */ |
3459 | + else if (g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN)) { |
3460 | + mm_port_probe_set_result_at (ctx->probe, FALSE); |
3461 | + } |
3462 | + |
3463 | + /* Just retry... */ |
3464 | + sierra_custom_init_step (ctx); |
3465 | + return; |
3466 | + } |
3467 | + |
3468 | + /* A valid reply to ATI tells us this is an AT port already */ |
3469 | + mm_port_probe_set_result_at (ctx->probe, TRUE); |
3470 | + |
3471 | + /* Sierra APPx ports have limited AT command parsers that just reply with |
3472 | + * "OK" to most commands. These can sometimes be used for PPP while the |
3473 | + * main port is used for status and control, but older modems tend to crash |
3474 | + * or fail PPP. So we whitelist modems that are known to allow PPP on the |
3475 | + * secondary APP ports. |
3476 | + */ |
3477 | + if (strstr (response->str, "APP1")) { |
3478 | + g_object_set_data (G_OBJECT (ctx->probe), TAG_SIERRA_APP_PORT, GUINT_TO_POINTER (TRUE)); |
3479 | + |
3480 | + /* PPP-on-APP1-port whitelist */ |
3481 | + if (strstr (response->str, "C885") || strstr (response->str, "USB 306") || strstr (response->str, "MC8790")) |
3482 | + g_object_set_data (G_OBJECT (ctx->probe), TAG_SIERRA_APP1_PPP_OK, GUINT_TO_POINTER (TRUE)); |
3483 | + |
3484 | + /* For debugging: let users figure out if their device supports PPP |
3485 | + * on the APP1 port or not. |
3486 | + */ |
3487 | + if (getenv ("MM_SIERRA_APP1_PPP_OK")) { |
3488 | + mm_dbg ("Sierra: APP1 PPP OK '%s'", response->str); |
3489 | + g_object_set_data (G_OBJECT (ctx->probe), TAG_SIERRA_APP1_PPP_OK, GUINT_TO_POINTER (TRUE)); |
3490 | + } |
3491 | + } else if (strstr (response->str, "APP2") || |
3492 | + strstr (response->str, "APP3") || |
3493 | + strstr (response->str, "APP4")) { |
3494 | + /* Additional APP ports don't support most AT commands, so they cannot |
3495 | + * be used as the primary port. |
3496 | + */ |
3497 | + g_object_set_data (G_OBJECT (ctx->probe), TAG_SIERRA_APP_PORT, GUINT_TO_POINTER (TRUE)); |
3498 | + } |
3499 | + |
3500 | + g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
3501 | + sierra_custom_init_context_complete_and_free (ctx); |
3502 | +} |
3503 | + |
3504 | +static void |
3505 | +sierra_custom_init_step (SierraCustomInitContext *ctx) |
3506 | +{ |
3507 | + /* If cancelled, end */ |
3508 | + if (g_cancellable_is_cancelled (ctx->cancellable)) { |
3509 | + mm_dbg ("(Sierra) no need to keep on running custom init in '%s'", |
3510 | + mm_port_get_device (MM_PORT (ctx->port))); |
3511 | + g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
3512 | + sierra_custom_init_context_complete_and_free (ctx); |
3513 | + return; |
3514 | + } |
3515 | + |
3516 | + if (ctx->retries == 0) { |
3517 | + mm_dbg ("(Sierra) Couldn't get port type hints from '%s'", |
3518 | + mm_port_get_device (MM_PORT (ctx->port))); |
3519 | + g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
3520 | + sierra_custom_init_context_complete_and_free (ctx); |
3521 | + return; |
3522 | + } |
3523 | + |
3524 | + ctx->retries--; |
3525 | + mm_at_serial_port_queue_command ( |
3526 | + ctx->port, |
3527 | + "ATI", |
3528 | + 3, |
3529 | + FALSE, /* raw */ |
3530 | + ctx->cancellable, |
3531 | + (MMAtSerialResponseFn)gcap_ready, |
3532 | + ctx); |
3533 | +} |
3534 | + |
3535 | +static void |
3536 | +sierra_custom_init (MMPortProbe *probe, |
3537 | + MMAtSerialPort *port, |
3538 | + GCancellable *cancellable, |
3539 | + GAsyncReadyCallback callback, |
3540 | + gpointer user_data) |
3541 | +{ |
3542 | + SierraCustomInitContext *ctx; |
3543 | + |
3544 | + ctx = g_slice_new (SierraCustomInitContext); |
3545 | + ctx->result = g_simple_async_result_new (G_OBJECT (probe), |
3546 | + callback, |
3547 | + user_data, |
3548 | + sierra_custom_init); |
3549 | + ctx->probe = g_object_ref (probe); |
3550 | + ctx->port = g_object_ref (port); |
3551 | + ctx->cancellable = cancellable ? g_object_ref (cancellable) : NULL; |
3552 | + ctx->retries = 3; |
3553 | + |
3554 | + sierra_custom_init_step (ctx); |
3555 | +} |
3556 | + |
3557 | +/*****************************************************************************/ |
3558 | + |
3559 | +static gboolean |
3560 | +sierra_port_probe_list_is_icera (GList *probes) |
3561 | +{ |
3562 | + GList *l; |
3563 | + |
3564 | + for (l = probes; l; l = g_list_next (l)) { |
3565 | + /* Only assume the Icera probing check is valid IF the port is not |
3566 | + * secondary. This will skip the stupid ports which reply OK to every |
3567 | + * AT command, even the one we use to check for Icera support */ |
3568 | + if (mm_port_probe_is_icera (MM_PORT_PROBE (l->data)) && |
3569 | + !g_object_get_data (G_OBJECT (l->data), TAG_SIERRA_APP_PORT)) |
3570 | + return TRUE; |
3571 | + } |
3572 | + |
3573 | + return FALSE; |
3574 | +} |
3575 | + |
3576 | +static MMBaseModem * |
3577 | +create_modem (MMPlugin *self, |
3578 | + const gchar *sysfs_path, |
3579 | + const gchar **drivers, |
3580 | + guint16 vendor, |
3581 | + guint16 product, |
3582 | + GList *probes, |
3583 | + GError **error) |
3584 | +{ |
3585 | +#if defined WITH_QMI |
3586 | + if (mm_port_probe_list_has_qmi_port (probes)) { |
3587 | + mm_dbg ("QMI-powered Sierra modem found..."); |
3588 | + return MM_BASE_MODEM (mm_broadband_modem_qmi_new (sysfs_path, |
3589 | + drivers, |
3590 | + mm_plugin_get_name (self), |
3591 | + vendor, |
3592 | + product)); |
3593 | + } |
3594 | +#endif |
3595 | + |
3596 | +#if defined WITH_MBIM |
3597 | + if (mm_port_probe_list_has_mbim_port (probes)) { |
3598 | + mm_dbg ("MBIM-powered Sierra modem found..."); |
3599 | + return MM_BASE_MODEM (mm_broadband_modem_mbim_new (sysfs_path, |
3600 | + drivers, |
3601 | + mm_plugin_get_name (self), |
3602 | + vendor, |
3603 | + product)); |
3604 | + } |
3605 | +#endif |
3606 | + |
3607 | + if (sierra_port_probe_list_is_icera (probes)) |
3608 | + return MM_BASE_MODEM (mm_broadband_modem_sierra_icera_new (sysfs_path, |
3609 | + drivers, |
3610 | + mm_plugin_get_name (self), |
3611 | + vendor, |
3612 | + product)); |
3613 | + |
3614 | + return MM_BASE_MODEM (mm_broadband_modem_sierra_new (sysfs_path, |
3615 | + drivers, |
3616 | + mm_plugin_get_name (self), |
3617 | + vendor, |
3618 | + product)); |
3619 | +} |
3620 | + |
3621 | +static gboolean |
3622 | +grab_port (MMPlugin *self, |
3623 | + MMBaseModem *modem, |
3624 | + MMPortProbe *probe, |
3625 | + GError **error) |
3626 | +{ |
3627 | + MMAtPortFlag pflags = MM_AT_PORT_FLAG_NONE; |
3628 | + MMPortType ptype; |
3629 | + |
3630 | + ptype = mm_port_probe_get_port_type (probe); |
3631 | + |
3632 | + /* Is it a GSM secondary port? */ |
3633 | + if (g_object_get_data (G_OBJECT (probe), TAG_SIERRA_APP_PORT)) { |
3634 | + if (g_object_get_data (G_OBJECT (probe), TAG_SIERRA_APP1_PPP_OK)) |
3635 | + pflags = MM_AT_PORT_FLAG_PPP; |
3636 | + else |
3637 | + pflags = MM_AT_PORT_FLAG_SECONDARY; |
3638 | + } else if (ptype == MM_PORT_TYPE_AT) |
3639 | + pflags = MM_AT_PORT_FLAG_PRIMARY; |
3640 | + |
3641 | + return mm_base_modem_grab_port (modem, |
3642 | + mm_port_probe_get_port_subsys (probe), |
3643 | + mm_port_probe_get_port_name (probe), |
3644 | + ptype, |
3645 | + pflags, |
3646 | + error); |
3647 | +} |
3648 | + |
3649 | +/*****************************************************************************/ |
3650 | + |
3651 | +G_MODULE_EXPORT MMPlugin * |
3652 | +mm_plugin_create (void) |
3653 | +{ |
3654 | + static const gchar *subsystems[] = { "tty", "net", "usb", NULL }; |
3655 | + static const gchar *drivers[] = { "sierra", "sierra_net", NULL }; |
3656 | + static const MMAsyncMethod custom_init = { |
3657 | + .async = G_CALLBACK (sierra_custom_init), |
3658 | + .finish = G_CALLBACK (sierra_custom_init_finish), |
3659 | + }; |
3660 | + |
3661 | + return MM_PLUGIN ( |
3662 | + g_object_new (MM_TYPE_PLUGIN_SIERRA, |
3663 | + MM_PLUGIN_NAME, "Sierra", |
3664 | + MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems, |
3665 | + MM_PLUGIN_ALLOWED_DRIVERS, drivers, |
3666 | + MM_PLUGIN_ALLOWED_AT, TRUE, |
3667 | + MM_PLUGIN_ALLOWED_QCDM, TRUE, |
3668 | + MM_PLUGIN_ALLOWED_QMI, TRUE, |
3669 | + MM_PLUGIN_ALLOWED_MBIM, TRUE, |
3670 | + MM_PLUGIN_CUSTOM_INIT, &custom_init, |
3671 | + MM_PLUGIN_ICERA_PROBE, TRUE, |
3672 | + MM_PLUGIN_REMOVE_ECHO, FALSE, |
3673 | + NULL)); |
3674 | +} |
3675 | + |
3676 | +static void |
3677 | +mm_plugin_sierra_init (MMPluginSierra *self) |
3678 | +{ |
3679 | +} |
3680 | + |
3681 | +static void |
3682 | +mm_plugin_sierra_class_init (MMPluginSierraClass *klass) |
3683 | +{ |
3684 | + MMPluginClass *plugin_class = MM_PLUGIN_CLASS (klass); |
3685 | + |
3686 | + plugin_class->create_modem = create_modem; |
3687 | + plugin_class->grab_port = grab_port; |
3688 | +} |
3689 | |
3690 | === modified file 'debian/changelog' |
3691 | --- debian/changelog 2014-02-25 16:12:24 +0000 |
3692 | +++ debian/changelog 2015-09-25 10:05:24 +0000 |
3693 | @@ -1,3 +1,9 @@ |
3694 | +modemmanager (1.0.0-2ubuntu1.1) trusty-proposed; urgency=medium |
3695 | + |
3696 | + * Support the MBIM for Dell. (LP: #1441095) |
3697 | + |
3698 | + -- Bin Li <bin.li@canonical.com> Mon, 13 Apr 2015 16:01:58 +0800 |
3699 | + |
3700 | modemmanager (1.0.0-2ubuntu1) trusty; urgency=medium |
3701 | |
3702 | * debian/rules: Work around build failure with -O3 by dropping to -O2. |
3703 | |
3704 | === added file 'debian/patches/dell-mbim-plugin.patch' |
3705 | --- debian/patches/dell-mbim-plugin.patch 1970-01-01 00:00:00 +0000 |
3706 | +++ debian/patches/dell-mbim-plugin.patch 2015-09-25 10:05:24 +0000 |
3707 | @@ -0,0 +1,566 @@ |
3708 | +## Description: new Dell plugin which is backported from develop branch(1.5.x) to 1.0 |
3709 | +## Origin/Author: Aleksander Morgado <aleksander@lanedo.com> |
3710 | +## Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/trusty/+source/modemmanager/+bug/1441095 |
3711 | +## Source: http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=93d6e4f102da51e72ecd2fbfcfa096cd2fd2e02e |
3712 | +commit 93d6e4f102da51e72ecd2fbfcfa096cd2fd2e02e |
3713 | +Author: Aleksander Morgado <aleksander@aleksander.es> |
3714 | +Date: Fri Feb 6 16:35:52 2015 +0100 |
3715 | + |
3716 | + dell: new Dell plugin |
3717 | + |
3718 | + For Dell-branded Novatel, Sierra and Ericsson modems. |
3719 | + |
3720 | + The Novatel plugin will no longer accept every Dell-branded modem, which was |
3721 | + the current situation. Instead, a new Dell plugin will take care of probing for |
3722 | + the correct vendor string, and based on the results create a specific Novatel, |
3723 | + Sierra or Ericsson modem. |
3724 | + |
3725 | + In order to properly support this, the Novatel, Sierra and MBM plugins now |
3726 | + export their implementations into non-inst libraries that the Dell plugin will |
3727 | + import. |
3728 | + |
3729 | + Also, for now, the Dell plugin doesn't make any difference between e.g. Sierra |
3730 | + or Ericsson MBIM implementations, just a generic MBIM modem is created in both |
3731 | + cases, as that is anyway what the Ericsson MBM and Sierra plugins do already. |
3732 | + |
3733 | + https://bugs.freedesktop.org/show_bug.cgi?id=86713 |
3734 | + |
3735 | +=== modified file 'plugins/Makefile.am' |
3736 | +Index: modemmanager/plugins/Makefile.am |
3737 | +=================================================================== |
3738 | +--- modemmanager.orig/plugins/Makefile.am |
3739 | ++++ modemmanager/plugins/Makefile.am |
3740 | +@@ -61,6 +61,7 @@ pkglib_LTLIBRARIES = \ |
3741 | + libmm-plugin-motorola.la \ |
3742 | + libmm-plugin-novatel.la \ |
3743 | + libmm-plugin-novatel-lte.la \ |
3744 | ++ libmm-plugin-dell.la \ |
3745 | + libmm-plugin-altair-lte.la \ |
3746 | + libmm-plugin-samsung.la \ |
3747 | + libmm-plugin-option.la \ |
3748 | +@@ -381,6 +382,14 @@ libmm_plugin_novatel_la_CPPFLAGS = $(PLU |
3749 | + libmm_plugin_novatel_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
3750 | + libmm_plugin_novatel_la_LIBADD = $(NOVATEL_COMMON_LIBADD_FLAGS) |
3751 | + |
3752 | ++# Dell (e.g. Novatel or Sierra) modem |
3753 | ++libmm_plugin_dell_la_SOURCES = \ |
3754 | ++ dell/mm-plugin-dell.c \ |
3755 | ++ dell/mm-plugin-dell.h |
3756 | ++libmm_plugin_dell_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(NOVATEL_COMMON_COMPILER_FLAGS) $(SIERRA_COMMON_COMPILER_FLAGS) $(MBM_COMMON_COMPILER_FLAGS) |
3757 | ++libmm_plugin_dell_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
3758 | ++libmm_plugin_dell_la_LIBADD = $(NOVATEL_COMMON_LIBADD_FLAGS) $(SIERRA_COMMON_LIBADD_FLAGS) $(MBM_COMMON_LIBADD_FLAGS) |
3759 | ++ |
3760 | + # Altair LTE modem |
3761 | + libmm_plugin_altair_lte_la_SOURCES = \ |
3762 | + altair/mm-plugin-altair-lte.c \ |
3763 | +Index: modemmanager/plugins/dell/mm-plugin-dell.c |
3764 | +=================================================================== |
3765 | +--- /dev/null |
3766 | ++++ modemmanager/plugins/dell/mm-plugin-dell.c |
3767 | +@@ -0,0 +1,440 @@ |
3768 | ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
3769 | ++ |
3770 | ++/* |
3771 | ++ * This program is free software; you can redistribute it and/or |
3772 | ++ * modify it under the terms of the GNU General Public License as |
3773 | ++ * published by the Free Software Foundation; either version 2 of the |
3774 | ++ * License, or (at your option) any later version. |
3775 | ++ * |
3776 | ++ * This program is distributed in the hope that it will be useful, |
3777 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3778 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3779 | ++ * General Public License for more details. |
3780 | ++ * |
3781 | ++ * You should have received a copy of the GNU General Public |
3782 | ++ * License along with this program; if not, write to the |
3783 | ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
3784 | ++ * Boston, MA 02111-1307, USA. |
3785 | ++ * |
3786 | ++ * Copyright (C) 2015 Aleksander Morgado <aleksander@aleksander.es> |
3787 | ++ */ |
3788 | ++ |
3789 | ++#include <string.h> |
3790 | ++#include <gmodule.h> |
3791 | ++ |
3792 | ++#define _LIBMM_INSIDE_MM |
3793 | ++#include <libmm-glib.h> |
3794 | ++ |
3795 | ++#include "mm-plugin-dell.h" |
3796 | ++#include "mm-common-novatel.h" |
3797 | ++#include "mm-private-boxed-types.h" |
3798 | ++#include "mm-broadband-modem.h" |
3799 | ++#include "mm-broadband-modem-novatel.h" |
3800 | ++#include "mm-common-novatel.h" |
3801 | ++#include "mm-broadband-modem-sierra.h" |
3802 | ++#include "mm-common-sierra.h" |
3803 | ++#include "mm-log.h" |
3804 | ++ |
3805 | ++#if defined WITH_QMI |
3806 | ++#include "mm-broadband-modem-qmi.h" |
3807 | ++#endif |
3808 | ++ |
3809 | ++#if defined WITH_MBIM |
3810 | ++#include "mm-broadband-modem-mbim.h" |
3811 | ++#endif |
3812 | ++ |
3813 | ++G_DEFINE_TYPE (MMPluginDell, mm_plugin_dell, MM_TYPE_PLUGIN) |
3814 | ++ |
3815 | ++int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION; |
3816 | ++int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; |
3817 | ++ |
3818 | ++#define TAG_DELL_MANUFACTURER "dell-manufacturer" |
3819 | ++typedef enum { |
3820 | ++ DELL_MANUFACTURER_UNKNOWN = 0, |
3821 | ++ DELL_MANUFACTURER_NOVATEL = 1, |
3822 | ++ DELL_MANUFACTURER_SIERRA = 2, |
3823 | ++ DELL_MANUFACTURER_ERICSSON = 3 |
3824 | ++} DellManufacturer; |
3825 | ++ |
3826 | ++/*****************************************************************************/ |
3827 | ++/* Custom init */ |
3828 | ++ |
3829 | ++typedef struct { |
3830 | ++ MMPortProbe *probe; |
3831 | ++ MMAtSerialPort *port; |
3832 | ++ GCancellable *cancellable; |
3833 | ++ GSimpleAsyncResult *result; |
3834 | ++ guint gmi_retries; |
3835 | ++ guint cgmi_retries; |
3836 | ++ guint ati_retries; |
3837 | ++} CustomInitContext; |
3838 | ++ |
3839 | ++static void |
3840 | ++custom_init_context_complete_and_free (CustomInitContext *ctx) |
3841 | ++{ |
3842 | ++ g_simple_async_result_complete_in_idle (ctx->result); |
3843 | ++ |
3844 | ++ if (ctx->cancellable) |
3845 | ++ g_object_unref (ctx->cancellable); |
3846 | ++ g_object_unref (ctx->port); |
3847 | ++ g_object_unref (ctx->probe); |
3848 | ++ g_object_unref (ctx->result); |
3849 | ++ g_slice_free (CustomInitContext, ctx); |
3850 | ++} |
3851 | ++ |
3852 | ++static gboolean |
3853 | ++dell_custom_init_finish (MMPortProbe *probe, |
3854 | ++ GAsyncResult *result, |
3855 | ++ GError **error) |
3856 | ++{ |
3857 | ++ return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error); |
3858 | ++} |
3859 | ++ |
3860 | ++static void |
3861 | ++novatel_custom_init_ready (MMPortProbe *probe, |
3862 | ++ GAsyncResult *res, |
3863 | ++ CustomInitContext *ctx) |
3864 | ++{ |
3865 | ++ GError *error = NULL; |
3866 | ++ |
3867 | ++ if (!mm_common_novatel_custom_init_finish (probe, res, &error)) |
3868 | ++ g_simple_async_result_take_error (ctx->result, error); |
3869 | ++ else |
3870 | ++ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
3871 | ++ custom_init_context_complete_and_free (ctx); |
3872 | ++} |
3873 | ++ |
3874 | ++static void |
3875 | ++sierra_custom_init_ready (MMPortProbe *probe, |
3876 | ++ GAsyncResult *res, |
3877 | ++ CustomInitContext *ctx) |
3878 | ++{ |
3879 | ++ GError *error = NULL; |
3880 | ++ |
3881 | ++ if (!mm_common_sierra_custom_init_finish (probe, res, &error)) |
3882 | ++ g_simple_async_result_take_error (ctx->result, error); |
3883 | ++ else |
3884 | ++ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
3885 | ++ custom_init_context_complete_and_free (ctx); |
3886 | ++} |
3887 | ++ |
3888 | ++static void custom_init_step (CustomInitContext *ctx); |
3889 | ++ |
3890 | ++static void |
3891 | ++custom_init_step_next_command (CustomInitContext *ctx) |
3892 | ++{ |
3893 | ++ if (ctx->gmi_retries > 0) |
3894 | ++ ctx->gmi_retries = 0; |
3895 | ++ else if (ctx->cgmi_retries > 0) |
3896 | ++ ctx->cgmi_retries = 0; |
3897 | ++ else if (ctx->ati_retries > 0) |
3898 | ++ ctx->ati_retries = 0; |
3899 | ++ custom_init_step (ctx); |
3900 | ++} |
3901 | ++ |
3902 | ++static void |
3903 | ++response_ready (MMAtSerialPort *port, |
3904 | ++ GString *response, |
3905 | ++ GError *error, |
3906 | ++ CustomInitContext *ctx) |
3907 | ++{ |
3908 | ++ GString *lower; |
3909 | ++ DellManufacturer manufacturer; |
3910 | ++ |
3911 | ++ if (error) { |
3912 | ++ /* Non-timeout error, jump to next command */ |
3913 | ++ if (!g_error_matches (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_RESPONSE_TIMEOUT)) { |
3914 | ++ mm_dbg ("(Dell) Error probing AT port: %s", error->message); |
3915 | ++ custom_init_step_next_command (ctx); |
3916 | ++ return; |
3917 | ++ } |
3918 | ++ /* Directly retry same command on timeout */ |
3919 | ++ custom_init_step (ctx); |
3920 | ++ return; |
3921 | ++ } |
3922 | ++ |
3923 | ++ /* Guess manufacturer from response */ |
3924 | ++ lower = g_string_ascii_down (response); |
3925 | ++ if (strstr (lower->str, "novatel")) |
3926 | ++ manufacturer = DELL_MANUFACTURER_NOVATEL; |
3927 | ++ else if (strstr (lower->str, "sierra")) |
3928 | ++ manufacturer = DELL_MANUFACTURER_SIERRA; |
3929 | ++ else if (strstr (lower->str, "ericsson")) |
3930 | ++ manufacturer = DELL_MANUFACTURER_ERICSSON; |
3931 | ++ else |
3932 | ++ manufacturer = DELL_MANUFACTURER_UNKNOWN; |
3933 | ++ g_free (lower); |
3934 | ++ |
3935 | ++ /* Tag based on manufacturer */ |
3936 | ++ if (manufacturer != DELL_MANUFACTURER_UNKNOWN) { |
3937 | ++ g_object_set_data (G_OBJECT (ctx->probe), TAG_DELL_MANUFACTURER, GUINT_TO_POINTER (manufacturer)); |
3938 | ++ |
3939 | ++ /* Run additional custom init, if needed */ |
3940 | ++ |
3941 | ++ if (manufacturer == DELL_MANUFACTURER_NOVATEL) { |
3942 | ++ mm_common_novatel_custom_init (ctx->probe, |
3943 | ++ ctx->port, |
3944 | ++ ctx->cancellable, |
3945 | ++ (GAsyncReadyCallback) novatel_custom_init_ready, |
3946 | ++ ctx); |
3947 | ++ return; |
3948 | ++ } |
3949 | ++ |
3950 | ++ if (manufacturer == DELL_MANUFACTURER_SIERRA) { |
3951 | ++ mm_common_sierra_custom_init (ctx->probe, |
3952 | ++ ctx->port, |
3953 | ++ ctx->cancellable, |
3954 | ++ (GAsyncReadyCallback) sierra_custom_init_ready, |
3955 | ++ ctx); |
3956 | ++ return; |
3957 | ++ } |
3958 | ++ |
3959 | ++ /* Finish custom_init */ |
3960 | ++ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
3961 | ++ custom_init_context_complete_and_free (ctx); |
3962 | ++ return; |
3963 | ++ } |
3964 | ++ |
3965 | ++ /* If we got a response, but we didn't get an expected string, try with next command */ |
3966 | ++ custom_init_step_next_command (ctx); |
3967 | ++} |
3968 | ++ |
3969 | ++static void |
3970 | ++custom_init_step (CustomInitContext *ctx) |
3971 | ++{ |
3972 | ++ /* If cancelled, end */ |
3973 | ++ if (g_cancellable_is_cancelled (ctx->cancellable)) { |
3974 | ++ mm_dbg ("(Dell) no need to keep on running custom init in (%s)", |
3975 | ++ mm_port_get_device (MM_PORT (ctx->port))); |
3976 | ++ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
3977 | ++ custom_init_context_complete_and_free (ctx); |
3978 | ++ return; |
3979 | ++ } |
3980 | ++ |
3981 | ++#if defined WITH_QMI |
3982 | ++ /* If device has a QMI port, don't run anything else, as we don't care */ |
3983 | ++ if (mm_port_probe_list_has_qmi_port (mm_device_peek_port_probe_list (mm_port_probe_peek_device (ctx->probe)))) { |
3984 | ++ mm_dbg ("(Dell) no need to run custom init in (%s): device has QMI port", |
3985 | ++ mm_port_get_device (MM_PORT (ctx->port))); |
3986 | ++ mm_port_probe_set_result_at (ctx->probe, FALSE); |
3987 | ++ mm_port_probe_set_result_qcdm (ctx->probe, FALSE); |
3988 | ++ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
3989 | ++ custom_init_context_complete_and_free (ctx); |
3990 | ++ return; |
3991 | ++ } |
3992 | ++#endif |
3993 | ++ |
3994 | ++#if defined WITH_MBIM |
3995 | ++ /* If device has a MBIM port, don't run anything else, as we don't care */ |
3996 | ++ if (mm_port_probe_list_has_mbim_port (mm_device_peek_port_probe_list (mm_port_probe_peek_device (ctx->probe)))) { |
3997 | ++ mm_dbg ("(Dell) no need to run custom init in (%s): device has MBIM port", |
3998 | ++ mm_port_get_device (MM_PORT (ctx->port))); |
3999 | ++ mm_port_probe_set_result_at (ctx->probe, FALSE); |
4000 | ++ mm_port_probe_set_result_qcdm (ctx->probe, FALSE); |
4001 | ++ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
4002 | ++ custom_init_context_complete_and_free (ctx); |
4003 | ++ return; |
4004 | ++ } |
4005 | ++#endif |
4006 | ++ |
4007 | ++ if (ctx->gmi_retries > 0) { |
4008 | ++ ctx->gmi_retries--; |
4009 | ++ mm_at_serial_port_queue_command (ctx->port, |
4010 | ++ "AT+GMI", |
4011 | ++ 3, |
4012 | ++ FALSE, /* raw */ |
4013 | ++ ctx->cancellable, |
4014 | ++ (MMAtSerialResponseFn)response_ready, |
4015 | ++ ctx); |
4016 | ++ return; |
4017 | ++ } |
4018 | ++ |
4019 | ++ if (ctx->cgmi_retries > 0) { |
4020 | ++ ctx->cgmi_retries--; |
4021 | ++ mm_at_serial_port_queue_command (ctx->port, |
4022 | ++ "AT+CGMI", |
4023 | ++ 3, |
4024 | ++ FALSE, /* raw */ |
4025 | ++ ctx->cancellable, |
4026 | ++ (MMAtSerialResponseFn)response_ready, |
4027 | ++ ctx); |
4028 | ++ return; |
4029 | ++ } |
4030 | ++ |
4031 | ++ if (ctx->ati_retries > 0) { |
4032 | ++ ctx->ati_retries--; |
4033 | ++ /* Note: in Ericsson devices, ATI3 seems to reply the vendor string */ |
4034 | ++ mm_at_serial_port_queue_command (ctx->port, |
4035 | ++ "ATI1I2I3", |
4036 | ++ 3, |
4037 | ++ FALSE, /* raw */ |
4038 | ++ ctx->cancellable, |
4039 | ++ (MMAtSerialResponseFn)response_ready, |
4040 | ++ ctx); |
4041 | ++ return; |
4042 | ++ } |
4043 | ++ |
4044 | ++ /* Finish custom_init */ |
4045 | ++ mm_dbg ("(Dell) couldn't flip secondary port to AT in (%s): all retries consumed", |
4046 | ++ mm_port_get_device (MM_PORT (ctx->port))); |
4047 | ++ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
4048 | ++ custom_init_context_complete_and_free (ctx); |
4049 | ++} |
4050 | ++ |
4051 | ++static void |
4052 | ++dell_custom_init (MMPortProbe *probe, |
4053 | ++ MMAtSerialPort *port, |
4054 | ++ GCancellable *cancellable, |
4055 | ++ GAsyncReadyCallback callback, |
4056 | ++ gpointer user_data) |
4057 | ++{ |
4058 | ++ CustomInitContext *ctx; |
4059 | ++ |
4060 | ++ ctx = g_slice_new (CustomInitContext); |
4061 | ++ ctx->result = g_simple_async_result_new (G_OBJECT (probe), |
4062 | ++ callback, |
4063 | ++ user_data, |
4064 | ++ dell_custom_init); |
4065 | ++ ctx->probe = g_object_ref (probe); |
4066 | ++ ctx->port = g_object_ref (port); |
4067 | ++ ctx->cancellable = cancellable ? g_object_ref (cancellable) : NULL; |
4068 | ++ ctx->gmi_retries = 3; |
4069 | ++ ctx->ati_retries = 3; |
4070 | ++ |
4071 | ++ custom_init_step (ctx); |
4072 | ++} |
4073 | ++ |
4074 | ++/*****************************************************************************/ |
4075 | ++ |
4076 | ++static gboolean |
4077 | ++port_probe_list_has_manufacturer_port (GList *probes, |
4078 | ++ DellManufacturer manufacturer) |
4079 | ++{ |
4080 | ++ GList *l; |
4081 | ++ |
4082 | ++ for (l = probes; l; l = g_list_next (l)) { |
4083 | ++ if (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (l->data), TAG_DELL_MANUFACTURER)) == manufacturer) |
4084 | ++ return TRUE; |
4085 | ++ } |
4086 | ++ return FALSE; |
4087 | ++} |
4088 | ++ |
4089 | ++static MMBaseModem * |
4090 | ++create_modem (MMPlugin *self, |
4091 | ++ const gchar *sysfs_path, |
4092 | ++ const gchar **drivers, |
4093 | ++ guint16 vendor, |
4094 | ++ guint16 product, |
4095 | ++ GList *probes, |
4096 | ++ GError **error) |
4097 | ++{ |
4098 | ++ /* Note: at this point we don't make any difference between different |
4099 | ++ * Dell-branded QMI or MBIM modems; they may come from Novatel, Ericsson or |
4100 | ++ * Sierra. */ |
4101 | ++ |
4102 | ++#if defined WITH_QMI |
4103 | ++ if (mm_port_probe_list_has_qmi_port (probes)) { |
4104 | ++ mm_dbg ("QMI-powered Dell-branded modem found..."); |
4105 | ++ return MM_BASE_MODEM (mm_broadband_modem_qmi_new (sysfs_path, |
4106 | ++ drivers, |
4107 | ++ mm_plugin_get_name (self), |
4108 | ++ vendor, |
4109 | ++ product)); |
4110 | ++ } |
4111 | ++#endif |
4112 | ++ |
4113 | ++#if defined WITH_MBIM |
4114 | ++ if (mm_port_probe_list_has_mbim_port (probes)) { |
4115 | ++ mm_dbg ("MBIM-powered Dell-branded modem found..."); |
4116 | ++ return MM_BASE_MODEM (mm_broadband_modem_mbim_new (sysfs_path, |
4117 | ++ drivers, |
4118 | ++ mm_plugin_get_name (self), |
4119 | ++ vendor, |
4120 | ++ product)); |
4121 | ++ } |
4122 | ++#endif |
4123 | ++ |
4124 | ++ if (port_probe_list_has_manufacturer_port (probes, DELL_MANUFACTURER_NOVATEL)) { |
4125 | ++ mm_dbg ("Novatel-powered Dell-branded modem found..."); |
4126 | ++ return MM_BASE_MODEM (mm_broadband_modem_novatel_new (sysfs_path, |
4127 | ++ drivers, |
4128 | ++ mm_plugin_get_name (self), |
4129 | ++ vendor, |
4130 | ++ product)); |
4131 | ++ } |
4132 | ++ |
4133 | ++ if (port_probe_list_has_manufacturer_port (probes, DELL_MANUFACTURER_SIERRA)) { |
4134 | ++ mm_dbg ("Sierra-powered Dell-branded modem found..."); |
4135 | ++ return MM_BASE_MODEM (mm_broadband_modem_sierra_new (sysfs_path, |
4136 | ++ drivers, |
4137 | ++ mm_plugin_get_name (self), |
4138 | ++ vendor, |
4139 | ++ product)); |
4140 | ++ } |
4141 | ++ |
4142 | ++ mm_dbg ("Dell-branded generic modem found..."); |
4143 | ++ return MM_BASE_MODEM (mm_broadband_modem_new (sysfs_path, |
4144 | ++ drivers, |
4145 | ++ mm_plugin_get_name (self), |
4146 | ++ vendor, |
4147 | ++ product)); |
4148 | ++} |
4149 | ++ |
4150 | ++/*****************************************************************************/ |
4151 | ++ |
4152 | ++static gboolean |
4153 | ++grab_port (MMPlugin *self, |
4154 | ++ MMBaseModem *modem, |
4155 | ++ MMPortProbe *probe, |
4156 | ++ GError **error) |
4157 | ++{ |
4158 | ++ /* Only Sierra needs custom grab port, due to the port type hints */ |
4159 | ++ if (MM_IS_BROADBAND_MODEM_SIERRA (modem)) |
4160 | ++ return mm_common_sierra_grab_port (self, modem, probe, error); |
4161 | ++ |
4162 | ++ return mm_base_modem_grab_port (modem, |
4163 | ++ mm_port_probe_get_port_subsys (probe), |
4164 | ++ mm_port_probe_get_port_name (probe), |
4165 | ++ mm_port_probe_get_port_type (probe), |
4166 | ++ MM_AT_PORT_FLAG_NONE, |
4167 | ++ error); |
4168 | ++} |
4169 | ++ |
4170 | ++/*****************************************************************************/ |
4171 | ++ |
4172 | ++G_MODULE_EXPORT MMPlugin * |
4173 | ++mm_plugin_create (void) |
4174 | ++{ |
4175 | ++ static const gchar *subsystems[] = { "tty", "net", "usb", NULL }; |
4176 | ++ static const guint16 vendors[] = { 0x413c, 0 }; |
4177 | ++ static const MMAsyncMethod custom_init = { |
4178 | ++ .async = G_CALLBACK (dell_custom_init), |
4179 | ++ .finish = G_CALLBACK (dell_custom_init_finish), |
4180 | ++ }; |
4181 | ++ |
4182 | ++ return MM_PLUGIN ( |
4183 | ++ g_object_new (MM_TYPE_PLUGIN_DELL, |
4184 | ++ MM_PLUGIN_NAME, "Dell", |
4185 | ++ MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems, |
4186 | ++ MM_PLUGIN_ALLOWED_VENDOR_IDS, vendors, |
4187 | ++ MM_PLUGIN_ALLOWED_AT, TRUE, |
4188 | ++ MM_PLUGIN_CUSTOM_INIT, &custom_init, |
4189 | ++ MM_PLUGIN_ALLOWED_QCDM, TRUE, |
4190 | ++ MM_PLUGIN_ALLOWED_QMI, TRUE, |
4191 | ++ MM_PLUGIN_ALLOWED_MBIM, TRUE, |
4192 | ++ NULL)); |
4193 | ++} |
4194 | ++ |
4195 | ++static void |
4196 | ++mm_plugin_dell_init (MMPluginDell *self) |
4197 | ++{ |
4198 | ++} |
4199 | ++ |
4200 | ++static void |
4201 | ++mm_plugin_dell_class_init (MMPluginDellClass *klass) |
4202 | ++{ |
4203 | ++ MMPluginClass *plugin_class = MM_PLUGIN_CLASS (klass); |
4204 | ++ |
4205 | ++ plugin_class->create_modem = create_modem; |
4206 | ++ plugin_class->grab_port = grab_port; |
4207 | ++} |
4208 | +Index: modemmanager/plugins/dell/mm-plugin-dell.h |
4209 | +=================================================================== |
4210 | +--- /dev/null |
4211 | ++++ modemmanager/plugins/dell/mm-plugin-dell.h |
4212 | +@@ -0,0 +1,46 @@ |
4213 | ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
4214 | ++ |
4215 | ++/* |
4216 | ++ * This program is free software; you can redistribute it and/or |
4217 | ++ * modify it under the terms of the GNU General Public License as |
4218 | ++ * published by the Free Software Foundation; either version 2 of the |
4219 | ++ * License, or (at your option) any later version. |
4220 | ++ * |
4221 | ++ * This program is distributed in the hope that it will be useful, |
4222 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4223 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4224 | ++ * General Public License for more details. |
4225 | ++ * |
4226 | ++ * You should have received a copy of the GNU General Public |
4227 | ++ * License along with this program; if not, write to the |
4228 | ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
4229 | ++ * Boston, MA 02111-1307, USA. |
4230 | ++ * |
4231 | ++ * Copyright (C) 2015 Aleksander Morgado <aleksander@aleksander.es> |
4232 | ++ */ |
4233 | ++ |
4234 | ++#ifndef MM_PLUGIN_DELL_H |
4235 | ++#define MM_PLUGIN_DELL_H |
4236 | ++ |
4237 | ++#include "mm-plugin.h" |
4238 | ++ |
4239 | ++#define MM_TYPE_PLUGIN_DELL (mm_plugin_dell_get_type ()) |
4240 | ++#define MM_PLUGIN_DELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_PLUGIN_DELL, MMPluginDell)) |
4241 | ++#define MM_PLUGIN_DELL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_PLUGIN_DELL, MMPluginDellClass)) |
4242 | ++#define MM_IS_PLUGIN_DELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_PLUGIN_DELL)) |
4243 | ++#define MM_IS_PLUGIN_DELL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_PLUGIN_DELL)) |
4244 | ++#define MM_PLUGIN_DELL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_PLUGIN_DELL, MMPluginDellClass)) |
4245 | ++ |
4246 | ++typedef struct { |
4247 | ++ MMPlugin parent; |
4248 | ++} MMPluginDell; |
4249 | ++ |
4250 | ++typedef struct { |
4251 | ++ MMPluginClass parent; |
4252 | ++} MMPluginDellClass; |
4253 | ++ |
4254 | ++GType mm_plugin_dell_get_type (void); |
4255 | ++ |
4256 | ++G_MODULE_EXPORT MMPlugin *mm_plugin_create (void); |
4257 | ++ |
4258 | ++#endif /* MM_PLUGIN_DELL_H */ |
4259 | +Index: modemmanager/plugins/novatel/mm-plugin-novatel.c |
4260 | +=================================================================== |
4261 | +--- modemmanager.orig/plugins/novatel/mm-plugin-novatel.c |
4262 | ++++ modemmanager/plugins/novatel/mm-plugin-novatel.c |
4263 | +@@ -90,9 +90,7 @@ G_MODULE_EXPORT MMPlugin * |
4264 | + mm_plugin_create (void) |
4265 | + { |
4266 | + static const gchar *subsystems[] = { "tty", "net", "usb", NULL }; |
4267 | +- static const guint16 vendors[] = { 0x1410, /* Novatel */ |
4268 | +- 0x413c, /* Dell */ |
4269 | +- 0 }; |
4270 | ++ static const guint16 vendors[] = { 0x1410, 0 }; |
4271 | + static const mm_uint16_pair forbidden_products[] = { { 0x1410, 0x9010 }, /* Novatel E362 */ |
4272 | + { 0, 0 } }; |
4273 | + static const MMAsyncMethod custom_init = { |
4274 | |
4275 | === added file 'debian/patches/mbm-common-library.patch' |
4276 | --- debian/patches/mbm-common-library.patch 1970-01-01 00:00:00 +0000 |
4277 | +++ debian/patches/mbm-common-library.patch 2015-09-25 10:05:24 +0000 |
4278 | @@ -0,0 +1,49 @@ |
4279 | +## Description: mbm common library which is backported from develop branch(1.5.x) to 1.0 |
4280 | +## Origin/Author: Aleksander Morgado <aleksander@lanedo.com> |
4281 | +## Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/trusty/+source/modemmanager/+bug/1441095 |
4282 | +## Source: http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=5a268430c4c89e21d977403ec764c59b86498af8 |
4283 | +commit 5a268430c4c89e21d977403ec764c59b86498af8 |
4284 | +Author: Aleksander Morgado <aleksander@aleksander.es> |
4285 | +Date: Fri Feb 6 17:11:52 2015 +0100 |
4286 | + |
4287 | + mbm: build a common non-inst library with the core Ericsson modem support |
4288 | + |
4289 | +Index: modemmanager/plugins/Makefile.am |
4290 | +=================================================================== |
4291 | +--- modemmanager.orig/plugins/Makefile.am |
4292 | ++++ modemmanager/plugins/Makefile.am |
4293 | +@@ -130,18 +130,29 @@ test_modem_helpers_huawei_CPPFLAGS = \ |
4294 | + test_modem_helpers_huawei_LDFLAGS = $(MM_LIBS) $(top_builddir)/libmm-glib/libmm-glib.la |
4295 | + |
4296 | + |
4297 | +-# MBM |
4298 | +-libmm_plugin_mbm_la_SOURCES = \ |
4299 | +- mbm/mm-plugin-mbm.c \ |
4300 | +- mbm/mm-plugin-mbm.h \ |
4301 | ++# Common Mbm modem support library |
4302 | ++noinst_LTLIBRARIES += libmm-utils-mbm.la |
4303 | ++libmm_utils_mbm_la_SOURCES = \ |
4304 | + mbm/mm-broadband-modem-mbm.c \ |
4305 | + mbm/mm-broadband-modem-mbm.h \ |
4306 | + mbm/mm-broadband-bearer-mbm.c \ |
4307 | + mbm/mm-broadband-bearer-mbm.h \ |
4308 | + mbm/mm-sim-mbm.c \ |
4309 | + mbm/mm-sim-mbm.h |
4310 | +-libmm_plugin_mbm_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
4311 | ++libmm_utils_mbm_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
4312 | ++libmm_utils_mbm_la_LIBADD = $(GUDEV_LIBS) $(MM_LIBS) |
4313 | ++ |
4314 | ++MBM_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/mbm |
4315 | ++MBM_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-mbm.la |
4316 | ++ |
4317 | ++# MBM |
4318 | ++libmm_plugin_mbm_la_SOURCES = \ |
4319 | ++ mbm/mm-plugin-mbm.c \ |
4320 | ++ mbm/mm-plugin-mbm.h |
4321 | ++libmm_plugin_mbm_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(MBM_COMMON_COMPILER_FLAGS) |
4322 | + libmm_plugin_mbm_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
4323 | ++libmm_plugin_mbm_la_LIBADD = $(MBM_COMMON_LIBADD_FLAGS) |
4324 | ++ |
4325 | + udevrules_DATA += mbm/77-mm-ericsson-mbm.rules |
4326 | + |
4327 | + # Option |
4328 | |
4329 | === added file 'debian/patches/new-sierra-legacy-plugin.patch' |
4330 | --- debian/patches/new-sierra-legacy-plugin.patch 1970-01-01 00:00:00 +0000 |
4331 | +++ debian/patches/new-sierra-legacy-plugin.patch 2015-09-25 10:05:24 +0000 |
4332 | @@ -0,0 +1,295 @@ |
4333 | +## Description: new 'sierra-legacy' plugin which is backported from develop branch(1.5.x) to 1.0 |
4334 | +## Origin/Author: Aleksander Morgado <aleksander@lanedo.com> |
4335 | +## Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/trusty/+source/modemmanager/+bug/1441095 |
4336 | +## Source: http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=6bbc4c1746c9e7c48e12dcb1e1986f1e16327161 |
4337 | +commit 6bbc4c1746c9e7c48e12dcb1e1986f1e16327161 |
4338 | +Author: Aleksander Morgado <aleksander@aleksander.es> |
4339 | +Date: Fri Feb 6 20:02:20 2015 +0100 |
4340 | + |
4341 | + sierra: move all the legacy Sierra support to a new 'sierra-legacy' plugin |
4342 | + |
4343 | + In short: |
4344 | + |
4345 | + * The 'sierra-legacy' plugin will handle all the old AT based modems, |
4346 | + including the DirectIP ones. This plugin is filtered by driver ('sierra' or |
4347 | + 'sierra_net') and forbidden-drivers ('qmi_wwan' and 'cdc_mbim'). This plugin |
4348 | + should also grab HP and AT&T branded models if they are handled by the |
4349 | + proper kernel driver. |
4350 | + |
4351 | + * The 'sierra' plugin will only handle QMI or MBIM based Sierra modems, which |
4352 | + are really all the new ones. This plugin is filtered by VID (0x1199) and |
4353 | + driver (qmi_wwan and cdc_mbim). |
4354 | + |
4355 | + For this separation to work, the 'sierra' and 'sierra_net' plugins need to be |
4356 | + complementary to each other. |
4357 | + |
4358 | +Index: modemmanager/plugins/Makefile.am |
4359 | +=================================================================== |
4360 | +--- modemmanager.orig/plugins/Makefile.am |
4361 | ++++ modemmanager/plugins/Makefile.am |
4362 | +@@ -75,6 +75,7 @@ pkglib_LTLIBRARIES = \ |
4363 | + libmm-plugin-pantech.la \ |
4364 | + libmm-plugin-zte.la \ |
4365 | + libmm-plugin-sierra.la \ |
4366 | ++ libmm-plugin-sierra-legacy.la \ |
4367 | + libmm-plugin-mbm.la \ |
4368 | + libmm-plugin-via.la \ |
4369 | + libmm-plugin-telit.la |
4370 | +@@ -194,15 +195,22 @@ libmm_utils_sierra_la_LIBADD = $(GUDEV_L |
4371 | + SIERRA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/sierra |
4372 | + SIERRA_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-sierra.la |
4373 | + |
4374 | +-# Sierra |
4375 | ++# Sierra (new QMI or MBIM modems) |
4376 | + libmm_plugin_sierra_la_SOURCES = \ |
4377 | + sierra/mm-plugin-sierra.c \ |
4378 | +- sierra/mm-plugin-sierra.h \ |
4379 | ++ sierra/mm-plugin-sierra.h |
4380 | ++libmm_plugin_sierra_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
4381 | ++libmm_plugin_sierra_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
4382 | ++ |
4383 | ++# Sierra (legacy) |
4384 | ++libmm_plugin_sierra_legacy_la_SOURCES = \ |
4385 | ++ sierra/mm-plugin-sierra-legacy.c \ |
4386 | ++ sierra/mm-plugin-sierra-legacy.h \ |
4387 | + sierra/mm-broadband-modem-sierra-icera.c \ |
4388 | + sierra/mm-broadband-modem-sierra-icera.h |
4389 | +-libmm_plugin_sierra_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) $(SIERRA_COMMON_COMPILER_FLAGS) |
4390 | +-libmm_plugin_sierra_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
4391 | +-libmm_plugin_sierra_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) $(SIERRA_COMMON_LIBADD_FLAGS) |
4392 | ++libmm_plugin_sierra_legacy_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS) $(SIERRA_COMMON_COMPILER_FLAGS) |
4393 | ++libmm_plugin_sierra_legacy_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
4394 | ++libmm_plugin_sierra_legacy_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS) $(SIERRA_COMMON_LIBADD_FLAGS) |
4395 | + |
4396 | + # Wavecom (Sierra Airlink) |
4397 | + libmm_plugin_wavecom_la_SOURCES = \ |
4398 | +Index: modemmanager/plugins/sierra/mm-plugin-sierra-legacy.c |
4399 | +=================================================================== |
4400 | +--- /dev/null |
4401 | ++++ modemmanager/plugins/sierra/mm-plugin-sierra-legacy.c |
4402 | +@@ -0,0 +1,99 @@ |
4403 | ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
4404 | ++/* |
4405 | ++ * This program is free software; you can redistribute it and/or modify |
4406 | ++ * it under the terms of the GNU General Public License as published by |
4407 | ++ * the Free Software Foundation; either version 2 of the License, or |
4408 | ++ * (at your option) any later version. |
4409 | ++ * |
4410 | ++ * This program is distributed in the hope that it will be useful, |
4411 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4412 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4413 | ++ * GNU General Public License for more details: |
4414 | ++ * |
4415 | ++ * Copyright (C) 2008 - 2009 Novell, Inc. |
4416 | ++ * Copyright (C) 2009 - 2012 Red Hat, Inc. |
4417 | ++ * Copyright (C) 2012 Lanedo GmbH |
4418 | ++ * Copyright (C) 2015 Aleksander Morgado <aleksander@aleksander.es> |
4419 | ++ */ |
4420 | ++ |
4421 | ++#include <stdlib.h> |
4422 | ++#include <gmodule.h> |
4423 | ++ |
4424 | ++#define _LIBMM_INSIDE_MM |
4425 | ++#include <libmm-glib.h> |
4426 | ++ |
4427 | ++#include "mm-log.h" |
4428 | ++#include "mm-plugin-sierra-legacy.h" |
4429 | ++#include "mm-common-sierra.h" |
4430 | ++#include "mm-broadband-modem-sierra.h" |
4431 | ++#include "mm-broadband-modem-sierra-icera.h" |
4432 | ++ |
4433 | ++G_DEFINE_TYPE (MMPluginSierraLegacy, mm_plugin_sierra_legacy, MM_TYPE_PLUGIN) |
4434 | ++ |
4435 | ++int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION; |
4436 | ++int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION; |
4437 | ++ |
4438 | ++/*****************************************************************************/ |
4439 | ++ |
4440 | ++static MMBaseModem * |
4441 | ++create_modem (MMPlugin *self, |
4442 | ++ const gchar *sysfs_path, |
4443 | ++ const gchar **drivers, |
4444 | ++ guint16 vendor, |
4445 | ++ guint16 product, |
4446 | ++ GList *probes, |
4447 | ++ GError **error) |
4448 | ++{ |
4449 | ++ if (mm_common_sierra_port_probe_list_is_icera (probes)) |
4450 | ++ return MM_BASE_MODEM (mm_broadband_modem_sierra_icera_new (sysfs_path, |
4451 | ++ drivers, |
4452 | ++ mm_plugin_get_name (self), |
4453 | ++ vendor, |
4454 | ++ product)); |
4455 | ++ |
4456 | ++ return MM_BASE_MODEM (mm_broadband_modem_sierra_new (sysfs_path, |
4457 | ++ drivers, |
4458 | ++ mm_plugin_get_name (self), |
4459 | ++ vendor, |
4460 | ++ product)); |
4461 | ++} |
4462 | ++ |
4463 | ++/*****************************************************************************/ |
4464 | ++ |
4465 | ++G_MODULE_EXPORT MMPlugin * |
4466 | ++mm_plugin_create (void) |
4467 | ++{ |
4468 | ++ static const gchar *subsystems[] = { "tty", "net", NULL }; |
4469 | ++ static const gchar *drivers[] = { "sierra", "sierra_net", NULL }; |
4470 | ++ static const gchar *forbidden_drivers[] = { "qmi_wwan", "cdc_mbim", NULL }; |
4471 | ++ static const MMAsyncMethod custom_init = { |
4472 | ++ .async = G_CALLBACK (mm_common_sierra_custom_init), |
4473 | ++ .finish = G_CALLBACK (mm_common_sierra_custom_init_finish), |
4474 | ++ }; |
4475 | ++ |
4476 | ++ return MM_PLUGIN ( |
4477 | ++ g_object_new (MM_TYPE_PLUGIN_SIERRA_LEGACY, |
4478 | ++ MM_PLUGIN_NAME, "Sierra (legacy)", |
4479 | ++ MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems, |
4480 | ++ MM_PLUGIN_ALLOWED_DRIVERS, drivers, |
4481 | ++ MM_PLUGIN_FORBIDDEN_DRIVERS, forbidden_drivers, |
4482 | ++ MM_PLUGIN_ALLOWED_AT, TRUE, |
4483 | ++ MM_PLUGIN_CUSTOM_INIT, &custom_init, |
4484 | ++ MM_PLUGIN_ICERA_PROBE, TRUE, |
4485 | ++ MM_PLUGIN_REMOVE_ECHO, FALSE, |
4486 | ++ NULL)); |
4487 | ++} |
4488 | ++ |
4489 | ++static void |
4490 | ++mm_plugin_sierra_legacy_init (MMPluginSierraLegacy *self) |
4491 | ++{ |
4492 | ++} |
4493 | ++ |
4494 | ++static void |
4495 | ++mm_plugin_sierra_legacy_class_init (MMPluginSierraLegacyClass *klass) |
4496 | ++{ |
4497 | ++ MMPluginClass *plugin_class = MM_PLUGIN_CLASS (klass); |
4498 | ++ |
4499 | ++ plugin_class->create_modem = create_modem; |
4500 | ++ plugin_class->grab_port = mm_common_sierra_grab_port; |
4501 | ++} |
4502 | +Index: modemmanager/plugins/sierra/mm-plugin-sierra-legacy.h |
4503 | +=================================================================== |
4504 | +--- /dev/null |
4505 | ++++ modemmanager/plugins/sierra/mm-plugin-sierra-legacy.h |
4506 | +@@ -0,0 +1,40 @@ |
4507 | ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
4508 | ++/* |
4509 | ++ * This program is free software; you can redistribute it and/or modify |
4510 | ++ * it under the terms of the GNU General Public License as published by |
4511 | ++ * the Free Software Foundation; either version 2 of the License, or |
4512 | ++ * (at your option) any later version. |
4513 | ++ * |
4514 | ++ * This program is distributed in the hope that it will be useful, |
4515 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4516 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4517 | ++ * GNU General Public License for more details: |
4518 | ++ * |
4519 | ++ * Copyright (C) 2015 Aleksander Morgado <aleksander@aleksander.es> |
4520 | ++ */ |
4521 | ++ |
4522 | ++#ifndef MM_PLUGIN_SIERRA_LEGACY_H |
4523 | ++#define MM_PLUGIN_SIERRA_LEGACY_H |
4524 | ++ |
4525 | ++#include "mm-plugin.h" |
4526 | ++ |
4527 | ++#define MM_TYPE_PLUGIN_SIERRA_LEGACY (mm_plugin_sierra_legacy_get_type ()) |
4528 | ++#define MM_PLUGIN_SIERRA_LEGACY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_PLUGIN_SIERRA_LEGACY, MMPluginSierraLegacy)) |
4529 | ++#define MM_PLUGIN_SIERRA_LEGACY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_PLUGIN_SIERRA_LEGACY, MMPluginSierraLegacyClass)) |
4530 | ++#define MM_IS_PLUGIN_SIERRA_LEGACY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_PLUGIN_SIERRA_LEGACY)) |
4531 | ++#define MM_IS_PLUGIN_SIERRA_LEGACY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_PLUGIN_SIERRA_LEGACY)) |
4532 | ++#define MM_PLUGIN_SIERRA_LEGACY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_PLUGIN_SIERRA_LEGACY, MMPluginSierraLegacyClass)) |
4533 | ++ |
4534 | ++typedef struct { |
4535 | ++ MMPlugin parent; |
4536 | ++} MMPluginSierraLegacy; |
4537 | ++ |
4538 | ++typedef struct { |
4539 | ++ MMPluginClass parent; |
4540 | ++} MMPluginSierraLegacyClass; |
4541 | ++ |
4542 | ++GType mm_plugin_sierra_legacy_get_type (void); |
4543 | ++ |
4544 | ++G_MODULE_EXPORT MMPlugin *mm_plugin_create (void); |
4545 | ++ |
4546 | ++#endif /* MM_PLUGIN_SIERRA_LEGACY_H */ |
4547 | +Index: modemmanager/plugins/sierra/mm-plugin-sierra.c |
4548 | +=================================================================== |
4549 | +--- modemmanager.orig/plugins/sierra/mm-plugin-sierra.c |
4550 | ++++ modemmanager/plugins/sierra/mm-plugin-sierra.c |
4551 | +@@ -13,6 +13,7 @@ |
4552 | + * Copyright (C) 2008 - 2009 Novell, Inc. |
4553 | + * Copyright (C) 2009 - 2012 Red Hat, Inc. |
4554 | + * Copyright (C) 2012 Lanedo GmbH |
4555 | ++ * Copyright (C) 2015 Aleksander Morgado <aleksander@aleksander.es> |
4556 | + */ |
4557 | + |
4558 | + #include <stdlib.h> |
4559 | +@@ -23,9 +24,6 @@ |
4560 | + |
4561 | + #include "mm-log.h" |
4562 | + #include "mm-plugin-sierra.h" |
4563 | +-#include "mm-common-sierra.h" |
4564 | +-#include "mm-broadband-modem-sierra.h" |
4565 | +-#include "mm-broadband-modem-sierra-icera.h" |
4566 | + |
4567 | + #if defined WITH_QMI |
4568 | + #include "mm-broadband-modem-qmi.h" |
4569 | +@@ -73,18 +71,12 @@ create_modem (MMPlugin *self, |
4570 | + } |
4571 | + #endif |
4572 | + |
4573 | +- if (mm_common_sierra_port_probe_list_is_icera (probes)) |
4574 | +- return MM_BASE_MODEM (mm_broadband_modem_sierra_icera_new (sysfs_path, |
4575 | +- drivers, |
4576 | +- mm_plugin_get_name (self), |
4577 | +- vendor, |
4578 | +- product)); |
4579 | +- |
4580 | +- return MM_BASE_MODEM (mm_broadband_modem_sierra_new (sysfs_path, |
4581 | +- drivers, |
4582 | +- mm_plugin_get_name (self), |
4583 | +- vendor, |
4584 | +- product)); |
4585 | ++ /* Fallback to default modem in the worst case */ |
4586 | ++ return MM_BASE_MODEM (mm_broadband_modem_new (sysfs_path, |
4587 | ++ drivers, |
4588 | ++ mm_plugin_get_name (self), |
4589 | ++ vendor, |
4590 | ++ product)); |
4591 | + } |
4592 | + |
4593 | + /*****************************************************************************/ |
4594 | +@@ -93,24 +85,19 @@ G_MODULE_EXPORT MMPlugin * |
4595 | + mm_plugin_create (void) |
4596 | + { |
4597 | + static const gchar *subsystems[] = { "tty", "net", "usb", NULL }; |
4598 | +- static const gchar *drivers[] = { "sierra", "sierra_net", NULL }; |
4599 | +- static const MMAsyncMethod custom_init = { |
4600 | +- .async = G_CALLBACK (mm_common_sierra_custom_init), |
4601 | +- .finish = G_CALLBACK (mm_common_sierra_custom_init_finish), |
4602 | +- }; |
4603 | ++ static const guint16 vendor_ids[] = { 0x1199, 0 }; |
4604 | ++ static const gchar *drivers[] = { "qmi_wwan", "cdc_mbim", NULL }; |
4605 | + |
4606 | + return MM_PLUGIN ( |
4607 | + g_object_new (MM_TYPE_PLUGIN_SIERRA, |
4608 | + MM_PLUGIN_NAME, "Sierra", |
4609 | + MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems, |
4610 | ++ MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids, |
4611 | + MM_PLUGIN_ALLOWED_DRIVERS, drivers, |
4612 | + MM_PLUGIN_ALLOWED_AT, TRUE, |
4613 | + MM_PLUGIN_ALLOWED_QCDM, TRUE, |
4614 | + MM_PLUGIN_ALLOWED_QMI, TRUE, |
4615 | + MM_PLUGIN_ALLOWED_MBIM, TRUE, |
4616 | +- MM_PLUGIN_CUSTOM_INIT, &custom_init, |
4617 | +- MM_PLUGIN_ICERA_PROBE, TRUE, |
4618 | +- MM_PLUGIN_REMOVE_ECHO, FALSE, |
4619 | + NULL)); |
4620 | + } |
4621 | + |
4622 | +@@ -125,5 +112,4 @@ mm_plugin_sierra_class_init (MMPluginSie |
4623 | + MMPluginClass *plugin_class = MM_PLUGIN_CLASS (klass); |
4624 | + |
4625 | + plugin_class->create_modem = create_modem; |
4626 | +- plugin_class->grab_port = mm_common_sierra_grab_port; |
4627 | + } |
4628 | |
4629 | === added file 'debian/patches/novatel-common-library.patch' |
4630 | --- debian/patches/novatel-common-library.patch 1970-01-01 00:00:00 +0000 |
4631 | +++ debian/patches/novatel-common-library.patch 2015-09-25 10:05:24 +0000 |
4632 | @@ -0,0 +1,51 @@ |
4633 | +## Description: novatel common library which is backported from develop branch(1.5.x) to 1.0 |
4634 | +## Origin/Author: Aleksander Morgado <aleksander@lanedo.com> |
4635 | +## Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/trusty/+source/modemmanager/+bug/1441095 |
4636 | +## Source: http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=60a17df4c78d7bd9f27ca1425dba6c53298fd3d3 |
4637 | +commit 60a17df4c78d7bd9f27ca1425dba6c53298fd3d3 |
4638 | +Author: Aleksander Morgado <aleksander@aleksander.es> |
4639 | +Date: Fri Feb 6 15:55:18 2015 +0100 |
4640 | + |
4641 | + novatel: build a common non-inst library with the core Novatel modem support |
4642 | + |
4643 | +Index: modemmanager/plugins/Makefile.am |
4644 | +=================================================================== |
4645 | +--- modemmanager.orig/plugins/Makefile.am |
4646 | ++++ modemmanager/plugins/Makefile.am |
4647 | +@@ -319,6 +319,19 @@ libmm_plugin_iridium_la_SOURCES = \ |
4648 | + libmm_plugin_iridium_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
4649 | + libmm_plugin_iridium_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
4650 | + |
4651 | ++# Common Novatel modem support library |
4652 | ++noinst_LTLIBRARIES += libmm-utils-novatel.la |
4653 | ++libmm_utils_novatel_la_SOURCES = \ |
4654 | ++ novatel/mm-common-novatel.c \ |
4655 | ++ novatel/mm-common-novatel.h \ |
4656 | ++ novatel/mm-broadband-modem-novatel.c \ |
4657 | ++ novatel/mm-broadband-modem-novatel.h |
4658 | ++libmm_utils_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
4659 | ++libmm_utils_novatel_la_LIBADD = $(GUDEV_LIBS) $(MM_LIBS) |
4660 | ++ |
4661 | ++NOVATEL_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/novatel |
4662 | ++NOVATEL_COMMON_LIBADD_FLAGS = $(builddir)/libmm-utils-novatel.la |
4663 | ++ |
4664 | + # Novatel LTE modem |
4665 | + libmm_plugin_novatel_lte_la_SOURCES = \ |
4666 | + novatel/mm-plugin-novatel-lte.c \ |
4667 | +@@ -335,13 +348,10 @@ libmm_plugin_novatel_lte_la_LDFLAGS = $( |
4668 | + # Novatel non-LTE modem |
4669 | + libmm_plugin_novatel_la_SOURCES = \ |
4670 | + novatel/mm-plugin-novatel.c \ |
4671 | +- novatel/mm-plugin-novatel.h \ |
4672 | +- novatel/mm-common-novatel.c \ |
4673 | +- novatel/mm-common-novatel.h \ |
4674 | +- novatel/mm-broadband-modem-novatel.c \ |
4675 | +- novatel/mm-broadband-modem-novatel.h |
4676 | +-libmm_plugin_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
4677 | ++ novatel/mm-plugin-novatel.h |
4678 | ++libmm_plugin_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(NOVATEL_COMMON_COMPILER_FLAGS) |
4679 | + libmm_plugin_novatel_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) |
4680 | ++libmm_plugin_novatel_la_LIBADD = $(NOVATEL_COMMON_LIBADD_FLAGS) |
4681 | + |
4682 | + # Altair LTE modem |
4683 | + libmm_plugin_altair_lte_la_SOURCES = \ |
4684 | |
4685 | === added file 'debian/patches/novatel-custom-init.patch' |
4686 | --- debian/patches/novatel-custom-init.patch 1970-01-01 00:00:00 +0000 |
4687 | +++ debian/patches/novatel-custom-init.patch 2015-09-25 10:05:24 +0000 |
4688 | @@ -0,0 +1,392 @@ |
4689 | +## Description: novatel custome init which is backported from develop branch(1.5.x) to 1.0 |
4690 | +## Origin/Author: Aleksander Morgado <aleksander@lanedo.com> |
4691 | +## Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/trusty/+source/modemmanager/+bug/1441095 |
4692 | +## Source: http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=7c929b5cf19ca6fd3ed8c5667efc026df13046a1 |
4693 | +commit 7c929b5cf19ca6fd3ed8c5667efc026df13046a1 |
4694 | +Author: Aleksander Morgado <aleksander@aleksander.es> |
4695 | +Date: Fri Feb 6 15:30:50 2015 +0100 |
4696 | + |
4697 | + novatel: move custom init method to separate source files |
4698 | + |
4699 | +Index: modemmanager/plugins/Makefile.am |
4700 | +=================================================================== |
4701 | +--- modemmanager.orig/plugins/Makefile.am |
4702 | ++++ modemmanager/plugins/Makefile.am |
4703 | +@@ -336,6 +336,8 @@ libmm_plugin_novatel_lte_la_LDFLAGS = $( |
4704 | + libmm_plugin_novatel_la_SOURCES = \ |
4705 | + novatel/mm-plugin-novatel.c \ |
4706 | + novatel/mm-plugin-novatel.h \ |
4707 | ++ novatel/mm-common-novatel.c \ |
4708 | ++ novatel/mm-common-novatel.h \ |
4709 | + novatel/mm-broadband-modem-novatel.c \ |
4710 | + novatel/mm-broadband-modem-novatel.h |
4711 | + libmm_plugin_novatel_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) |
4712 | +Index: modemmanager/plugins/novatel/mm-common-novatel.c |
4713 | +=================================================================== |
4714 | +--- /dev/null |
4715 | ++++ modemmanager/plugins/novatel/mm-common-novatel.c |
4716 | +@@ -0,0 +1,165 @@ |
4717 | ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
4718 | ++/* |
4719 | ++ * This program is free software; you can redistribute it and/or modify |
4720 | ++ * it under the terms of the GNU General Public License as published by |
4721 | ++ * the Free Software Foundation; either version 2 of the License, or |
4722 | ++ * (at your option) any later version. |
4723 | ++ * |
4724 | ++ * This program is distributed in the hope that it will be useful, |
4725 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4726 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4727 | ++ * GNU General Public License for more details: |
4728 | ++ * |
4729 | ++ * Copyright (C) 2015 Aleksander Morgado <aleksander@aleksander.es> |
4730 | ++ */ |
4731 | ++ |
4732 | ++#include "mm-common-novatel.h" |
4733 | ++#include "mm-log.h" |
4734 | ++ |
4735 | ++ |
4736 | ++/*****************************************************************************/ |
4737 | ++/* Custom commands for AT probing */ |
4738 | ++ |
4739 | ++ |
4740 | ++/* We need to explicitly flip secondary ports to AT mode. |
4741 | ++ * We also use this command also for checking AT support in the current port. |
4742 | ++ */ |
4743 | ++static const MMPortProbeAtCommand custom_at_probe[] = { |
4744 | ++ { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, |
4745 | ++ { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, |
4746 | ++ { "$NWDMAT=1", 3, mm_port_probe_response_processor_is_at }, |
4747 | ++ { NULL } |
4748 | ++}; |
4749 | ++ |
4750 | ++/*****************************************************************************/ |
4751 | ++/* Custom init */ |
4752 | ++ |
4753 | ++typedef struct { |
4754 | ++ MMPortProbe *probe; |
4755 | ++ MMAtSerialPort *port; |
4756 | ++ GCancellable *cancellable; |
4757 | ++ GSimpleAsyncResult *result; |
4758 | ++ guint nwdmat_retries; |
4759 | ++ guint wait_time; |
4760 | ++} CustomInitContext; |
4761 | ++ |
4762 | ++static void |
4763 | ++custom_init_context_complete_and_free (CustomInitContext *ctx) |
4764 | ++{ |
4765 | ++ g_simple_async_result_complete_in_idle (ctx->result); |
4766 | ++ |
4767 | ++ if (ctx->cancellable) |
4768 | ++ g_object_unref (ctx->cancellable); |
4769 | ++ g_object_unref (ctx->port); |
4770 | ++ g_object_unref (ctx->probe); |
4771 | ++ g_object_unref (ctx->result); |
4772 | ++ g_slice_free (CustomInitContext, ctx); |
4773 | ++} |
4774 | ++ |
4775 | ++gboolean |
4776 | ++mm_common_novatel_custom_init_finish (MMPortProbe *probe, |
4777 | ++ GAsyncResult *result, |
4778 | ++ GError **error) |
4779 | ++{ |
4780 | ++ return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error); |
4781 | ++} |
4782 | ++ |
4783 | ++static void custom_init_step (CustomInitContext *ctx); |
4784 | ++ |
4785 | ++static void |
4786 | ++nwdmat_ready (MMAtSerialPort *port, |
4787 | ++ GString *response, |
4788 | ++ GError *error, |
4789 | ++ CustomInitContext *ctx) |
4790 | ++{ |
4791 | ++ if (error) { |
4792 | ++ if (g_error_matches (error, |
4793 | ++ MM_SERIAL_ERROR, |
4794 | ++ MM_SERIAL_ERROR_RESPONSE_TIMEOUT)) { |
4795 | ++ custom_init_step (ctx); |
4796 | ++ return; |
4797 | ++ } |
4798 | ++ |
4799 | ++ mm_dbg ("(Novatel) Error flipping secondary ports to AT mode: %s", error->message); |
4800 | ++ } |
4801 | ++ |
4802 | ++ /* Finish custom_init */ |
4803 | ++ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
4804 | ++ custom_init_context_complete_and_free (ctx); |
4805 | ++} |
4806 | ++ |
4807 | ++static gboolean |
4808 | ++custom_init_wait_cb (CustomInitContext *ctx) |
4809 | ++{ |
4810 | ++ custom_init_step (ctx); |
4811 | ++ return FALSE; |
4812 | ++} |
4813 | ++ |
4814 | ++static void |
4815 | ++custom_init_step (CustomInitContext *ctx) |
4816 | ++{ |
4817 | ++ /* If cancelled, end */ |
4818 | ++ if (g_cancellable_is_cancelled (ctx->cancellable)) { |
4819 | ++ mm_dbg ("(Novatel) no need to keep on running custom init in (%s)", |
4820 | ++ mm_port_get_device (MM_PORT (ctx->port))); |
4821 | ++ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
4822 | ++ custom_init_context_complete_and_free (ctx); |
4823 | ++ return; |
4824 | ++ } |
4825 | ++ |
4826 | ++ /* If device has a QMI port, don't run $NWDMAT */ |
4827 | ++ if (mm_port_probe_list_has_qmi_port (mm_device_peek_port_probe_list (mm_port_probe_peek_device (ctx->probe)))) { |
4828 | ++ mm_dbg ("(Novatel) no need to run custom init in (%s): device has QMI port", |
4829 | ++ mm_port_get_device (MM_PORT (ctx->port))); |
4830 | ++ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
4831 | ++ custom_init_context_complete_and_free (ctx); |
4832 | ++ return; |
4833 | ++ } |
4834 | ++ |
4835 | ++ if (ctx->wait_time > 0) { |
4836 | ++ ctx->wait_time--; |
4837 | ++ g_timeout_add_seconds (1, (GSourceFunc)custom_init_wait_cb, ctx); |
4838 | ++ return; |
4839 | ++ } |
4840 | ++ |
4841 | ++ if (ctx->nwdmat_retries > 0) { |
4842 | ++ ctx->nwdmat_retries--; |
4843 | ++ mm_at_serial_port_queue_command (ctx->port, |
4844 | ++ "$NWDMAT=1", |
4845 | ++ 3, |
4846 | ++ FALSE, /* raw */ |
4847 | ++ ctx->cancellable, |
4848 | ++ (MMAtSerialResponseFn)nwdmat_ready, |
4849 | ++ ctx); |
4850 | ++ return; |
4851 | ++ } |
4852 | ++ |
4853 | ++ /* Finish custom_init */ |
4854 | ++ mm_dbg ("(Novatel) couldn't flip secondary port to AT in (%s): all retries consumed", |
4855 | ++ mm_port_get_device (MM_PORT (ctx->port))); |
4856 | ++ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
4857 | ++ custom_init_context_complete_and_free (ctx); |
4858 | ++} |
4859 | ++ |
4860 | ++void |
4861 | ++mm_common_novatel_custom_init (MMPortProbe *probe, |
4862 | ++ MMAtSerialPort *port, |
4863 | ++ GCancellable *cancellable, |
4864 | ++ GAsyncReadyCallback callback, |
4865 | ++ gpointer user_data) |
4866 | ++{ |
4867 | ++ CustomInitContext *ctx; |
4868 | ++ |
4869 | ++ ctx = g_slice_new (CustomInitContext); |
4870 | ++ ctx->result = g_simple_async_result_new (G_OBJECT (probe), |
4871 | ++ callback, |
4872 | ++ user_data, |
4873 | ++ mm_common_novatel_custom_init); |
4874 | ++ ctx->probe = g_object_ref (probe); |
4875 | ++ ctx->port = g_object_ref (port); |
4876 | ++ ctx->cancellable = cancellable ? g_object_ref (cancellable) : NULL; |
4877 | ++ ctx->nwdmat_retries = 3; |
4878 | ++ ctx->wait_time = 2; |
4879 | ++ |
4880 | ++ custom_init_step (ctx); |
4881 | ++} |
4882 | +Index: modemmanager/plugins/novatel/mm-common-novatel.h |
4883 | +=================================================================== |
4884 | +--- /dev/null |
4885 | ++++ modemmanager/plugins/novatel/mm-common-novatel.h |
4886 | +@@ -0,0 +1,31 @@ |
4887 | ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
4888 | ++/* |
4889 | ++ * This program is free software; you can redistribute it and/or modify |
4890 | ++ * it under the terms of the GNU General Public License as published by |
4891 | ++ * the Free Software Foundation; either version 2 of the License, or |
4892 | ++ * (at your option) any later version. |
4893 | ++ * |
4894 | ++ * This program is distributed in the hope that it will be useful, |
4895 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4896 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4897 | ++ * GNU General Public License for more details: |
4898 | ++ * |
4899 | ++ * Copyright (C) 2015 Aleksander Morgado <aleksander@aleksander.es> |
4900 | ++ */ |
4901 | ++ |
4902 | ++#ifndef MM_COMMON_NOVATEL_H |
4903 | ++#define MM_COMMON_NOVATEL_H |
4904 | ++ |
4905 | ++#include "glib.h" |
4906 | ++#include "mm-plugin.h" |
4907 | ++ |
4908 | ++void mm_common_novatel_custom_init (MMPortProbe *probe, |
4909 | ++ MMAtSerialPort *port, |
4910 | ++ GCancellable *cancellable, |
4911 | ++ GAsyncReadyCallback callback, |
4912 | ++ gpointer user_data); |
4913 | ++gboolean mm_common_novatel_custom_init_finish (MMPortProbe *probe, |
4914 | ++ GAsyncResult *result, |
4915 | ++ GError **error); |
4916 | ++ |
4917 | ++#endif /* MM_COMMON_NOVATEL_H */ |
4918 | +Index: modemmanager/plugins/novatel/mm-plugin-novatel.c |
4919 | +=================================================================== |
4920 | +--- modemmanager.orig/plugins/novatel/mm-plugin-novatel.c |
4921 | ++++ modemmanager/plugins/novatel/mm-plugin-novatel.c |
4922 | +@@ -28,6 +28,7 @@ |
4923 | + #include <libmm-glib.h> |
4924 | + |
4925 | + #include "mm-plugin-novatel.h" |
4926 | ++#include "mm-common-novatel.h" |
4927 | + #include "mm-private-boxed-types.h" |
4928 | + #include "mm-broadband-modem-novatel.h" |
4929 | + #include "mm-log.h" |
4930 | +@@ -55,139 +56,6 @@ static const MMPortProbeAtCommand custom |
4931 | + }; |
4932 | + |
4933 | + /*****************************************************************************/ |
4934 | +-/* Custom init */ |
4935 | +- |
4936 | +-typedef struct { |
4937 | +- MMPortProbe *probe; |
4938 | +- MMAtSerialPort *port; |
4939 | +- GCancellable *cancellable; |
4940 | +- GSimpleAsyncResult *result; |
4941 | +- guint nwdmat_retries; |
4942 | +- guint wait_time; |
4943 | +-} CustomInitContext; |
4944 | +- |
4945 | +-static void |
4946 | +-custom_init_context_complete_and_free (CustomInitContext *ctx) |
4947 | +-{ |
4948 | +- g_simple_async_result_complete_in_idle (ctx->result); |
4949 | +- |
4950 | +- if (ctx->cancellable) |
4951 | +- g_object_unref (ctx->cancellable); |
4952 | +- g_object_unref (ctx->port); |
4953 | +- g_object_unref (ctx->probe); |
4954 | +- g_object_unref (ctx->result); |
4955 | +- g_slice_free (CustomInitContext, ctx); |
4956 | +-} |
4957 | +- |
4958 | +-static gboolean |
4959 | +-novatel_custom_init_finish (MMPortProbe *probe, |
4960 | +- GAsyncResult *result, |
4961 | +- GError **error) |
4962 | +-{ |
4963 | +- return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error); |
4964 | +-} |
4965 | +- |
4966 | +-static void custom_init_step (CustomInitContext *ctx); |
4967 | +- |
4968 | +-static void |
4969 | +-nwdmat_ready (MMAtSerialPort *port, |
4970 | +- GString *response, |
4971 | +- GError *error, |
4972 | +- CustomInitContext *ctx) |
4973 | +-{ |
4974 | +- if (error) { |
4975 | +- if (g_error_matches (error, |
4976 | +- MM_SERIAL_ERROR, |
4977 | +- MM_SERIAL_ERROR_RESPONSE_TIMEOUT)) { |
4978 | +- custom_init_step (ctx); |
4979 | +- return; |
4980 | +- } |
4981 | +- |
4982 | +- mm_dbg ("(Novatel) Error flipping secondary ports to AT mode: %s", error->message); |
4983 | +- } |
4984 | +- |
4985 | +- /* Finish custom_init */ |
4986 | +- g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); |
4987 | +- custom_init_context_complete_and_free (ctx); |
4988 | +-} |
4989 | +- |
4990 | +-static gboolean |
4991 | +-custom_init_wait_cb (CustomInitContext *ctx) |
4992 | +-{ |
4993 | +- custom_init_step (ctx); |
4994 | +- return FALSE; |
4995 | +-} |
4996 | +- |
4997 | +-static void |
4998 | +-custom_init_step (CustomInitContext *ctx) |
4999 | +-{ |
5000 | +- /* If cancelled, end */ |
Thanks but before doing a backport to trusty the issue should be fixed in wily...