Commit Graph

21 Commits

Author SHA1 Message Date
Harald Welte 281ea80498 [L1CTL] rename primitives to comply with official naming s/_REQ/_CONF/
When L23 issues a REQ, we should respond with CONF, rather than _RESP
2010-06-20 19:10:21 +02:00
Harald Welte cb38815c0b [L1CTL] Introduce L1CTL_RESET_RESP
1) On boot, L23 is notified by L1CTL_RESET_IND:
2) At any time, L23 can call L1CTL_RESET_REQ and get a
   L1CTL_RESET_RESP once the reset has been performed.

Also, there is no 'l1ctl_info_dl' in the RESET_IND anymore, as it
is useless.
2010-06-20 18:44:28 +02:00
Harald Welte 1837a24437 L1: don't hexdump every packet we receive from L1CTL to console 2010-05-20 23:08:29 +02:00
Harald Welte 8978ec571e layer1/l1ctl: Split L1CTL_NEW_CCCH_REQ in FBSB_REQ nad SYNC_REQ
We really want to have those two as distinct operations - and we
want proper state machines in L1 to quickly return if they've
managed to acquire a FB or SB or not.  Otherwise scanning will
take ages...

This code now introduces a new l1ctl_fbsb_req that is sent via
L1CTL to ask for a bitmask of FB0/FB1/SB operations.  The actual
FB0/FB1 detection now no longer runs for 500 TDMA interrupts
but completes as soon as we either know there is no FCCH,
or that our frequency error is smaller than a caller-specified
threshold.

FB0/FB1 are already working, SB is not yet, sorry.
2010-05-19 21:41:24 +02:00
Sylvain Munaut 2afc002e12 fw/layer1: Encapsulate mframe scheduler function better
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>
2010-04-28 10:17:04 +02:00
Sylvain Munaut fd38f450ca target/layer1: Fix typo in l23 message reception debug
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-04-28 10:14:14 +02:00
Harald Welte 4e47a7a6ce layer1: properly reset fb_once and sb_once when syncing to new cell 2010-04-06 10:00:16 +08:00
Harald Welte 9a05cc42b5 layer1: deactivate all mframe tasks at L1CTL_DM_EST_REQ time
When we process a L1CTL_DM_EST_REQ (try FCCH/SCH recognition),
we need to deactivate all scheduled multiframe tasks.
2010-04-06 09:52:23 +08:00
Harald Welte 2bfeb17e06 l1ctl protocol: Introduce multi-part message DONE flag
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.
2010-04-05 22:19:49 +08:00
Harald Welte 1e4d22cb5f Implement L23-triggered L1 power measurement scan
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.
2010-03-27 18:42:43 +08:00
Harald Welte bee63154c4 L1A/L23 interface (L1CTL) cleanup
* introduce a new 'l1ctl_hdr' structure common to all messages
  on this interface
* use struct l1ctl_hdr in both the firmware and layer23
* add a new L1CTL_PM_REQ request for performing layer23-initiated
  power measurements (firmware does not implement them yet)
2010-03-21 12:57:28 +08:00
Holger Hans Peter Freyther 2d1d0ce141 Fix some compiler warnings...
Some real issues are still left and we need to act on them.
2010-03-08 05:02:27 +01:00
Harald Welte de3b70dcce fix framenumber byte-ordering 2010-03-07 21:17:24 +01:00
Harald Welte 97c8b6f33b start to use libosmocore within the firmware
* remove linuxlist.h copy and use osmocore
 * don't put 'struct gsm_time' into l1ctl packets
 * include rx_level and snr for each burst in l1ctl
 * properly build libosmocore.a for target
 * move gsmtime functions into libosmocore
 * move ctype.h to standard location
2010-03-07 20:56:12 +01:00
Harald Welte 9f69841c19 layer1: allocate large enough msgb's for the payload we send over L1CTL 2010-03-07 16:57:09 +01:00
Harald Welte 86dced0b2d ensure RF_ARFCN is part of l1ctl messages sent to host 2010-03-04 20:03:00 +01:00
Harald Welte ba18970f83 Layer1: various fixes + debugging aid
* print HDLC packets received from L2
* print Tx MAC block as it is written to DSP API RAM
* ensure we don't msgb_free() a message that we've enqueued for l1s
2010-03-03 13:55:51 +01:00
Harald Welte 2004b13327 Layer1 CTL interface improvements: Don't hardcode SDCCH4/0
When receiving a L1CTL_DM_EST_REQ, compute the MF Task according
to the chan_nr of the EST REQ - rather than hardcoding SDCCH4/0
2010-03-02 21:45:04 +01:00
Harald Welte 092d57bef9 Inter-Layer intergration work
L1 and L2 now pass UI frames like BCCH and CCCH downlink up into
L3, which detects an IMMediate ASSignment command and instructs
the L1 to switch to SDCCH/4.

From this point on, SDCCH/4 and SACCH4/C messages end up in our
L2 LAPDm implementation and are forwarded to L3.
2010-03-02 18:47:01 +01:00
Harald Welte 146619933b add an actual Layer1 asynchronous (L1A) API that can be called from higher layers 2010-03-01 23:48:45 +01:00
Harald Welte fbe7b94c9c Initial import of OsmocomBB into git repository 2010-02-18 16:46:36 +01:00