Commit Graph

8604 Commits

Author SHA1 Message Date
Denis Kenzior d5f117be80 util: Convert pack7_bit / unpack_7bit to use l_malloc 2018-12-27 18:18:51 -06:00
Denis Kenzior 4e74b7b182 build: add $(ell_ldadd) to unit tests 2018-12-27 18:18:51 -06:00
Denis Kenzior c2b68f20b3 drivers: Update to the new util api 2018-12-27 18:18:51 -06:00
Denis Kenzior ea172514a2 unit: update to the new util api 2018-12-27 18:18:51 -06:00
Denis Kenzior 70c70a67b0 util: Use bool instead of gboolean 2018-12-27 18:18:51 -06:00
Denis Kenzior 674b28f150 util: Use L_ARRAY_SIZE instead of TABLE_SIZE 2018-12-27 18:18:51 -06:00
Denis Kenzior 506243ef67 idmap: Remove
This has now been replaced by l_uintset
2018-12-19 14:46:08 -06:00
Denis Kenzior ed26a0e7a9 unit: Remove test-idmap
No longer used by ofono
2018-12-19 14:46:08 -06:00
Denis Kenzior ab55f2f811 gprs: Use l_uintset instead of idmap 2018-12-19 14:46:08 -06:00
Denis Kenzior 0b5ed6049a build: Add uintset.[ch] to ell files 2018-12-19 14:46:08 -06:00
Marcel Holtmann 7c2f9c77de Release 1.27 2018-12-19 15:56:11 +01:00
Antara Borwankar 20b1e957cb xmm7modem: modified ofono.conf for coex agent
Added coex agent interface to ofono.conf
2018-12-13 10:11:23 -06:00
Denis Kenzior a10f444a3e xmm7xxx: Various style cleanups 2018-12-13 10:11:00 -06:00
Antara Borwankar 06d16faeda xmm7modem: implemnetation of coexistence functionality
Added coex implementation in xmm7modem plugin
2018-12-13 10:03:05 -06:00
Pau Espin 1749018577 qmi: Fix Secondary DNS overwriting Primary DNS
inet_ntoa was called twice in a row and as a result both primay and
secondary DNS were pointing to same static buffer containing last
value (secondary DNS).

As a result, ofono always advertised the secondary DNS twice through
DBus ConnectionContext.GetProperties 'DomainNameServers'.

Related: https://osmocom.org/issues/3031
2018-12-11 14:14:40 -06:00
Antara Borwankar 2680a41bd3 doc: Adding documetation for intel LTE coex
Added intel-lte-coex-api.txt which defines LTE coexistence
interface for intel modems.
2018-12-05 14:59:40 -06:00
Marcel Holtmann 6af93ebf03 build: Include ell/timeout.[ch] into ELL sources list 2018-12-05 21:52:00 +01:00
Nandini Rebello df11a63e3f test: Fix number of arguments check in change-pin
Fix the number of arguments checked in second case of change-pin.
2018-11-27 08:44:51 -06:00
Nandini Rebello 68ea576628 xmm7xxx: Adding case for SIM PIN locked state
Handling the case when SIM PIN is enabled for xmm7xxx modem.
2018-11-27 08:44:07 -06:00
Clement Viel 3f6f108a16 sim800: add sim800 support 2018-11-14 14:33:37 -06:00
Clement Viel 460217abd6 sim800: merge sim800 and sim900 documentation. 2018-11-12 19:24:35 -06:00
Marcel Holtmann 443d571c45 README: Add information about ELL when building from sources 2018-11-08 21:26:52 +01:00
Marcel Holtmann 6f431e2d70 main: Remove leftover HAVE_ELL conditions 2018-11-01 20:54:37 +01:00
Marcel Holtmann ad8a8a90a2 Release 1.26 2018-10-31 23:42:40 +01:00
Marcel Holtmann 2a5c9cf0f2 mbimmodem: Convert back to using __builtin_bswap16 with proper indexing 2018-10-31 21:03:49 +01:00
Marcel Holtmann 2df69194ac mbimmodem: Fix conversion of strings into UTF16-LE on big endian 2018-10-31 21:00:38 +01:00
Marcel Holtmann 63ed2c2080 mbimmodem: Fix endian issue with UTF16-LE to UTF16-CPU conversion 2018-10-31 20:42:14 +01:00
Denis Kenzior 4029ef3a11 mbimmodem: Fix compilation on 32-bit
CC       drivers/mbimmodem/mbim.o
drivers/mbimmodem/mbim.c: In function ‘command_write_handler’:
drivers/mbimmodem/mbim.c:490:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘size_t’ [-Wformat=]
   l_info("n_iov: %lu, %lu", n_iov + 1, (size_t) written);
   ^
