Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111754
b: refs/heads/master
c: 8fc5387
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Sep 22, 2008
1 parent 1b61e4c commit 07a1ef7
Show file tree
Hide file tree
Showing 2 changed files with 10 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: e9bb8fb0b6d61a822201537b25206a0ca34b9d1d
refs/heads/master: 8fc5387cb837f9e44a0be2d7e297bbbcab36a292
18 changes: 9 additions & 9 deletions trunk/drivers/bluetooth/hci_bcsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,14 @@ static int bcsp_flush(struct hci_uart *hu)
/* Remove ack'ed packets */
static void bcsp_pkt_cull(struct bcsp_struct *bcsp)
{
struct sk_buff *skb, *tmp;
unsigned long flags;
struct sk_buff *skb;
int i, pkts_to_be_removed;
u8 seqno;

spin_lock_irqsave(&bcsp->unack.lock, flags);

pkts_to_be_removed = bcsp->unack.qlen;
pkts_to_be_removed = skb_queue_len(&bcsp->unack);
seqno = bcsp->msgq_txseq;

while (pkts_to_be_removed) {
Expand All @@ -373,19 +373,19 @@ static void bcsp_pkt_cull(struct bcsp_struct *bcsp)
BT_ERR("Peer acked invalid packet");

BT_DBG("Removing %u pkts out of %u, up to seqno %u",
pkts_to_be_removed, bcsp->unack.qlen, (seqno - 1) & 0x07);
pkts_to_be_removed, skb_queue_len(&bcsp->unack),
(seqno - 1) & 0x07);

for (i = 0, skb = ((struct sk_buff *) &bcsp->unack)->next; i < pkts_to_be_removed
&& skb != (struct sk_buff *) &bcsp->unack; i++) {
struct sk_buff *nskb;
i = 0;
skb_queue_walk_safe(&bcsp->unack, skb, tmp) {
if (i++ >= pkts_to_be_removed)
break;

nskb = skb->next;
__skb_unlink(skb, &bcsp->unack);
kfree_skb(skb);
skb = nskb;
}

if (bcsp->unack.qlen == 0)
if (skb_queue_empty(&bcsp->unack))
del_timer(&bcsp->tbcsp);

spin_unlock_irqrestore(&bcsp->unack.lock, flags);
Expand Down

0 comments on commit 07a1ef7

Please sign in to comment.