netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karsten Keil <kkeil@linux-pingi.de>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Andreas Eversberg <andreas@eversberg.eu>
Subject: [PATCH 1/8] mISDN: Added PH_* state info to tei manager.
Date: Sat, 28 Apr 2012 13:43:17 +0200	[thread overview]
Message-ID: <1335613404-10187-2-git-send-email-kkeil@linux-pingi.de> (raw)
In-Reply-To: <1335613404-10187-1-git-send-email-kkeil@linux-pingi.de>

From: Andreas Eversberg <andreas@eversberg.eu>

Tei manager reports current layer 1 state on creation.
On state change it reports it to the socket interface.

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
---
 drivers/isdn/mISDN/tei.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c
index ba2bc0c..969766f 100644
--- a/drivers/isdn/mISDN/tei.c
+++ b/drivers/isdn/mISDN/tei.c
@@ -1023,6 +1023,8 @@ create_teimgr(struct manager *mgr, struct channel_req *crq)
 		mgr->up = crq->ch;
 		id = DL_INFO_L2_CONNECT;
 		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;
 		if (!list_empty(&mgr->layer2)) {
 			read_lock_irqsave(&mgr->lock, flags);
@@ -1096,12 +1098,16 @@ mgr_send(struct mISDNchannel *ch, struct sk_buff *skb)
 		break;
 	case PH_ACTIVATE_IND:
 		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);
 		do_send(mgr);
 		ret = 0;
 		break;
 	case PH_DEACTIVATE_IND:
 		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);
 		ret = 0;
 		break;
-- 
1.7.3.4

  reply	other threads:[~2012-04-28 11:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-28 11:43 [PATCH 0/8] mISDN: Collection of patches for layer1/layer2 Karsten Keil
2012-04-28 11:43 ` Karsten Keil [this message]
2012-04-28 11:43 ` [PATCH 2/8] mISDN: Fix refcounting bug Karsten Keil
2012-04-28 11:43 ` [PATCH 3/8] Sometimes the ISDN chip only controls the D-channel Karsten Keil
2012-05-01 17:30   ` David Miller
2012-05-03  6:31     ` Karsten Keil
2012-05-03  6:50       ` David Miller
2012-05-03  7:31         ` Karsten Keil
2012-05-03  8:08           ` David Miller
2012-04-28 11:43 ` [PATCH 4/8] mISDN: L2 timeouts need to be queued as L2 event Karsten Keil
2012-04-28 11:43 ` [PATCH 5/8] mISDN: Make layer1 timer 3 value configurable Karsten Keil
2012-04-28 11:43 ` [PATCH 6/8] mISDN: Layer1 statemachine fix Karsten Keil
2012-04-28 11:43 ` [PATCH 7/8] mISDN: Help to identify the card Karsten Keil
2012-04-28 11:43 ` [PATCH 8/8] mISDN: Add 2MBit mode for HFC E1 card Karsten Keil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1335613404-10187-2-git-send-email-kkeil@linux-pingi.de \
    --to=kkeil@linux-pingi.de \
    --cc=andreas@eversberg.eu \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).