Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184241
b: refs/heads/master
c: 4279271
h: refs/heads/master
i:
  184239: a688430
v: v3
  • Loading branch information
Jan Kiszka authored and David S. Miller committed Feb 17, 2010
1 parent addc52e commit 19d3b53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 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: 42651b5c1aabf5eb60fbe98375ba127f4f6eb943
refs/heads/master: 42792713f7f2664cf07501e1244d6da33a73ffc1
16 changes: 7 additions & 9 deletions trunk/drivers/isdn/capi/capi.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ struct capiminor {
unsigned int minor;
struct dentry *capifs_dentry;

struct capi20_appl *ap;
u32 ncci;
u16 datahandle;
u16 msgid;
struct capi20_appl *ap;
u32 ncci;
atomic_t datahandle;
atomic_t msgid;

struct tty_port port;
int ttyinstop;
Expand Down Expand Up @@ -227,7 +227,6 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci)

mp->ap = ap;
mp->ncci = ncci;
mp->msgid = 0;
INIT_LIST_HEAD(&mp->ackqueue);
spin_lock_init(&mp->ackqlock);

Expand Down Expand Up @@ -427,7 +426,7 @@ gen_data_b3_resp_for(struct capiminor *mp, struct sk_buff *skb)
capimsg_setu16(s, 2, mp->ap->applid);
capimsg_setu8 (s, 4, CAPI_DATA_B3);
capimsg_setu8 (s, 5, CAPI_RESP);
capimsg_setu16(s, 6, mp->msgid++);
capimsg_setu16(s, 6, atomic_inc_return(&mp->msgid));
capimsg_setu32(s, 8, mp->ncci);
capimsg_setu16(s, 12, datahandle);
}
Expand Down Expand Up @@ -554,15 +553,15 @@ static int handle_minor_send(struct capiminor *mp)
}

while ((skb = skb_dequeue(&mp->outqueue)) != NULL) {
datahandle = mp->datahandle;
datahandle = atomic_inc_return(&mp->datahandle);
len = (u16)skb->len;
skb_push(skb, CAPI_DATA_B3_REQ_LEN);
memset(skb->data, 0, CAPI_DATA_B3_REQ_LEN);
capimsg_setu16(skb->data, 0, CAPI_DATA_B3_REQ_LEN);
capimsg_setu16(skb->data, 2, mp->ap->applid);
capimsg_setu8 (skb->data, 4, CAPI_DATA_B3);
capimsg_setu8 (skb->data, 5, CAPI_REQ);
capimsg_setu16(skb->data, 6, mp->msgid++);
capimsg_setu16(skb->data, 6, atomic_inc_return(&mp->msgid));
capimsg_setu32(skb->data, 8, mp->ncci); /* NCCI */
capimsg_setu32(skb->data, 12, (u32)(long)skb->data);/* Data32 */
capimsg_setu16(skb->data, 16, len); /* Data length */
Expand All @@ -577,7 +576,6 @@ static int handle_minor_send(struct capiminor *mp)
}
errcode = capi20_put_message(mp->ap, skb);
if (errcode == CAPI_NOERROR) {
mp->datahandle++;
count++;
mp->outbytes -= len;
#ifdef _DEBUG_DATAFLOW
Expand Down

0 comments on commit 19d3b53

Please sign in to comment.