blob: 717880b795f97701af40b69b76109df348820c13 [file] [log] [blame]
Neels Hofmeyrb8afb5f2016-06-02 01:18:02 +02001/* Dynamic PDCH initialisation implementation shared across NM and RSL */
2
3/* (C) 2016 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
4 * All Rights Reserved
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21#include <osmocom/core/logging.h>
22#include <openbsc/debug.h>
23#include <openbsc/gsm_data.h>
24#include <openbsc/abis_rsl.h>
25
26void dyn_pdch_init(struct gsm_bts_trx_ts *ts)
27{
28 int rc;
29
30 if (ts->pchan == GSM_PCHAN_TCH_F_PDCH) {
31 LOGP(DRSL, LOGL_DEBUG, "trying to PDCH ACT on"
32 " BTS %u TRX %u TS %u\n",
33 ts->trx->bts->nr, ts->trx->nr, ts->nr);
34 rc = rsl_ipacc_pdch_activate(ts, 1);
35 if (rc != 0) {
36 LOGP(DRSL, LOGL_ERROR,
37 "Failed to activate PDCH on"
38 " BTS %u TRX %u TS %u: %d\n",
39 ts->trx->bts->nr, ts->trx->nr, ts->nr, rc);
40 }
41 }
42}