summaryrefslogtreecommitdiffstats
path: root/src/target
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-05-28 06:01:01 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-05-28 06:43:37 +0700
commit923c19a883bf174c3e2dab58ba311ec0a89ec12b (patch)
tree6c12d3ee37f3bc8eee29d41240b909ee9c451015 /src/target
parentc1e2ff65250334d570a057245e3ecda91fa1a528 (diff)
firmware/scheduler: Fix CBCH related RSL channel numbers
CBCH support in the firmware has been introduced almost at the same time it was implemented in trxcon, and the same mistake was made as described in Ia9a415628c659cbc2dd5dc65b875b7f935d6e211. Despite Calypso based PHY does not support PDCH (GPRS channels), let's avoid collisions and use the following cbits values: 0x19 / 0b11001 - MF_TASK_SDCCH4_CBCH on GSM_DCHAN_SDCCH_4_CBCH, 0x1a / 0b11010 - MF_TASK_SDCCH8_CBCH on GSM_DCHAN_SDCCH_8_CBCH. Change-Id: Ibb0f90695460e6ede12016c12a0cfdf9c74dfb24 Related: OS#4027
Diffstat (limited to 'src/target')
-rw-r--r--src/target/firmware/layer1/l23_api.c21
-rw-r--r--src/target/firmware/layer1/mframe_sched.c4
2 files changed, 15 insertions, 10 deletions
diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c
index daffaf8..e78020d 100644
--- a/src/target/firmware/layer1/l23_api.c
+++ b/src/target/firmware/layer1/l23_api.c
@@ -97,10 +97,13 @@ static uint32_t chan_nr2mf_task_mask(uint8_t chan_nr, uint8_t neigh_mode)
lch_idx = cbits & 0x7;
master_task = MF_TASK_SDCCH8_0 + lch_idx;
multiframe = MF51;
- } else if ((cbits & 0x1e) == 0x18) {
- /* Osmocom specific extension for CBCH */
- master_task = (cbits & 0x01) ? /* 0b1100T */
- MF_TASK_SDCCH4_CBCH : MF_TASK_SDCCH8_CBCH;
+ } else if ((cbits & 0x1f) == 0x19) {
+ /* Osmocom specific extension for CBCH on SDCCH/4 */
+ master_task = MF_TASK_SDCCH4_CBCH;
+ multiframe = MF51;
+ } else if ((cbits & 0x1f) == 0x1a) {
+ /* Osmocom specific extension for CBCH on SDCCH/8 */
+ master_task = MF_TASK_SDCCH8_CBCH;
multiframe = MF51;
#if 0
} else if (cbits == 0x10) {
@@ -141,10 +144,12 @@ static int chan_nr2dchan_type(uint8_t chan_nr)
return GSM_DCHAN_SDCCH_4;
} else if ((cbits & 0x18) == 0x08) {
return GSM_DCHAN_SDCCH_8;
- } else if ((cbits & 0x1e) == 0x18) {
- /* Osmocom-specific extension for CBCH */
- return (cbits & 0x01) ? /* 0b1100T */
- GSM_DCHAN_SDCCH_8_CBCH : GSM_DCHAN_SDCCH_4_CBCH;
+ } else if ((cbits & 0x1f) == 0x19) {
+ /* Osmocom-specific extension for CBCH on SDCCH/4 */
+ return GSM_DCHAN_SDCCH_4_CBCH;
+ } else if ((cbits & 0x1f) == 0x1a) {
+ /* Osmocom-specific extension for CBCH on SDCCH/8 */
+ return GSM_DCHAN_SDCCH_8_CBCH;
}
return GSM_DCHAN_UNKNOWN;
diff --git a/src/target/firmware/layer1/mframe_sched.c b/src/target/firmware/layer1/mframe_sched.c
index 7fa38c1..9c2954c 100644
--- a/src/target/firmware/layer1/mframe_sched.c
+++ b/src/target/firmware/layer1/mframe_sched.c
@@ -416,10 +416,10 @@ uint8_t mframe_task2chan_nr(enum mframe_task mft, uint8_t ts)
/* Osmocom specific extensions */
case MF_TASK_SDCCH4_CBCH:
- cbits = 0x18;
+ cbits = 0x19;
break;
case MF_TASK_SDCCH8_CBCH:
- cbits = 0x19;
+ cbits = 0x1a;
break;
case MF_TASK_UL_ALL_NB: