| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
The bug being fixed in this commit was introduced in the following commit:
b98a418 samsung-ipc: sec: switch to Linux code style
b98a4188db6350794e8e7139065d71a25314e18c
With that bug, on Replicant 6.0 0004 RC2, the SIM card is not found
anymore, but some modem functionality still worked like getting the
IMEI through the settings.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the callbacks.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the callbacks.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the callbacks.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the callbacks.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the callbacks.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the callbacks.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This has several advantages:
- It makes the header context more obvious: #include "xmm626.h" could
mislead people into thinking that the xmm626.h header is in the same
directory than the file using that directive, while it is instead in
another location. This in turn could make people suppose that there
is a "xmm626.h" header specific to the galaxys2 driver.
Instead the #include "modems/xmm616/xmm616.h" directive is much more
clear.
- We can have two headers with the same filename.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The way <> and "" are included are implementation defined according to
the C18 standard[1]:
A preprocessing directive of the form
# include < h-char-sequence > new-line
searches a sequence of implementation-defined places for a header
identified uniquely by the specified sequence between the < and >
delimiters, and causes the replacement of that directive by the entire
contents of the header. How the places are specified or the header
identified is implementation-defined.
A preprocessing directive of the form
# include " q-char-sequence " new-line
causes the replacement of that directive by the entire contents of the
source file identified by the specified sequence between the "
delimiters. The named source file is searched for in an
implementation-defined manner. If this search is not supported, or if
the search fails, the directive is reprocessed as if it read
And the GCC documentation has the following on #include directives[2]:
Both user and system header files are included using the preprocessing
directive ‘#include’. It has two variants:
#include <file>
This variant is used for system header files. It searches for a file
named file in a standard list of system directories. You can prepend
directories to this list with the -I option (see Invocation).
#include "file"
This variant is used for header files of your own program. It searches
for a file named file first in the directory containing the current
file, then in the quote directories and then the same directories used
for <file>. You can prepend directories to the list of quote
directories with the -iquote option.
References:
-----------
[1]The standard doesn't seem to be available for free, but the draft
can be downloaded from the following URL:
https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
[2]https://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
xmm626_modem_prj.h uses the MAX_IPC_DEV define and the modem_link
enum which come from xmm626_modem_if.h
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains no functional changes.
"unsigned" was changed to "unsigned int" because
checkpatch.pl was printing the following warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
According to the C18 standard[1], "unsigned" is the same as
"unsigned int": in the "6.7 Declarations" section we have:
"- unsigned, or unsigned int" [...]
Each of the comma-separated multisets designates the same type [...]
References:
-----------
[1]The standard doesn't seem to be available for free, but the draft
can be downloaded from the following URL:
https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains no functional changes.
"unsigned" was changed to "unsigned int" because
checkpatch.pl was printing the following warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
According to the C18 standard[1], "unsigned" is the same as
"unsigned int": in the "6.7 Declarations" section we have:
"- unsigned, or unsigned int" [...]
Each of the comma-separated multisets designates the same type [...]
References:
-----------
[1]The standard doesn't seem to be available for free, but the draft
can be downloaded from the following URL:
https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains no functional changes.
The commented out code if any has also been preserved as it
could be relevant to the understanding of the code.
It will be kept until we understand why the code has been
commented. In that case we either need to remove it completely
or to replace it by a comment explaining why not having that
code was necessary.
For __FUNCTION__, according to checkpatch.pl, it's gcc
specific:
WARNING: __func__ should be used instead of gcc specific __FUNCTION__
However __func__ is part of the C18 standard[1]. In the
"6.4.2.2 Predefined identifiers" section, we have:
"The identifier __func__ shall be implicitly declared by
the translator as if, immediately following the opening
brace of each function definition, the declaration
static const char __func__[] = "function-name";
"
Using symbolic permissions for file mode triggered a
checkpatch.pl warning:
WARNING: Symbolic permissions
'S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH' are not
preferred. Consider using octal permissions '0644'.
The rationale behind that is that octal is generally easier
to understand than the symbolic relresentation. For more
information, see the follwoing Linux commit:
f90774e1fd27 checkpatch: look for symbolic permissions and suggest octal instead
References:
-----------
[1]The standard doesn't seem to be available for free, but the draft
can be downloaded from the following URL:
https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains no functional changes.
The commented out code if any has also been preserved as it
could be relevant to the understanding of the code.
It will be kept until we understand why the code has been
commented. In that case we either need to remove it completely
or to replace it by a comment explaining why not having that
code was necessary.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains no functional changes.
The commented out code if any has also been preserved as it
could be relevant to the understanding of the code.
It will be kept until we understand why the code has been
commented. In that case we either need to remove it completely
or to replace it by a comment explaining why not having that
code was necessary.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains no functional changes.
The commented out code if any has also been preserved as it
could be relevant to the understanding of the code.
It will be kept until we understand why the code has been
commented. In that case we either need to remove it completely
or to replace it by a comment explaining why not having that
code was necessary.
For __FUNCTION__, according to checkpatch.pl, it's gcc
specific:
WARNING: __func__ should be used instead of gcc specific __FUNCTION__
However __func__ is part of the C18 standard[1]. In the
"6.4.2.2 Predefined identifiers" section, we have:
"The identifier __func__ shall be implicitly declared by
the translator as if, immediately following the opening
brace of each function definition, the declaration
static const char __func__[] = "function-name";
"
References:
-----------
[1]The standard doesn't seem to be available for free, but the draft
can be downloaded from the following URL:
https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
| |
This contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains no functional changes.
The commented out code if any has also been preserved as it
could be relevant to the understanding of the code.
It will be kept until we understand why the code has been
commented. In that case we either need to remove it completely
or to replace it by a comment explaining why not having that
code was necessary.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains no functional changes.
The commented out code if any has also been preserved as it
could be relevant to the understanding of the code.
It will be kept until we understand why the code has been
commented. In that case we either need to remove it completely
or to replace it by a comment explaining why not having that
code was necessary.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains no functional changes.
The commented out code if any has also been preserved as it
could be relevant to the understanding of the code.
It will be kept until we understand why the code has been
commented. In that case we either need to remove it completely
or to replace it by a comment explaining why not having that
code was necessary.
For __FUNCTION__, according to checkpatch.pl, it's gcc
specific:
WARNING: __func__ should be used instead of gcc specific __FUNCTION__
However __func__ is part of the C18 standard[1]. In the
"6.4.2.2 Predefined identifiers" section, we have:
"The identifier __func__ shall be implicitly declared by
the translator as if, immediately following the opening
brace of each function definition, the declaration
static const char __func__[] = "function-name";
"
References:
-----------
[1]The standard doesn't seem to be available for free, but the draft
can be downloaded from the following URL:
https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains no functional changes.
The commented out code if any has also been preserved as it
could be relevant to the understanding of the code.
It will be kept until we understand why the code has been
commented. In that case we either need to remove it completely
or to replace it by a comment explaining why not having that
code was necessary.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains no functional changes.
The commented out code if any has also been preserved as it
could be relevant to the understanding of the code.
It will be kept until we understand why the code has been
commented. In that case we either need to remove it completely
or to replace it by a comment explaining why not having that
code was necessary.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains no functional changes.
The commented out code if any has also been preserved as it
could be relevant to the understanding of the code.
It will be kept until we understand why the code has been
commented. In that case we either need to remove it completely
or to replace it by a comment explaining why not having that
code was necessary.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the callbacks.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the callbacks.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the callbacks.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The XMM626 is the modem model, and SEC is a reference to
Samsung Electronics.
However, in practice the xmm626_sec_modem file and
functions are tied to a specific kernel interface which is
not upstream.
In CyanogenMod, LineageOS and Replicant (up to the 6.0
version), most of the devices supported by libsamsung-ipc
use a kernel named android_kernel_samsung_smdk4412, which
implements this interface.
So it is more clear to use a name that reflects that
instead of using the generic xmm626_sec_modem name.
Even if SMDK4412 is also a Samsung evaluation board for the
Exynos 4412 System on a chip, the kernel name is probably
way more known to people working on supporting devices with
an XMM626 modem in libsamsung-ipc.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the callbacks.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the callbacks.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the handlers:
ipc_client_log needs access to the ipc_client struct to
work.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This enables to use logging inside the handlers:
ipc_client_log needs access to the ipc_client struct to
work.
At this point the ipc_client struct is already available,
so it is safe to do that.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With:
./configure CC=clang CFLAGS=-W -Wall -Wno-unused \
--no-create --no-recursion
we have:
rfs.c:86:20: warning: comparison of integers of
different signs: '__off_t' (aka 'long') and 'size_t'
(aka 'unsigned int') [-Wsign-compare]
if (st.st_size != size) {
~~~~~~~~~~ ^ ~~~~
rfs.c:146:20: warning: comparison of integers of
different signs: '__off_t' (aka 'long') and 'size_t'
(aka 'unsigned int') [-Wsign-compare]
if (st.st_size != size) {
~~~~~~~~~~ ^ ~~~~
This is caused by the following code:
size_t size;
[...]
rc = stat([...], &st);
if (st.st_size != size) {
[...]
}
However the type of size is wrong as the stat system call
returns a stat structure which has the following field:
off_t st_size; /* Total size, in bytes */
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With:
./configure CC=clang CFLAGS=-W -Wall -Wno-unused \
--no-create --no-recursion
we have:
CC ipc.lo
ipc.c:71:16: warning: comparison of integers of
different signs: 'size_t' (aka 'unsigned int') and
'int' [-Wsign-compare]
if (length == -1)
~~~~~~ ^ ~~
This is caused by the following code:
size_t length;
[...]
length = read(fd, &buffer, sizeof(buffer));
if (length == -1)
goto error;
However, as per the function definition, read uses ssize_t
which is the signed version of size_t:
ssize_t read(int fd, void *buf, size_t count);
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
This makes it more clear that the headers are specific to the xmm626
modem.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|