Skip to content

Commit

Permalink
NFC: LLCP's MIUX is 10 bytes long, not 7
Browse files Browse the repository at this point in the history
The mask is 0x7ff and not 0x7f and the return value is an u16.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Samuel Ortiz committed Jun 4, 2012
1 parent 93d7e49 commit 76762b7
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 @@ -51,7 +51,7 @@ static u8 llcp_tlv8(u8 *tlv, u8 type)
return tlv[2];
}

static u8 llcp_tlv16(u8 *tlv, u8 type)
static u16 llcp_tlv16(u8 *tlv, u8 type)
{
if (tlv[0] != type || tlv[1] != llcp_tlv_length[tlv[0]])
return 0;
Expand All @@ -67,7 +67,7 @@ static u8 llcp_tlv_version(u8 *tlv)

static u16 llcp_tlv_miux(u8 *tlv)
{
return llcp_tlv16(tlv, LLCP_TLV_MIUX) & 0x7f;
return llcp_tlv16(tlv, LLCP_TLV_MIUX) & 0x7ff;
}

static u16 llcp_tlv_wks(u8 *tlv)
Expand Down

0 comments on commit 76762b7

Please sign in to comment.