drivers/mbimmodem/mbim.c:490:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘unsigned int’ [-Wformat=]
drivers/mbimmodem/mbim.c: In function ‘command_read_handler’:
drivers/mbimmodem/mbim.c:649:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘size_t’ [-Wformat=]
  l_info("header_offset: %lu", device->header_offset);
  ^
drivers/mbimmodem/mbim.c:650:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘size_t’ [-Wformat=]
  l_info("segment_bytes_remaining: %lu", device->segment_bytes_remaining);
  ^
2018-10-31 14:20:00 -05:00
Nandini Rebello 157258eb2d udevng: enhance udev detection for intel 7xxx modems
Handle newer 7xxx modem enumeration based on ProductId.
Preserving the previous gen support too.
2018-10-31 14:20:00 -05:00
Marcel Holtmann b56139e80b mbim: Add the missing mbim-private.h header into packages 2018-10-31 20:15:11 +01:00
Marcel Holtmann 8452a7f349 build: Add support for internal and external Embedded Linux library 2018-10-31 19:58:10 +01:00
Denis Kenzior 814f7fc744 gemalto: Use GEMALTO vendor for netreg 2018-10-29 15:03:03 -05:00
Giacinto Cifelli d7bb1d9254 atmodem: remove vendor Cinterion 2018-10-29 15:01:50 -05:00
Giacinto Cifelli edac159aa5 cinterion: use Gemalto vendor in netreg 2018-10-29 15:01:22 -05:00
Giacinto Cifelli 713585963f atmodem: Change cinterion prefix to gemalto 2018-10-29 15:00:44 -05:00
Giacinto Cifelli a429950f2f atmodem: change vendor cinterion to gemalto 2018-10-29 15:00:05 -05:00
Giacinto Cifelli 261a30f799 gemalto: Use Gemalto vendor for LTE atom 2018-10-29 14:59:23 -05:00
Jonas Bonn 652a717f3a modem: global data is pre-zeroed
Module-local and global data are BSS symbols and don't require
zero-initialization.
2018-10-29 14:04:50 -05:00
Jonas Bonn ec3c6c67af stkutil: remove test for impossible condition
'string' is an array and therefore never NULL so this test always fails.
2018-10-29 13:59:19 -05:00
Jonas Bonn a1141ae393 qmimodem: prevent use of unitialized variable
'index' may not be initialized in the error path so don't try to print a
message with it.
2018-10-29 13:35:01 -05:00
Jonas Bonn ab4460690d mbim: remove unused modem data
Neither the Vendor nor Model strings are used by the mbim plugin.
2018-10-29 13:34:07 -05:00
Jonas Bonn 1e176755af atmodem: enlarge command buffer
The ofono phone number max length is 80 so a buffer size of 64 is
obviously insufficient.  Expanding the buffer to 128 prevents a
potential failure and suppresses the folowing compiler warning:

../drivers/atmodem/sms.c: In function ‘at_csca_set’:
../drivers/atmodem/sms.c:108:40: warning: ‘%s’ directive output may be truncated writing up to 80 bytes into a region of size 55 [-Wformat-truncation=]
  snprintf(buf, sizeof(buf), "AT+CSCA=\"%s\",%d", sca->number, sca->type);
                                        ^~
../drivers/atmodem/sms.c:108:2: note: ‘snprintf’ output between 13 and 103 bytes into a destination of size 64
  snprintf(buf, sizeof(buf), "AT+CSCA=\"%s\",%d", sca->number, sca->type);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-10-29 13:33:56 -05:00
