Tamer Hassan
c7e95bb41f
egismoc: add 0587 support (also supports 0586 but missing device file)
2024-08-30 04:42:56 +02:00
Marco Trevisan (Treviño)
666cd0c08d
egismoc: Use FpiByteReader to compute the check bytes
...
We can read the values in the proper format without having to
deal with endianness ourself, so let's do this instead of manual
labor.
2024-02-20 18:07:18 +01:00
Marco Trevisan (Treviño)
e055781006
egismoc: Use FpiByteWriter to allocate the commit payload
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
48c8c539c7
egismoc: Use FpiByteWriter to generate the get check command
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
40c7599fb1
egismoc: Compute the delete command using FpiByteWriter
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
28c26c7d7e
egismoc: Use FpiByteReader to read the enrolled IDs
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
dd5a71695f
egismoc: Use FpiByteWriter to prepare the command message
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
977d324970
egismoc: Do not store twice the number of enrolled IDs
...
We already store it in the array, so let's just use that value
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
3e5ab6fdad
egismoc: Convert value check values to big endian only when needed
...
Since the driver seem to require a big-endian value it's just better
to use architecture native endianness to compute the check value and
eventually just convert to big endian as the chip wants.
2024-02-19 23:38:40 +01:00
Marco Trevisan (Treviño)
5462db9901
egismoc: Convert the check value to little endian
...
In this way we can support the big-endian architectures too.
2024-02-19 23:38:40 +01:00
Marco Trevisan (Treviño)
59dc585ccd
egismoc: Simplify check bytes computation
...
We use big endian values for generating the check bytes, but we can do
the same logic in a simpler way.
2024-02-19 23:38:40 +01:00
Marco Trevisan (Treviño)
6768bd0ff4
egismoc: Use strictly sized types to hold check bytes contents
...
So we are sure about the size we're sending at compile time too.
2024-02-19 23:38:40 +01:00
Marco Trevisan (Treviño)
f8f28a066b
egismoc: Simplify fingerprint id and firmware reading
...
We can do copy and duplicate in oneshot since we are handling strings
after all.
2024-02-19 17:25:21 +01:00
Marco Trevisan (Treviño)
adc66edd8d
egismoc: Implement suspension properly
...
In case of suspension we can't just cancel the operations but
also return when completed, and this may not happen immediately
if there are ongoing operations.
This is automagically handled by libfprint internals, but in order
to make it happen, we need to cancel the ongoing operations and then
mark it completed. libfprint will then wait for the task completion
before actually marking the device as suspended.
2024-02-19 17:21:58 +01:00
Marco Trevisan (Treviño)
9af211cc89
egismoc: Use device cancellable on transfers
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
904bddd988
egismoc: Use g_new0 instead of g_malloc to make the type clearer
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
8badfa84e9
egismoc: Assert that current transfer is unset when setting it
...
We need to ensure that we are not overwriting the instance transfer, so
that we can be sure that we are only doing one transfer at time.
Also we need to ensure that the ssm unsetting it, is the owner of it.
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
b97efa6fed
egismoc: Assert that task ssm is unset when setting it
...
We need to ensure that we are not overwriting the instance SSM, so that
we can be sure that we are only doing one operation at time.
Also we need to ensure that the task unsetting it, is the owner of it.
2024-02-19 17:12:12 +01:00
Joshua Grisham
591f9ad3cf
egismoc: clear task pointers also after dev_init_done
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
6767cd1a4f
egismoc: Ensure that the command callback is after SSM is completed
...
We need to make sure that we won't trigger a callback when a SSM is
already in progress or we may end up overwriting it
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
226b6abfab
egismoc: Use an autopointer to cleanup error on command done callback
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
9e2c14d64e
egismoc: Clarify delete print ownership in delete callback
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
92aeb53ee8
egismoc: Simplify egismoc identification stage handling
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
87f68e3ac1
egismoc: Avoid gotos in init code, just handle the errors immediately
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
8073a5dc34
egismoc: Remove unused increments
...
This is also to please static analyzer
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
eb09156244
egismoc: Clear enrolled IDs using nicer GLib api
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
b8cfb95b49
egismoc: Ensure we've enough null bytes at the end of strings
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
a7843add0f
egismoc: Do not initialize to zero twice
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
b0f0322726
egismoc: Indentation and syntax fixes
2024-02-19 17:12:12 +01:00
Joshua Grisham
85da0e104b
egismoc: add support for 1c7a:05a1
2024-02-19 16:16:02 +01:00
Joshua Grisham
47fe3668e4
egismoc: Return truncated text instead of null for description when using list
2024-02-19 16:16:02 +01:00
Joshua Grisham
7aae2181e2
egismoc: Add support for usernames longer than 8 chars
2024-02-19 16:16:02 +01:00
Joshua Grisham
a9269980eb
egismoc: Fix crash during close
2024-02-19 16:16:02 +01:00
Joshua Grisham
0b9a64331f
Initial commit of egismoc driver
2024-02-19 16:16:02 +01:00