mISDN: Use protocol to detect D-channel
authorMartin Bachem <m.bachem@gmx.de>
Wed, 3 Sep 2008 16:08:30 +0000 (18:08 +0200)
committerKarsten Keil <kkeil@suse.de>
Fri, 9 Jan 2009 21:44:25 +0000 (22:44 +0100)
Use protocol to detect D-channel not the channel number 0

Signed-off-by: Martin Bachem <m.bachem@gmx.de>
Signed-off-by: Karsten Keil <kkeil@suse.de>
drivers/isdn/hardware/mISDN/hfcpci.c

index 8461477a3ac03161393b63557f73c553bfd8fd24..37c2e19c3b008801cc390d8d25076761ecd27303 100644 (file)
@@ -1964,7 +1964,8 @@ hfc_dctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
        switch (cmd) {
        case OPEN_CHANNEL:
                rq = arg;
-               if (rq->adr.channel == 0)
+               if ((rq->protocol == ISDN_P_TE_S0) ||
+                   (rq->protocol == ISDN_P_NT_S0))
                        err = open_dchannel(hc, ch, rq);
                else
                        err = open_bchannel(hc, rq);