aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/mISDN
diff options
context:
space:
mode:
authorMartin Bachem <m.bachem@gmx.de>2008-09-03 09:17:45 -0400
committerKarsten Keil <kkeil@suse.de>2009-01-09 16:44:25 -0500
commit1f28fa19d34c0d9186f274e61e4b3dcfc6428c5c (patch)
tree40da1b8d61dbc0d837f5b6732cbb82a261cbb277 /drivers/isdn/mISDN
parenta9b61830cd88a1d3d5e6d61adb737a3e20f7f0f5 (diff)
mISDN: Add E-Channel logging features
New prim PH_DATA_E_IND. - all E-ch frames are indicated by recv_Echannel(), which pushes E-Channel frames into dch's rqueue - if dchannel is opened with channel nr 0, no E-Channel logging is requested - if dchannel is opened with channel nr 1, E-Channel logging is requested. if layer1 does not support that, -EINVAL in return is appropriate Signed-off-by: Martin Bachem <m.bachem@gmx.de> Signed-off-by: Karsten Keil <kkeil@suse.de>
Diffstat (limited to 'drivers/isdn/mISDN')
-rw-r--r--drivers/isdn/mISDN/hwchannel.c19
-rw-r--r--drivers/isdn/mISDN/stack.c2
2 files changed, 20 insertions, 1 deletions
diff --git a/drivers/isdn/mISDN/hwchannel.c b/drivers/isdn/mISDN/hwchannel.c
index 535ceacc05b9..ab1168a110ae 100644
--- a/drivers/isdn/mISDN/hwchannel.c
+++ b/drivers/isdn/mISDN/hwchannel.c
@@ -166,6 +166,25 @@ recv_Dchannel(struct dchannel *dch)
166EXPORT_SYMBOL(recv_Dchannel); 166EXPORT_SYMBOL(recv_Dchannel);
167 167
168void 168void
169recv_Echannel(struct dchannel *ech, struct dchannel *dch)
170{
171 struct mISDNhead *hh;
172
173 if (ech->rx_skb->len < 2) { /* at least 2 for sapi / tei */
174 dev_kfree_skb(ech->rx_skb);
175 ech->rx_skb = NULL;
176 return;
177 }
178 hh = mISDN_HEAD_P(ech->rx_skb);
179 hh->prim = PH_DATA_E_IND;
180 hh->id = get_sapi_tei(ech->rx_skb->data);
181 skb_queue_tail(&dch->rqueue, ech->rx_skb);
182 ech->rx_skb = NULL;
183 schedule_event(dch, FLG_RECVQUEUE);
184}
185EXPORT_SYMBOL(recv_Echannel);
186
187void
169recv_Bchannel(struct bchannel *bch) 188recv_Bchannel(struct bchannel *bch)
170{ 189{
171 struct mISDNhead *hh; 190 struct mISDNhead *hh;
diff --git a/drivers/isdn/mISDN/stack.c b/drivers/isdn/mISDN/stack.c
index 9b9fab47cb2b..8cff570bb8df 100644
--- a/drivers/isdn/mISDN/stack.c
+++ b/drivers/isdn/mISDN/stack.c
@@ -453,7 +453,7 @@ connect_layer1(struct mISDNdevice *dev, struct mISDNchannel *ch,
453 ch->peer = &dev->D.st->own; 453 ch->peer = &dev->D.st->own;
454 ch->st = dev->D.st; 454 ch->st = dev->D.st;
455 rq.protocol = protocol; 455 rq.protocol = protocol;
456 rq.adr.channel = 0; 456 rq.adr.channel = adr->channel;
457 err = dev->D.ctrl(&dev->D, OPEN_CHANNEL, &rq); 457 err = dev->D.ctrl(&dev->D, OPEN_CHANNEL, &rq);
458 printk(KERN_DEBUG "%s: ret 1 %d\n", __func__, err); 458 printk(KERN_DEBUG "%s: ret 1 %d\n", __func__, err);
459 if (err) 459 if (err)