Jonas Bonn 85cf3c8aa9 test: use python3 for set-ddr 2018-10-29 13:32:56 -05:00
Giacinto Cifelli d093aa3960 doc/common-patterns.txt: initial version 2018-10-25 13:55:00 -05:00
Denis Kenzior dd6ae48d19 atmodem: Make sure to use none_prefix
Otherwise all unsolicited notifications would also be consumed when
invoking +CGAUTH/+CGDCONT
2018-10-25 13:51:57 -05:00
Giacinto Cifelli c1f7135261 atmodem: Add proto and authentication handling to lte
The ofono_lte_default_attach_info now handles also the protocol and the
authentication method, username and password.

Co-authored-by: Martin Baschin <martin.baschin@googlemail.com>
2018-10-25 11:15:59 -05:00
Giacinto Cifelli eed785a4d7 atmodem: Add reference counting to cb_data
the cb_data can be used by creating the structure with cb_data_new,
and then there are two possibilities:
- use it in a single callback function, and destroy it with a call to
  g_free.
  Example:
  - calling function:
    struct cb_data *cbd = cb_data_new(cb, data);
    if (g_at_chat_send(chat, buf, NULL, at_cgatt_cb, cbd, g_free) > 0)
	return;
    g_free(cbd);
  - called function (here at_cgatt_cb):
	static void at_cgatt_cb(gboolean ok, GAtResult *result,
						gpointer user_data)
	{
		struct cb_data *cbd = user_data;
		ofono_gprs_cb_t cb = cbd->cb;
		struct ofono_error error;

		decode_at_error(&error,
				g_at_result_final_response(result));

		cb(&error, cbd->data);
	}
    note the absence of explicit g_free(cbd);

- pass it through a train of callback functions, adding a reference at
  each pass cb_data_ref, and removing it with cb_data_unref.
  the use of cb_data_ref would replace a new object creation, while the
  use of cb_data_unref the use of g_free.
  Example:
  - calling function:
	struct cb_data *cbd = cb_data_new(cb, data);
	// no cb_ref at the creation
	if (g_at_chat_send(chat, buf, NULL,
				at_lte_set_default_attach_info_cb,
				cbd, cb_data_unref) > 0)
		goto end;
	cb_data_unref(cbd);
  - called function 1 (at_lte_set_default_attach_info_cb):
	static void at_lte_set_default_attach_info_cb(gboolean ok,
				GAtResult *result, gpointer user_data)
	{
		struct cb_data *cbd = user_data;

		cbd = cb_data_ref(cbd);
		if (g_at_chat_send(chat, buf, NULL,
				at_cgatt_cb, cbd, cb_data_unref) > 0)
			return;
		cb_data_unref(cbd);
	}
  - called function 2 (at_cgatt_cb):
    like above. no call to g_free or cb_data_unref. The terminal function
    doesn't need to know about the reference scheme.
2018-10-25 10:55:09 -05:00
Giacinto Cifelli f20da0e7f9 modem: Implement ofono_modem_set_timeout_hint
this patch provides the handling for the modem-depending powered timeout

It provides the trivial implementation for
ofono_modem_set_powered_timeout_hint, introducing the ofono_modem
variable timeout_hint, used together with the existing ofono_modem
variable timeout.

The default value, previously hardcoded as a magic number, is provided
by the DEFAULT_POWERED_TIMEOUT define and set as soon as the
ofono_modem struct is created, and then can be overwritten by the
aforementioned ofono_modem_set_powered_timeout_hint.
2018-10-24 14:32:02 -05:00
Giacinto Cifelli 13467d5dcb include: add ofono_modem_set_powered_timeout_hint
function to set the powered timeout for those cases where a device might
require longer time to boot (uncommon).

The function is effective if called before Powered=true,
so it is best called by modem detection logic and prior to calling
ofono_modem_register.
2018-10-24 14:26:59 -05:00
Giacinto Cifelli 92bf7fb867 atmodem: added Gemalto vendor quirk for +CNMI 2018-10-23 09:54:59 -05:00