aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware
diff options
context:
space:
mode:
authorAndreas Eversberg <andreas@eversberg.eu>2012-04-24 16:52:12 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-26 05:21:03 -0400
commitd2fb549654882ae5806a8a676b322ac1ceea4608 (patch)
treee7d907ffd585dbee5ee479c0a96035bf5206004c /drivers/isdn/hardware
parenta4d729d0ce7e52f21d1976b96fc6211ee34bf84b (diff)
mISDN: Using FLG_ACTIVE flag to determine if layer 1 is active or not.
We already have the flag for L1 active, so we should use it. L2 will be solved in a later patch. Signed-off-by: Andreas Eversberg <andreas@eversberg.eu> Signed-off-by: Karsten Keil <keil@b1-systems.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware')
-rw-r--r--drivers/isdn/hardware/mISDN/hfcmulti.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index c4e7fda99435..cc978e8f2c9b 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -1619,10 +1619,16 @@ hfcmulti_leds(struct hfc_multi *hc)
1619 * 2 red steady: TE mode deactivate 1619 * 2 red steady: TE mode deactivate
1620 * left green: L1 active 1620 * left green: L1 active
1621 * left red: frame sync, but no L1 1621 * left red: frame sync, but no L1
1622 * right green: L2 active 1622 * todo right green: L2 active
1623 */ 1623 */
1624 if (hc->chan[hc->dslot].sync != 2) { /* no frame sync */ 1624 dch = hc->chan[hc->dslot].dch;
1625 if (hc->chan[hc->dslot].dch->dev.D.protocol 1625 if (test_bit(FLG_ACTIVE, &dch->Flags)) {
1626 led[0] = 0;
1627 led[1] = 0;
1628 led[2] = 0;
1629 led[3] = 1;
1630 } else {
1631 if (dch->dev.D.protocol
1626 != ISDN_P_NT_E1) { 1632 != ISDN_P_NT_E1) {
1627 led[0] = 1; 1633 led[0] = 1;
1628 led[1] = 1; 1634 led[1] = 1;
@@ -1635,12 +1641,6 @@ hfcmulti_leds(struct hfc_multi *hc)
1635 } 1641 }
1636 led[2] = 0; 1642 led[2] = 0;
1637 led[3] = 0; 1643 led[3] = 0;
1638 } else { /* with frame sync */
1639 /* TODO make it work */
1640 led[0] = 0;
1641 led[1] = 0;
1642 led[2] = 0;
1643 led[3] = 1;
1644 } 1644 }
1645 leds = (led[0] | (led[1]<<2) | (led[2]<<1) | (led[3]<<3))^0xF; 1645 leds = (led[0] | (led[1]<<2) | (led[2]<<1) | (led[3]<<3))^0xF;
1646 /* leds are inverted */ 1646 /* leds are inverted */
@@ -4062,14 +4062,9 @@ open_dchannel(struct hfc_multi *hc, struct dchannel *dch,
4062 hfcmulti_initmode(dch); 4062 hfcmulti_initmode(dch);
4063 spin_unlock_irqrestore(&hc->lock, flags); 4063 spin_unlock_irqrestore(&hc->lock, flags);
4064 } 4064 }
4065 4065 if (test_bit(FLG_ACTIVE, &dch->Flags))
4066 if (((rq->protocol == ISDN_P_NT_S0) && (dch->state == 3)) ||
4067 ((rq->protocol == ISDN_P_TE_S0) && (dch->state == 7)) ||
4068 ((rq->protocol == ISDN_P_NT_E1) && (dch->state == 1)) ||
4069 ((rq->protocol == ISDN_P_TE_E1) && (dch->state == 1))) {
4070 _queue_data(&dch->dev.D, PH_ACTIVATE_IND, MISDN_ID_ANY, 4066 _queue_data(&dch->dev.D, PH_ACTIVATE_IND, MISDN_ID_ANY,
4071 0, NULL, GFP_KERNEL); 4067 0, NULL, GFP_KERNEL);
4072 }
4073 rq->ch = &dch->dev.D; 4068 rq->ch = &dch->dev.D;
4074 if (!try_module_get(THIS_MODULE)) 4069 if (!try_module_get(THIS_MODULE))
4075 printk(KERN_WARNING "%s:cannot get module\n", __func__); 4070 printk(KERN_WARNING "%s:cannot get module\n", __func__);