Commit Graph

118 Commits

Author SHA1 Message Date
Harald Welte 3a4148d7b8 layer2: move dump_bcch() into layer3.c where it belongs 2010-03-03 14:11:46 +01:00
Harald Welte e10d64a794 layer2/lapdm: various fixes
* fix U frame parsing
* pad all frames with 0x2B before sending them off to L1
* make sure msg->l2h is set correctly on tx frames
2010-03-03 14:01:36 +01:00
Harald Welte 63138703b7 layer2: more sanity checks, ensure msg->l1h is set correctly 2010-03-03 14:00:50 +01:00
Harald Welte 994daac979 layer2_main: Don't use LOGP API yet, and print error if msgb->data != msgb->l1h 2010-03-03 13:58:29 +01:00
Harald Welte 4cfa7739a0 make sure msg->l3h is set correctly 2010-03-03 13:57:54 +01:00
Harald Welte 8576565bb7 make sure LAPDM datalink starts in state IDLE not NULL 2010-03-03 13:57:13 +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 8eb7bdcb91 declare l1s_dsp_abort() in header file 2010-03-03 11:26:28 +01:00
Harald Welte 2b7e61083c fix Makefile dependencies to C files 2010-03-03 10:35:05 +01:00
Harald Welte 5757db4e65 sched_gsmtime uses const for 'struct tdma_sched_item *' 2010-03-03 10:28:47 +01:00
Harald Welte 177ffa3c5f add missing layer3.c file 2010-03-02 23:37:12 +01:00
Harald Welte 911e0ff962 layer2: rename files to remove extra osmocom_ prefix 2010-03-02 23:05:49 +01:00
Harald Welte 3b32efb40a layer2 program: Use new RSL utility routines, split code in more files 2010-03-02 23:02:16 +01:00
Harald Welte 8eedad77c7 Merge commit 'f08eabf2341de43993918246e89ce30c3651f378' 2010-03-02 22:00:21 +01:00
Harald Welte f08eabf234 add two new RSL utility functions 2010-03-02 21:59:20 +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 6944437bf4 Introduce CONFIG_TX_ENABLE and disable Tx support by default
Tx support is considered experimental and potentially dangerous.

Thus, the default build of the firmware does not have Tx support
enabled.

If you want Tx support, compile with -DCONFIG_TX_ENABLE by uncommenting
the apropriate line in Makefile.inc
2010-03-02 20:42:39 +01:00
Harald Welte d43fadf410 fix merge artefacts, make firmware build again 2010-03-02 20:25:02 +01:00
Harald Welte cb29bdf0bd Merge remote branch 'origin/uplink' into mater 2010-03-02 20:13:08 +01:00
Harald Welte ccebef5909 Merge commit 'fdd0a700930bdd04bc8827ef88dc5039ecc5b6ce' 2010-03-02 20:00:41 +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 11c97f5eff Major update: Start L2/L3 implementation on PC side
Using the following changes, it is now possible to receive the PCH and AGCH
messages in the PC-side layer3, as well as trigger RACH sending inside the phone
from the PC:
* merge l1_dedic_mode_data_ind, l1_dedic_mode_data_req and l1_ccch_info_ind into l1_data_ind
* add partial LAPDm implementation (layer2/src/lapdm.c)
* introduce RSLms between LAPDm and L3 (layer2/src/osmocom_rslms.c)
* use new layer1 header field of msgb
* tx_ph_rach_req() and tx_ph_data_req() to send data from PC to target
* implement DEDIC_MODE_DATA_REQ on firmware side
2010-03-01 23:54:32 +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 2f60aee6d9 extend TDMA scheduler functions to use third parameter (p3)
The idea of the third parameter is that it can be specified on a
tdma_schedule_set() level.  The multi-frame scheduler can thus use
it to pass some context information into the l1s_{cmd,resp}_*()
functions, such as the MF TASK and whether or not it is SDCCH or
SACCH.
2010-03-01 23:48:45 +01:00
Harald Welte aa4225d2cb add test mode mframe task: Send Normal Burst in every TDMA frame 2010-03-01 23:48:45 +01:00
Harald Welte 26810bd363 add missing async.h file (belongs to 0da792f2522eef475d0beb1690cd02c341415f82) 2010-03-01 23:48:45 +01:00
Harald Welte f3685191f6 SERCOMM: make sure to disable IRQ/FIQ to avoid race conditions 2010-03-01 23:48:45 +01:00
Harald Welte 80409074d9 print error message if tailroom is insufficient during msgb_put() 2010-03-01 23:48:45 +01:00
Harald Welte ec9de0be28 disable IRQ and FIQ when entering the ABORT handler 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 3e7861e937 Add and use gsmtime scheduler to L1S 2010-03-01 23:48:44 +01:00
Harald Welte ea718cc991 Add new one-shot gsmtime scheduler
Using sched_gsmtime, we can schedule a couple of one-shot items at
GSM frame numbers in the future.  This is useful for e.g. scheduling
RACH bursts.
2010-03-01 23:48:44 +01:00
Harald Welte 023289de74 Layer1 Sync support for TX of Normal Burst and RACH burst
Using the new rach_sched_set_ul and nb_sched_set_ul TDMA scheduler
sets it is possible to transmit RACH bursts as well as sets of four
normal bursts, i.e. everything needed to get a SDCCH established
on a combined CCCH (with SDCCH/4).

