Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203407
b: refs/heads/master
c: 6a75342
h: refs/heads/master
i:
  203405: 7f02575
  203403: 17adcb2
  203399: 7e5fbe5
  203391: d5ababb
v: v3
  • Loading branch information
Tilman Schmidt authored and David S. Miller committed Jul 7, 2010
1 parent 29df2d2 commit d9375e5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 24c176258d9b2aa58d86584338fcd2d1a1521dbf
refs/heads/master: 6a75342a1c788aa89acac675e1720b08068ac8e7
27 changes: 16 additions & 11 deletions trunk/drivers/isdn/gigaset/capi.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,13 @@ static inline void dump_rawmsg(enum debuglevel level, const char *tag,
kfree(dbgline);
if (CAPIMSG_COMMAND(data) == CAPI_DATA_B3 &&
(CAPIMSG_SUBCOMMAND(data) == CAPI_REQ ||
CAPIMSG_SUBCOMMAND(data) == CAPI_IND) &&
CAPIMSG_DATALEN(data) > 0) {
CAPIMSG_SUBCOMMAND(data) == CAPI_IND)) {
l = CAPIMSG_DATALEN(data);
gig_dbg(level, " DataLength=%d", l);
if (l <= 0 || !(gigaset_debuglevel & DEBUG_LLDATA))
return;
if (l > 64)
l = 64; /* arbitrary limit */
dbgline = kmalloc(3*l, GFP_ATOMIC);
if (!dbgline)
return;
Expand Down Expand Up @@ -384,7 +388,7 @@ void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *dskb)

/* don't send further B3 messages if disconnected */
if (bcs->apconnstate < APCONN_ACTIVE) {
gig_dbg(DEBUG_LLDATA, "disconnected, discarding ack");
gig_dbg(DEBUG_MCMD, "disconnected, discarding ack");
return;
}

Expand Down Expand Up @@ -428,7 +432,7 @@ void gigaset_skb_rcvd(struct bc_state *bcs, struct sk_buff *skb)

/* don't send further B3 messages if disconnected */
if (bcs->apconnstate < APCONN_ACTIVE) {
gig_dbg(DEBUG_LLDATA, "disconnected, discarding data");
gig_dbg(DEBUG_MCMD, "disconnected, discarding data");
dev_kfree_skb_any(skb);
return;
}
Expand All @@ -454,7 +458,7 @@ void gigaset_skb_rcvd(struct bc_state *bcs, struct sk_buff *skb)
/* Data64 parameter not present */

/* emit message */
dump_rawmsg(DEBUG_LLDATA, "DATA_B3_IND", skb->data);
dump_rawmsg(DEBUG_MCMD, __func__, skb->data);
capi_ctr_handle_message(&iif->ctr, ap->id, skb);
}
EXPORT_SYMBOL_GPL(gigaset_skb_rcvd);
Expand Down Expand Up @@ -978,6 +982,9 @@ static void gigaset_register_appl(struct capi_ctr *ctr, u16 appl,
struct cardstate *cs = ctr->driverdata;
struct gigaset_capi_appl *ap;

gig_dbg(DEBUG_CMD, "%s [%u] l3cnt=%u blkcnt=%u blklen=%u",
__func__, appl, rp->level3cnt, rp->datablkcnt, rp->datablklen);

list_for_each_entry(ap, &iif->appls, ctrlist)
if (ap->id == appl) {
dev_notice(cs->dev,
Expand Down Expand Up @@ -1062,6 +1069,8 @@ static void gigaset_release_appl(struct capi_ctr *ctr, u16 appl)
struct gigaset_capi_appl *ap, *tmp;
unsigned ch;

gig_dbg(DEBUG_CMD, "%s [%u]", __func__, appl);

list_for_each_entry_safe(ap, tmp, &iif->appls, ctrlist)
if (ap->id == appl) {
/* remove from any channels */
Expand Down Expand Up @@ -1951,11 +1960,7 @@ static void do_data_b3_req(struct gigaset_capi_ctr *iif,
u16 handle = CAPIMSG_HANDLE_REQ(skb->data);

/* frequent message, avoid _cmsg overhead */
dump_rawmsg(DEBUG_LLDATA, "DATA_B3_REQ", skb->data);

gig_dbg(DEBUG_LLDATA,
"Receiving data from LL (ch: %d, flg: %x, sz: %d|%d)",
channel, flags, msglen, datalen);
dump_rawmsg(DEBUG_MCMD, __func__, skb->data);

/* check parameters */
if (channel == 0 || channel > cs->channels || ncci != 1) {
Expand Down Expand Up @@ -2064,7 +2069,7 @@ static void do_data_b3_resp(struct gigaset_capi_ctr *iif,
struct gigaset_capi_appl *ap,
struct sk_buff *skb)
{
dump_rawmsg(DEBUG_LLDATA, __func__, skb->data);
dump_rawmsg(DEBUG_MCMD, __func__, skb->data);
dev_kfree_skb_any(skb);
}

Expand Down

0 comments on commit d9375e5

Please sign in to comment.