Commit 82107b73 authored by Andreas Eversberg's avatar Andreas Eversberg Committed by David S. Miller

mISDN: Added PH_* state info to tei manager.

Tei manager reports current layer 1 state on creation.
On state change it reports it to the socket interface.
Signed-off-by: default avatarAndreas Eversberg <andreas@eversberg.eu>
Signed-off-by: default avatarKarsten Keil <keil@b1-systems.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 17045755
...@@ -1023,6 +1023,8 @@ create_teimgr(struct manager *mgr, struct channel_req *crq) ...@@ -1023,6 +1023,8 @@ create_teimgr(struct manager *mgr, struct channel_req *crq)
mgr->up = crq->ch; mgr->up = crq->ch;
id = DL_INFO_L2_CONNECT; id = DL_INFO_L2_CONNECT;
teiup_create(mgr, DL_INFORMATION_IND, sizeof(id), &id); teiup_create(mgr, DL_INFORMATION_IND, sizeof(id), &id);
if (test_bit(MGR_PH_ACTIVE, &mgr->options))
teiup_create(mgr, PH_ACTIVATE_IND, 0, NULL);
crq->ch = NULL; crq->ch = NULL;
if (!list_empty(&mgr->layer2)) { if (!list_empty(&mgr->layer2)) {
read_lock_irqsave(&mgr->lock, flags); read_lock_irqsave(&mgr->lock, flags);
...@@ -1096,12 +1098,16 @@ mgr_send(struct mISDNchannel *ch, struct sk_buff *skb) ...@@ -1096,12 +1098,16 @@ mgr_send(struct mISDNchannel *ch, struct sk_buff *skb)
break; break;
case PH_ACTIVATE_IND: case PH_ACTIVATE_IND:
test_and_set_bit(MGR_PH_ACTIVE, &mgr->options); test_and_set_bit(MGR_PH_ACTIVE, &mgr->options);
if (mgr->up)
teiup_create(mgr, PH_ACTIVATE_IND, 0, NULL);
mISDN_FsmEvent(&mgr->deact, EV_ACTIVATE_IND, NULL); mISDN_FsmEvent(&mgr->deact, EV_ACTIVATE_IND, NULL);
do_send(mgr); do_send(mgr);
ret = 0; ret = 0;
break; break;
case PH_DEACTIVATE_IND: case PH_DEACTIVATE_IND:
test_and_clear_bit(MGR_PH_ACTIVE, &mgr->options); test_and_clear_bit(MGR_PH_ACTIVE, &mgr->options);
if (mgr->up)
teiup_create(mgr, PH_DEACTIVATE_IND, 0, NULL);
mISDN_FsmEvent(&mgr->deact, EV_DEACTIVATE_IND, NULL); mISDN_FsmEvent(&mgr->deact, EV_DEACTIVATE_IND, NULL);
ret = 0; ret = 0;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment