Commit Graph

2669 Commits

Author SHA1 Message Date
Aleksander Morgado
45e8aa50df iface-modem-3gpp: when disabled, cleanup interface properties 2012-08-06 20:18:15 +02:00
Aleksander Morgado
278842108c iface-modem-3gpp: refactor registration sequences
Once upon a time it was a good idea to have separate steps for CS and PS related
actions, so that plugins could override specific steps with a great detail. That
idea turned out to be not very useful, as the only case which requires custom
CS/PS registration actions is the QMI-enabled modem, and that one has commands
to act on both registration actions at the same time. So, we now consolidate
all steps, so that the implementation of the interface needs to provide all the
logic to setup/enable/disable/cleanup/check registrations in each mode.

Also, we consolidate how the unsolicited registration messages are handled, so
that it's equivalent to other unsolicited messages:
 * 'Setup' will configure ports to process the unsolicited messages.
 * 'Enable' will tell the modem to send unsolicited messages.
 * 'Disable' will tell the modem not to send unsolicited messages.
 * 'Cleanup will configure ports to ignore the unsolicited messages.
2012-08-06 20:17:00 +02:00
Aleksander Morgado
01bb5cd660 iface-modem-cdma: new steps to enable/disable unsolicited events 2012-08-06 20:16:29 +02:00
Aleksander Morgado
779b293387 iface-modem-cdma: skip checks to see if unsolicited events are supported 2012-08-06 20:16:06 +02:00
Aleksander Morgado
4aaafc54c7 iface-modem-3gpp: removed the 'setup indicators' step
The previous logic would first request to check if indicators were supported,
and only then allow to setup/enable/cleanup/disable unsolicited events. This
behaviour is very specific to the generic 3GPP case, and therefore it shouldn't
be handled in the even more generic 3GPP interface. The logic is still kept,
but handled within the MMBroadbandModem object.
2012-08-06 20:15:41 +02:00
Aleksander Morgado
4d5892204d zte: use +CFUN=4 for powering down
Icera-based ZTE already has the same functionality coming from the parent
`MMBroadbandModemIcera' modem object.
2012-08-06 20:07:50 +02:00
Aleksander Morgado
f6415a71b6 device: keep all unsupported ports in a separate list
Ports being marked as unsupported should not be passed to the plugin specific
create_modem() or grab_port() methods.
2012-08-06 20:07:50 +02:00
Aleksander Morgado
1811bb015c plugin-manager: relaunch probing when suggestion comes to deferred tasks
If a port support task was deferred until suggested, do not assume that the
suggested plugin actually supports the port, instead re-launch support check.

This covers the cases where a net port appears in a modem which only supports
AT ports (e.g. Nokia case).
2012-08-06 20:07:50 +02:00
Aleksander Morgado
793218bfdb zte: plugin fully ported 2012-08-06 20:07:50 +02:00
Aleksander Morgado
73a420095f TODO: the ZTE MF637 doesn't like default setup fo messaging unsolicited messages 2012-08-06 20:07:49 +02:00
Aleksander Morgado
125f297434 zte: setup/cleanup unsolicited messages in Icera based modems 2012-08-06 20:07:49 +02:00
Aleksander Morgado
efe85fd1ab zte: use common unsolicited messages handler setup in Icera based modems 2012-08-06 20:07:49 +02:00
Aleksander Morgado
64dfa59c42 zte: use common unsolicited messages handler setup 2012-08-06 20:07:49 +02:00
Aleksander Morgado
a8516fa1f8 zte: new common code to setup unsolicited event handlers 2012-08-06 20:07:49 +02:00
Aleksander Morgado
1f2a7bd87c zte: try +CPMS? calls after SIM unlock until SIM gets ready 2012-08-06 20:07:49 +02:00
Aleksander Morgado
dcde1e0408 zte: carrier-detect disabled in serial ports 2012-08-06 20:07:49 +02:00
Aleksander Morgado
4cf4a98bba zte: support Icera-based modems
We request Icera support check during port probing, and we then decide which
modem object to create based on the check results.
2012-08-06 20:07:49 +02:00
Aleksander Morgado
855c0ec514 zte: implement access technology loading 2012-08-06 20:07:49 +02:00
Aleksander Morgado
169ccdf1d4 zte: implement allowed mode loading/setting 2012-08-06 20:07:49 +02:00
Aleksander Morgado
641c5aed06 zte: setup ports and unsolicited message handling 2012-08-06 20:07:49 +02:00
Aleksander Morgado
3b00c6f5ac zte: new `MMBroadbandModemZte' 2012-08-06 20:07:49 +02:00
Aleksander Morgado
bbb4ed2b0a zte: start porting the ZTE plugin 2012-08-06 20:07:49 +02:00
Aleksander Morgado
bdcc4becab nokia: no need specific port grabbing
The udev tags for port grabbing hints are for Icera-based Nokia modems only.
2012-08-06 20:07:27 +02:00
Aleksander Morgado
5c2df4a0ca nokia-icera: new plugin to handle Icera-based Nokia modems
We have a whole new plugin because the whole probing process is different
between the Icera and non-Icera based Nokia modems.
2012-08-06 20:07:27 +02:00
Aleksander Morgado
3b6a20dfb6 nokia: don't support Icera-based modems
Nokia CS Internet sticks are based on Icera chipsets; the default Nokia plugin
shouldn't handle them.
2012-08-06 20:07:27 +02:00
Aleksander Morgado
509ad94204 plugin: check if the current probe is the one with AT support before assuming it's not 2012-08-06 20:07:27 +02:00
Aleksander Morgado
edc9825788 plugin: let plugins request Icera support checks and Icera based filters 2012-08-06 20:07:27 +02:00
Aleksander Morgado
0b3eb27856 port-probe: include Icera support check in the probing sequence 2012-08-06 20:07:27 +02:00
Aleksander Morgado
5b96aa9db4 samsung: use generic power down of the Icera modem 2012-08-06 20:07:27 +02:00
Aleksander Morgado
53707357f3 icera: use +CFUN=4 for power down in all Icera modems 2012-08-06 20:07:27 +02:00
Aleksander Morgado
e9a367eb21 icera: remove `MMIfaceIcera' 2012-08-06 20:07:27 +02:00
Aleksander Morgado
7ad73e4fa3 samsung: make the modem object inherit from the `MMBroadbandModemIcera' 2012-08-06 20:07:27 +02:00
Aleksander Morgado
4f1269344f icera: create a generic broadband bearer when no net ports available 2012-08-06 20:07:27 +02:00
Aleksander Morgado
fa8bcb0a7f icera: allow specifying at modem/bearer level whether we want DHCP or STATIC 2012-08-06 20:07:27 +02:00
Aleksander Morgado
ef4de86b42 icera: new `MMBroadbandModemIcera'
We'll get rid of the `MMIfaceIcera'.
2012-08-06 20:07:27 +02:00
Dan Williams
e0c17f936f icera: implement dynamic band support checking
Turns out we can check supported bands by asking the modem what
the enabled state is for the bands it says it supports, and then
setting the enabled state to what it currently is.  For bands the
modem actually doesn't support, it'll return an error.  Use that
to build up the modem's actual supported band list.
2012-08-06 20:07:27 +02:00
Dan Williams
ea024f2e52 samsung: use generic Icera band handling functions 2012-08-06 20:07:27 +02:00
Dan Williams
a532c081d1 icera: add generic band handling functions 2012-08-06 20:07:27 +02:00
Dan Williams
b1c2e0ba5f samsung: use generic Icera unlock retries checking functions 2012-08-06 20:07:27 +02:00
Dan Williams
abfce5493c icera: add generic unlock retries checking 2012-08-06 20:07:27 +02:00
Aleksander Morgado
36924d8f82 samsung: add Samsung Electronics, Inc. as copyright owners
They actually wrote the original Samsung plugin in ModemManager 0.5.
2012-08-06 20:07:27 +02:00
Aleksander Morgado
2bf2b8e848 samsung: new `MMBroadbandBearerSamsung'
Based on the Icera bearer, but using DHCP in the net port.
2012-08-06 20:07:27 +02:00
Aleksander Morgado
39bb356fe5 TODO: add task to update drivers info in the Modem iface 2012-08-06 20:07:26 +02:00
Aleksander Morgado
97730df9c7 TODO: we should retry Icera authentication command 2012-08-06 20:07:26 +02:00
Aleksander Morgado
d861ad1d57 TODO: add task to check if HSO disconnection needs to get updated 2012-08-06 20:07:26 +02:00
Aleksander Morgado
93252f39ef icera: avoid highly unlikely use of already unref-ed bearer
In the connection and disconnection sequences, we make sure that the Bearer
object is valid by keeping a reference in the Dial3gppContext and
Disconnect3gppContext (actually, another one kept by the GSimpleAsyncResult as
well). But we are considering here the case where the context is completed and
freed by an unsolicited message handler before we get the reply to the AT
command, so to properly ensure that the bearer object is still valid when we try
to check if the context is in the priv struct, we need to keep an extra ref
around.
2012-08-06 20:07:26 +02:00
Aleksander Morgado
40730b115e hso: avoid highly unlikely use of already unref-ed bearer
In the connection sequence, we make sure that the Bearer object is valid by
keeping a reference in the Dial3gppContext (actually, another one kept by the
GSimpleAsyncResult as well). But we are considering here the case where the
connection context is completed and freed by an unsolicited message handler
before we get the reply to the AT command, so to properly ensure that the bearer
object is still valid when we try to check if the context is in the priv struct,
we need to keep an extra ref around.
2012-08-06 20:07:26 +02:00
Aleksander Morgado
63a45f8082 hso: avoid trying to use an already freed context
In the connection sequence, we keep the context in the private info of the
Bearer object, so that we can complete and free it when we receive OWANCALL
unsolicited messages. Now, the reply of the OWANCALL itself may get processed
as an unsolicited message, so effectively we're processing and finishing the
connection/disconnection context *before* we process the reply of the AT
command.

This patch ensures that we do not try to re-use the connection context after it
has been processed by the unsolicited messages handler.
2012-08-06 20:07:26 +02:00
Aleksander Morgado
d065dd572b icera: avoid trying to use an already freed context
In both the connection and disconnection sequences, we keep the context in the
private info of the Bearer object, so that we can complete and free it when we
receive %IPDPACT unsolicited messages. Now, the reply of the %IPDPACT itself may
get processed as an unsolicited message, so effectively we're processing and
finishing the connection/disconnection context *before* we process the reply of
the AT command.

This patch ensures that we do not try to re-use the connection/disconnection
context after it has been processed by the unsolicited messages handler.
2012-08-06 20:07:26 +02:00
Ben Chan
e18778d815 samsung: fix crash due to uninitialized GError variables
BUG=chromium-os:32475
TEST=emerge modemmanager-next

Change-Id: I8dad924dae9a249c3b9235786226b7dd40bd8819
2012-08-06 20:07:26 +02:00