aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-02-03 20:26:25 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-02-03 20:26:25 +0100
commit54fa2c7eab57a0b044ea82956f3c82e68b7b580a (patch)
tree43e4d3ee03dbff7b3b89050779488c5725139bdc
parentc6d0a17100e9523c8cedbe1f55680a3e37f4a6e0 (diff)
abis_rsl: The rach information was not used, introduce a signal
Introduce a SS_CCCH for the paging and the rach load. The paging code could now start using the signal. GCC warning: abis_rsl.c: In function ‘rsl_rx_ccch_load’: abis_rsl.c:1371:11: warning: variable ‘rach_access_count’ set but not used [-Wunused-but-set-variable] abis_rsl.c:1370:11: warning: variable ‘rach_busy_count’ set but not used [-Wunused-but-set-variable] abis_rsl.c:1369:11: warning: variable ‘rach_slot_count’ set but not used [-Wunused-but-set-variable]
-rw-r--r--openbsc/include/openbsc/signal.h15
-rw-r--r--openbsc/src/libbsc/abis_rsl.c28
2 files changed, 31 insertions, 12 deletions
diff --git a/openbsc/include/openbsc/signal.h b/openbsc/include/openbsc/signal.h
index 7f30f4f47..f96c5e3c5 100644
--- a/openbsc/include/openbsc/signal.h
+++ b/openbsc/include/openbsc/signal.h
@@ -46,6 +46,7 @@ enum signal_subsystems {
SS_RF,
SS_MSC,
SS_HO,
+ SS_CCCH,
};
/* SS_PAGING signals */
@@ -247,4 +248,18 @@ struct ho_signal_data {
struct gsm_lchan *new_lchan;
};
+/* SS_CCCH signals */
+enum signal_ccch {
+ S_CCCH_PAGING_LOAD,
+ S_CCCH_RACH_LOAD,
+};
+
+struct ccch_signal_data {
+ struct gsm_bts *bts;
+ uint16_t pg_buf_space;
+ uint16_t rach_slot_count;
+ uint16_t rach_busy_count;
+ uint16_t rach_access_count;
+};
+
#endif
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index e155a3475..841afab1b 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1359,30 +1359,34 @@ static int rsl_send_imm_assignment(struct gsm_lchan *lchan)
return rsl_imm_assign_cmd(bts, sizeof(*ia)+ia->mob_alloc_len, (uint8_t *) ia);
}
-/* MS has requested a channel on the RACH */
+/* current load on the CCCH */
static int rsl_rx_ccch_load(struct msgb *msg)
{
struct e1inp_sign_link *sign_link = msg->dst;
struct abis_rsl_dchan_hdr *rslh = msgb_l2(msg);
- uint16_t pg_buf_space;
- uint16_t rach_slot_count = -1;
- uint16_t rach_busy_count = -1;
- uint16_t rach_access_count = -1;
+ struct ccch_signal_data sd;
+
+ sd.bts = sign_link->trx->bts;
+ sd.rach_slot_count = -1;
+ sd.rach_busy_count = -1;
+ sd.rach_access_count = -1;
switch (rslh->data[0]) {
case RSL_IE_PAGING_LOAD:
- pg_buf_space = rslh->data[1] << 8 | rslh->data[2];
- if (is_ipaccess_bts(sign_link->trx->bts) && pg_buf_space == 0xffff) {
+ sd.pg_buf_space = rslh->data[1] << 8 | rslh->data[2];
+ if (is_ipaccess_bts(sign_link->trx->bts) && sd.pg_buf_space == 0xffff) {
/* paging load below configured threshold, use 50 as default */
- pg_buf_space = 50;
+ sd.pg_buf_space = 50;
}
- paging_update_buffer_space(sign_link->trx->bts, pg_buf_space);
+ paging_update_buffer_space(sign_link->trx->bts, sd.pg_buf_space);
+ osmo_signal_dispatch(SS_CCCH, S_CCCH_PAGING_LOAD, &sd);
break;
case RSL_IE_RACH_LOAD:
if (msg->data_len >= 7) {
- rach_slot_count = rslh->data[2] << 8 | rslh->data[3];
- rach_busy_count = rslh->data[4] << 8 | rslh->data[5];
- rach_access_count = rslh->data[6] << 8 | rslh->data[7];
+ sd.rach_slot_count = rslh->data[2] << 8 | rslh->data[3];
+ sd.rach_busy_count = rslh->data[4] << 8 | rslh->data[5];
+ sd.rach_access_count = rslh->data[6] << 8 | rslh->data[7];
+ osmo_signal_dispatch(SS_CCCH, S_CCCH_RACH_LOAD, &sd);
}
break;
default: