summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2011-09-26 11:44:22 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2011-09-29 01:33:10 +0200
commitc57e6eda9b8f983b693b2b6c8d9a19753a389ca4 (patch)
tree17355ea97695ed6359797e3cc0f7ae44caaf3789
parent15eae8dcafc86400a6340b8dcb4b5e8ec3a4fe66 (diff)
All 3 E1-BTS should now work with dahdi and misdn_lapd driver.
-rw-r--r--openbsc/src/libbsc/bts_ericsson_rbs2000.c13
-rw-r--r--openbsc/src/libbsc/bts_nokia_site.c2
-rw-r--r--openbsc/src/libbsc/bts_siemens_bs11.c35
3 files changed, 41 insertions, 9 deletions
diff --git a/openbsc/src/libbsc/bts_ericsson_rbs2000.c b/openbsc/src/libbsc/bts_ericsson_rbs2000.c
index 5c7519236..d603033e5 100644
--- a/openbsc/src/libbsc/bts_ericsson_rbs2000.c
+++ b/openbsc/src/libbsc/bts_ericsson_rbs2000.c
@@ -120,21 +120,18 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal,
}
break;
case S_L_INP_LINE_INIT:
- /* Right now Ericsson RBS are only supported on DAHDI */
- if (strcasecmp(isd->line->driver->name, "DAHDI"))
+ case S_L_INP_LINE_NOALARM:
+ if (strcasecmp(isd->line->driver->name, "DAHDI")
+ && strcasecmp(isd->line->driver->name, "MISDN_LAPD"))
break;
start_sabm_in_line(isd->line, 1);
break;
case S_L_INP_LINE_ALARM:
- if (strcasecmp(isd->line->driver->name, "DAHDI"))
+ if (strcasecmp(isd->line->driver->name, "DAHDI")
+ && strcasecmp(isd->line->driver->name, "MISDN_LAPD"))
break;
start_sabm_in_line(isd->line, 0);
break;
- case S_L_INP_LINE_NOALARM:
- if (strcasecmp(isd->line->driver->name, "DAHDI"))
- break;
- start_sabm_in_line(isd->line, 1);
- break;
}
return 0;
diff --git a/openbsc/src/libbsc/bts_nokia_site.c b/openbsc/src/libbsc/bts_nokia_site.c
index 4b5c50f98..c43eb5fde 100644
--- a/openbsc/src/libbsc/bts_nokia_site.c
+++ b/openbsc/src/libbsc/bts_nokia_site.c
@@ -84,7 +84,7 @@ static int shutdown_om(struct gsm_bts *bts)
Attention: this has to be adapted for mISDN
*/
-void start_sabm_in_line(struct e1inp_line *line, int start, int sapi)
+static void start_sabm_in_line(struct e1inp_line *line, int start, int sapi)
{
struct e1inp_sign_link *link;
int i;
diff --git a/openbsc/src/libbsc/bts_siemens_bs11.c b/openbsc/src/libbsc/bts_siemens_bs11.c
index 2514d9977..33f5b76f2 100644
--- a/openbsc/src/libbsc/bts_siemens_bs11.c
+++ b/openbsc/src/libbsc/bts_siemens_bs11.c
@@ -562,6 +562,28 @@ static int gbl_sig_cb(unsigned int subsys, unsigned int signal,
return 0;
}
+/* Tell LAPD to start start the SAP (send SABM requests) for all signalling
+ * timeslots in this line */
+static void start_sabm_in_line(struct e1inp_line *line, int start)
+{
+ struct e1inp_sign_link *link;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(line->ts); i++) {
+ struct e1inp_ts *ts = &line->ts[i];
+
+ if (ts->type != E1INP_TS_TYPE_SIGN)
+ continue;
+
+ llist_for_each_entry(link, &ts->sign.sign_links, list) {
+ if (start)
+ lapd_sap_start(ts->lapd, link->tei, link->sapi);
+ else
+ lapd_sap_stop(ts->lapd, link->tei, link->sapi);
+ }
+ }
+}
+
/* Callback function to be called every time we receive a signal from INPUT */
static int inp_sig_cb(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data)
@@ -579,6 +601,19 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal,
bootstrap_om_bs11(isd->trx->bts);
break;
}
+ case S_L_INP_LINE_INIT:
+ case S_L_INP_LINE_NOALARM:
+ if (strcasecmp(isd->line->driver->name, "DAHDI")
+ && strcasecmp(isd->line->driver->name, "MISDN_LAPD"))
+ break;
+ start_sabm_in_line(isd->line, 1);
+ break;
+ case S_L_INP_LINE_ALARM:
+ if (strcasecmp(isd->line->driver->name, "DAHDI")
+ && strcasecmp(isd->line->driver->name, "MISDN_LAPD"))
+ break;
+ start_sabm_in_line(isd->line, 0);
+ break;
}
return 0;