Age | Commit message (Collapse) | Author | Files | Lines |
|
the l1s signal was an old mechanism between l1test and the layer1
before we introduced the L1CTL protocol. This commit removes all
leftover references to it.
It also disables the l1test app, as it would no longer work without
major modifications (using l1ctl from within the phone).
|
|
The idea is that the L1S part can schedule a completion handler which
will then execute in the asynchronous L1A part. This should keep the
FIQ priority L1S extremely short, deferring most of the work into
the L1A part that runs in regular process context.
|
|
|
|
|
|
|
|
|
|
We try to prevent switching task at a bad time. The algorithm
just tries to find the first fn at which it's safe to activate
a previously disabled task.
tasks -> Running tasks
tasks_tgt -> What we aim to run
Since tasks_tgt is still only read, it's safe for the l1a to
modify it without locking.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
There was some code meddling with mf_tasks directly. This is
fine if it's just setting/clearing a bit but since we're
gonna need some 'cleverness' into when to activate what to prevent
conflict, it's better to abstract that logic.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
Previously, it returned the number of item + number of frames spanned
by the set. But that value isn't that useful and wasn't used by anyone.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
|
|
Additional initialisations for the UART to make the data corruption
from the PC to the Phone go away.
I've seen a lot of systematic character swaps on the serial port,
especially in the vincinity of 0-bytes. As the XON/XOFF registers
are the only thing in the UART that look like they would consider
the actual data sent, I've added this initialisation to uart.c
This makes the problem go away completely on my C123.
To check for it I've added CRCs to the HDLC protocol and checked
for bad frames, and also compared them in a (patched) osmocon
that just sends random garbate in a special DLCI. The bad
frames I observed always looked like this (number in
parenthesis define number of omitted bytes, for brevity):
<------ good bytes ----------> <-recvd|sent-> <----- identical again
------>
d0 e0 00 00..(107)..f7 ce 17 c4 < 0c 00|00 0c > db 70 ba cb..(67)..d8 6d 3a 1f
31 e1 00 00..(47)..38 ca 2f e5 < 0c 00|00 0c > f8 a3 77 5f..(127)..5b 72 ff 4a
<-- good -> <--- bad -----> <---- good again ------------->
dc e1 00 00 < 0c 00|00 0c > 87 cb 24 83..(178)..2f 69 b3 51
ae e2 00 00..(167)..bd 18 6f a1 < 0c 00|00 0c > 2f 53 d2 b2..(7)..da c7 1b 63
dc e3 00 00..(131)..8e 2c b0 a8 < 0c 00|00 0c > 40 62 56 5f..(43)..f0 3a 47 f7
Formerly I was observing about 10 packets for every 2000 sent (with 192
bytes of payload each). Now, with the added initialisation, I see
(as the time of writing this email) 12000 packets with 192 bytes each
sent, with 0 bytes missing, corrupted, flipped).
|
|
* bit 8 always needs to be 1 when overriding the setting of the nIBOOT pin, so now we set both bits (9 and 8) to 1, and clear bit 9 if we want to enable the romloader
* to be sure, this was tested on a target with nIBOOT high (C155) and a Alcatel VLE5 pulled to low, and works fine
Signed-off-by: Steve Markgraf <steve@steve-m.de>
|
|
|
|
|
|
|
|
The new plan for layer1 is to structure the source code not based on
whether it is part of l1s/l1a or other parts, but based on 'primitives'.
All code that relates to transmitting a RACH burst should be in one
file, same for all code related to power management. Those files are
called layer1/prim_*.c
|
|
Prior to this fix, only 3 out of 4 bursts of every mac block were
received by the BTS at all.
Thanks to Dieter Spaar for spending so much time to debug this issue!
|
|
|
|
|
|
|
|
|
|
|
|
reorganized start code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rather than operating on a global variable.
|
|
I didn't touch the TX side, as it is still very fragile...
|
|
When we reset layer1, the SB counter should be set to 0 again to
correctly perform multiple SB l1 tasks without rebooting.
|
|
and instead move them into the l1s data structure
|
|
|
|
|
|
It's time to get rid of some of the old global static variables.
|
|
We don't actually use this information array yet... but hopefully
we'll start filling it soon.
|
|
also, change fn_offset from unsigned to signed.
|
|
|
|
When we process a L1CTL_DM_EST_REQ (try FCCH/SCH recognition),
we need to deactivate all scheduled multiframe tasks.
|
|
In case a single request from L2 triggers multiple response messages
from L1, we need a way to signal via L1CTL if the response is the
final or some intermediate response.
|
|
|
|
Now layer23 can ask L1 to scan an entire range of ARFCN's and do power
measurements. This is the first step in the cell (re)selection process.
|
|
For some reason, at least on the C123, a sequence of multiple NUL bytes
seems to get corrupted somewhere in the Rx side on the phone itself (the
NUL plus the following character get dropped).
We now simply work around this issue by having our sercomm/HDLC layer
escape all NUL octets in the stream.
|
|
If we're transmitting a to-be-escaped character as the last byte of the
buffer, the code generated the sequence ESCAPE FLAG rather than
ESCAPE last_byte FLAG.
This fixes the bug.
|