Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341510
b: refs/heads/master
c: be02b6b
h: refs/heads/master
v: v3
  • Loading branch information
Samuel Ortiz committed Nov 19, 2012
1 parent 324119a commit 88d9028
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 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: dd2bf43ffcf0d1bba94d20abc6cc44ed294db66b
refs/heads/master: be02b6b624005d47c388f799ce23714136430217
17 changes: 13 additions & 4 deletions trunk/net/nfc/llcp/llcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,29 +656,38 @@ static void nfc_llcp_tx_work(struct work_struct *work)
if (llcp_sock == NULL && nfc_llcp_ptype(skb) == LLCP_PDU_I) {
nfc_llcp_send_symm(local->dev);
} else {
struct sk_buff *copy_skb = NULL;
u8 ptype = nfc_llcp_ptype(skb);
int ret;

pr_debug("Sending pending skb\n");
print_hex_dump(KERN_DEBUG, "LLCP Tx: ",
DUMP_PREFIX_OFFSET, 16, 1,
skb->data, skb->len, true);

if (ptype == LLCP_PDU_I)
copy_skb = skb_copy(skb, GFP_ATOMIC);

nfc_llcp_send_to_raw_sock(local, skb,
NFC_LLCP_DIRECTION_TX);

ret = nfc_data_exchange(local->dev, local->target_idx,
skb, nfc_llcp_recv, local);

if (!ret && nfc_llcp_ptype(skb) == LLCP_PDU_I) {
skb = skb_get(skb);
skb_queue_tail(&llcp_sock->tx_pending_queue,
skb);
if (ret) {
kfree_skb(copy_skb);
goto out;
}

if (ptype == LLCP_PDU_I && copy_skb)
skb_queue_tail(&llcp_sock->tx_pending_queue,
copy_skb);
}
} else {
nfc_llcp_send_symm(local->dev);
}

out:
mod_timer(&local->link_timer,
jiffies + msecs_to_jiffies(2 * local->remote_lto));
}
Expand Down

0 comments on commit 88d9028

Please sign in to comment.