aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-04-10 13:43:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-12 15:10:44 -0400
commit56d5876a22e79b0bb82eb3dc5f2134fa429daa2e (patch)
treec19e671d9b46a604b257ffad0acc26a36fa27c95 /net/nfc
parent6ff73fd239ff5d6f1ebfe5b5f7f560d9fad7d749 (diff)
NFC: Add MIUX to the local LLCP general bytes
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/llcp/llcp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c
index 2cf01e642566..31a05e55619f 100644
--- a/net/nfc/llcp/llcp.c
+++ b/net/nfc/llcp/llcp.c
@@ -307,6 +307,8 @@ static int nfc_llcp_build_gb(struct nfc_llcp_local *local)
307 u8 *gb_cur, *version_tlv, version, version_length; 307 u8 *gb_cur, *version_tlv, version, version_length;
308 u8 *lto_tlv, lto, lto_length; 308 u8 *lto_tlv, lto, lto_length;
309 u8 *wks_tlv, wks_length; 309 u8 *wks_tlv, wks_length;
310 u8 *miux_tlv, miux_length;
311 __be16 miux;
310 u8 gb_len = 0; 312 u8 gb_len = 0;
311 313
312 version = LLCP_VERSION_11; 314 version = LLCP_VERSION_11;
@@ -324,6 +326,11 @@ static int nfc_llcp_build_gb(struct nfc_llcp_local *local)
324 &wks_length); 326 &wks_length);
325 gb_len += wks_length; 327 gb_len += wks_length;
326 328
329 miux = cpu_to_be16(LLCP_MAX_MIUX);
330 miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *)&miux, 0,
331 &miux_length);
332 gb_len += miux_length;
333
327 gb_len += ARRAY_SIZE(llcp_magic); 334 gb_len += ARRAY_SIZE(llcp_magic);
328 335
329 if (gb_len > NFC_MAX_GT_LEN) { 336 if (gb_len > NFC_MAX_GT_LEN) {
@@ -345,6 +352,9 @@ static int nfc_llcp_build_gb(struct nfc_llcp_local *local)
345 memcpy(gb_cur, wks_tlv, wks_length); 352 memcpy(gb_cur, wks_tlv, wks_length);
346 gb_cur += wks_length; 353 gb_cur += wks_length;
347 354
355 memcpy(gb_cur, miux_tlv, miux_length);
356 gb_cur += miux_length;
357
348 kfree(version_tlv); 358 kfree(version_tlv);
349 kfree(lto_tlv); 359 kfree(lto_tlv);
350 360