Known Limitations:
* Uses constant transmit power (2 dBm)
* Only works on SDCCH/4 so far
* SACCH is received but cannot be transmitted yet
* TSC (traning sequence code) is hard-coded to '7'
2010-03-01 23:48:44 +01:00
Harald Welte 59b128a679 layer1/sync: Add msgb queues for transmit/uplink to l1s data structure 2010-03-01 23:48:44 +01:00
Harald Welte 330fe01d80 Uplink: Use TPU window driven model
This means we can even send and receive in the same TDMA frame,
provided we keep the usual 3 timeslot distance between DL and UL.
2010-03-01 23:48:44 +01:00
Harald Welte 5f446da36d TRF6151: Add new trf6151_tx_window() function
This function takes care of starting a Tx (Uplink) window
2010-03-01 23:48:44 +01:00
Harald Welte 9b7afc615e twl3025: fix typo 2010-03-01 23:48:44 +01:00
Harald Welte cc02fa61b5 TWL3025: add default APC ramp 2010-03-01 23:48:44 +01:00
Harald Welte 81cd75e38c move macros to where they belong 2010-03-01 23:48:44 +01:00
Harald Welte d520c7e4cf layer1/tpu_window.c support for Uplink/Tx
* introduce l1s_tx_win_ctrl() function

This only controls the ABB window, and not the TRF and RFFE window yet
2010-03-01 23:48:44 +01:00
Harald Welte 59265bcae1 Prepare DSP functions needed for Uplink (Tx)
* Tell DSP to properly initialize ABB(TWL3025) registers at first DSP interrupt
* Initialize the entire API RAM to zero on dsp_power_on()
* Tell DSP to initialize the APCRAM to all-zero to preven accidential Tx
* Set number of GUARD bits to 8
* Add function to configure TCH parameters: dsp_load_tch_param()
2010-03-01 23:48:43 +01:00
Harald Welte dea01c5393 Compal RFFE suport for Upplink (PA enable) 2010-03-01 23:48:43 +01:00
Harald Welte 1327bbd6fd TRF6151: add Uplink support 2010-03-01 23:48:43 +01:00
Harald Welte 32da71ef5c TWL3025: Add uplink enable/disable function 2010-03-01 23:48:43 +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 649793bf04 add msgb_l1() and msgb_l1len() inline functions 2010-03-01 23:44:23 +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 fdd0a70093 add msgb_l1() and msgb_l1len() inline functions 2010-03-01 22:30:51 +01:00
Erik Ekman 61e34acf89 Fix three more warnings 2010-03-01 22:20:36 +01:00
Erik Ekman a9d6fb6518 Fix some warnings in osmocon 2010-03-01 22:20:28 +01:00