linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>,
	Aloisio Almeida Jr <aloisio.almeida@openbossa.org>,
	Ilan Elias <ilane@ti.com>,
	Eric Lapuyade <eric.lapuyade@linux.intel.com>,
	linux-wireless@vger.kernel.org,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: [PATCH 17/18] NFC: Add MIUX to the local LLCP general bytes
Date: Tue, 10 Apr 2012 19:43:19 +0200	[thread overview]
Message-ID: <1334079800-10671-18-git-send-email-sameo@linux.intel.com> (raw)
In-Reply-To: <1334079800-10671-1-git-send-email-sameo@linux.intel.com>

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
---
 net/nfc/llcp/llcp.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c
index 2cf01e6..31a05e5 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)
 	u8 *gb_cur, *version_tlv, version, version_length;
 	u8 *lto_tlv, lto, lto_length;
 	u8 *wks_tlv, wks_length;
+	u8 *miux_tlv, miux_length;
+	__be16 miux;
 	u8 gb_len = 0;
 
 	version = LLCP_VERSION_11;
@@ -324,6 +326,11 @@ static int nfc_llcp_build_gb(struct nfc_llcp_local *local)
 				     &wks_length);
 	gb_len += wks_length;
 
+	miux = cpu_to_be16(LLCP_MAX_MIUX);
+	miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *)&miux, 0,
+				      &miux_length);
+	gb_len += miux_length;
+
 	gb_len += ARRAY_SIZE(llcp_magic);
 
 	if (gb_len > NFC_MAX_GT_LEN) {
@@ -345,6 +352,9 @@ static int nfc_llcp_build_gb(struct nfc_llcp_local *local)
 	memcpy(gb_cur, wks_tlv, wks_length);
 	gb_cur += wks_length;
 
+	memcpy(gb_cur, miux_tlv, miux_length);
+	gb_cur += miux_length;
+
 	kfree(version_tlv);
 	kfree(lto_tlv);
 
-- 
1.7.9.1


  parent reply	other threads:[~2012-04-10 17:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 17:43 [PATCH 00/18] NFC changes for 3.5 Samuel Ortiz
2012-04-10 17:43 ` [PATCH 01/18 3.4] NFC: Fix the LLCP Tx fragmentation loop Samuel Ortiz
2012-04-10 17:43 ` [PATCH 02/18] NFC: Add a target lost netlink event Samuel Ortiz
2012-04-10 17:43 ` [PATCH 03/18] NFC: Export target lost function Samuel Ortiz
2012-04-10 17:43 ` [PATCH 04/18] NFC: HCI support Samuel Ortiz
2012-04-10 17:43 ` [PATCH 05/18] NFC: SHDLC implementation Samuel Ortiz
2012-04-10 17:43 ` [PATCH 06/18] NFC: Add HCI documentation Samuel Ortiz
2012-04-10 17:43 ` [PATCH 07/18] NFC: The core part should generate the target index Samuel Ortiz
2012-04-10 17:43 ` [PATCH 08/18] NFC: Fix next target_idx type and rename for clarity Samuel Ortiz
2012-04-10 17:43 ` [PATCH 09/18] NFC: Changed target activated state logic Samuel Ortiz
2012-04-10 17:43 ` [PATCH 10/18] NFC: Add Core support to generate tag lost event Samuel Ortiz
2012-04-10 17:43 ` [PATCH 11/18] NFC: Dump LLCP frames Samuel Ortiz
2012-04-10 17:43 ` [PATCH 12/18] NFC: No need to apply twice the modulo op to LLCP's recv_n Samuel Ortiz
2012-04-10 17:43 ` [PATCH 13/18] NFC: Fix LLCP TLV building routine Samuel Ortiz
2012-04-10 17:43 ` [PATCH 14/18] NFC: Call llcp_add_header properly when sending LLCP DM or DISC Samuel Ortiz
2012-04-10 17:43 ` [PATCH 15/18] NFC: Convert pn533 from tasklet to workqueues Samuel Ortiz
2012-04-10 17:43 ` [PATCH 16/18] NFC: pn533 Rx chaining support Samuel Ortiz
2012-04-10 17:43 ` Samuel Ortiz [this message]
2012-04-10 17:43 ` [PATCH 18/18] NFC: Fix LLCP link timeout typo Samuel Ortiz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334079800-10671-18-git-send-email-sameo@linux.intel.com \
    --to=sameo@linux.intel.com \
    --cc=aloisio.almeida@openbossa.org \
    --cc=eric.lapuyade@linux.intel.com \
    --cc=ilane@ti.com \
    --cc=lauro.venancio@openbossa.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).