Commit Graph

30 Commits

Author SHA1 Message Date
Andreas.Eversberg ac98bbe971 [l1ctl] Introducing L1CTL_FREQ_REQ to change frequency hopping sequence
This is only the header, so there is no functionality yet. The
functionality for layer1 works, but it is not yet ready for commit.

This commit is required for radio ressource protocol commited later.
2010-08-21 15:02:32 +00:00
Sylvain Munaut d1028f49a3 l1ctl_proto: Use an enum for the message type rather than #defines
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27 20:51:45 +02:00
Sylvain Munaut 09b2ed2f3a l1ctl_proto.h: Fixup name of the guard ifdef
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27 20:51:39 +02:00
Sylvain Munaut c382fbf943 include: Rename l1a_l23_interface.h to l1ctl_proto.h
The interface between l1 and upper layer is called by several
name. IMHO l1ctl is shorted and sounds good so try to unify
using that.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27 20:51:29 +02:00
Andreas.Eversberg c6ff4723ce [layer 1] L1CTL_PARAM_REQ is introduced to change TX power and TA.
Currently only TA (timing advance) is supported. It ranges from -128 to 128.
2010-07-13 14:07:37 +00:00
Andreas.Eversberg 9a422ceb25 [layer 1] Reset option for scheduled frames.
This is usefull to drop a scheduled RACH request after an IMM.ASS is
received.
2010-07-13 14:03:13 +00:00
Andreas.Eversberg f2b1e55c1e [layer23] Updated layer23 to current L1 support and forthcomming hopping. 2010-06-28 13:33:14 +00:00
Harald Welte d919186ca4 [l1ctl] add dedicated mode release request 2010-06-25 18:00:16 +02:00
Sylvain Munaut 16cd41e809 l1a_l23_interface: Update DM EST REQ format
We include all the parameters we're gonna need to support
TS!=0, hopping, TSC, ...

We also assume the upper layer have decoded the low level
bit fields and gives us neat accessible variables and a
sorted ARFCN array for the Mobile Allocation

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-24 18:57:28 +02:00
Sylvain Munaut 38c6b4b35a fw/layer1: Add support CCCH combined/non-combined
We introduce the concept of CCCH mode. It can be either
 - NONE: receive BCCCH only
 - COMBINED: CCCH on a BCCH/CCCH+SDDCH/4
 - NON_COMBINED: CCCH on a BCCH/CCCH

There is also a new command to change the mode without having
to do the resync.

Currently, we keep the previous default behavior of requesting
a combined CCCH by default

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-22 06:37:09 +02:00
Harald Welte c819bd88b1 [L1CTL] Introduce completion for transmit of L2 frame
Every time we have completed the transmit of a L2 frame (mac block),
we send L1CTL_DATA_CONF up to L2.
2010-06-20 19:21:32 +02:00
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 cdc91973ee [L1CTL] rename L1CTL_RESET to L1CTL_RESET_IND
and define a new structure that indicates the type of reset
2010-06-20 18:44:27 +02:00
Harald Welte 64b4a7a585 [layer1] Add L1CTL_RACH_RESP to confirm that a RACH request was sent 2010-06-20 18:13:14 +02:00
Harald Welte 5e2f9900e5 L1CTL: Include num_biterr/fire_crc in downlink info + proper alignment/padding 2010-05-29 12:47:07 +02:00
Harald Welte cb71b972bd Make new L1CTL_FBSB_REQ work reliably
* port 'mobile' application to new l1ctl_tx_fbsb_req()
* make sure we have a proper downlinke header in front of l1ctl_fbsb_resp
* remove duplicate band_arfcn member of struct l1ctl_fbsb_resp
* reset the AFC to its default value when starting new FBSB task
* remove bogus l1s.sb.{synced.count} variables
* allocate msg and send l1ctl_fbsb_resp() only from process context, not FIQ
* properly report SNR and BSIC in fbsb_resp
* introduce arbitrary SNR thresholds for FB0->FB1 and FB1->SB switching
2010-05-20 23:26:42 +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
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 ace2b08244 add L1CTL ECHO REQUEST code 2010-03-27 12:32:32 +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
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
Holger Hans Peter Freyther a481e498b7 l1a_l23_interface.h: struct gsm_time was not packed and had padding
The following issue was found by Andreas Bogk. The l1ctl_info_dl
struct is supposed to be packed but we included the struct gsm_time
which was not packed and added three bytes of padding. Pack the
structure to avoid that.
2010-03-04 22:35:13 +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 43dd25c493 Include channel number and link identifier in L1 DL info
This enables the layer2 to identify on which channel
(BCCH/CCCH/SDCCH/TCH/...) the respective message was received.
* Encode MFrame Task Number + SACCH info in 'p3' parameter
* Generate channel number and link identifier
* Decode channel number in layer2 program
2010-03-01 23:48:45 +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 cc2ae91e48 Import value_string utilities and some RSL stuff from OpenBSC 2010-03-01 23:48:43 +01:00
Harald Welte 5a1ef43618 Import value_string utilities and some RSL stuff from OpenBSC 2010-03-01 23:44:23 +01:00
Harald Welte fbe7b94c9c Initial import of OsmocomBB into git repository 2010-02-18 16:46:36 +01:00