Skip to content

Commit

Permalink
NFC: Call llcp_add_header properly when sending LLCP DM or DISC
Browse files Browse the repository at this point in the history
dsap and ssap were swapped when sending DN or DISC.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Samuel Ortiz authored and John W. Linville committed Apr 12, 2012
1 parent 324b0af commit ffc2931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/nfc/llcp/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ int nfc_llcp_disconnect(struct nfc_llcp_sock *sock)

skb_reserve(skb, dev->tx_headroom + NFC_HEADER_SIZE);

skb = llcp_add_header(skb, sock->ssap, sock->dsap, LLCP_PDU_DISC);
skb = llcp_add_header(skb, sock->dsap, sock->ssap, LLCP_PDU_DISC);

skb_queue_tail(&local->tx_queue, skb);

Expand Down Expand Up @@ -416,7 +416,7 @@ int nfc_llcp_send_dm(struct nfc_llcp_local *local, u8 ssap, u8 dsap, u8 reason)

skb_reserve(skb, dev->tx_headroom + NFC_HEADER_SIZE);

skb = llcp_add_header(skb, ssap, dsap, LLCP_PDU_DM);
skb = llcp_add_header(skb, dsap, ssap, LLCP_PDU_DM);

memcpy(skb_put(skb, 1), &reason, 1);

Expand Down

0 comments on commit ffc2931

Please sign in to comment.