Skip to content

Commit

Permalink
Merge tag 'nfc-next-3.8-1' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/sameo/nfc-3.0

This is the first NFC pull request for 3.8

With this one we have:

- pn544 p2p support.
- pn544 physical and HCI layers separation. We are getting the pn544 driver
  ready to support non i2c physical layers.
- LLCP SNL (Service Name Lookup). This is the NFC p2p service discovery
  protocol.
- LLCP datagram sockets (connection less) support.
- IDR library usage for NFC devices indexes assignement.
- NFC netlink extension for setting and getting LLCP link characteristics.
- Various code style fixes and cleanups spread over the pn533, LLCP, HCI and
  pn544 code.
  • Loading branch information
John W. Linville committed Oct 29, 2012
2 parents d1f1030 + 52feb44 commit e298c79
Show file tree
Hide file tree
Showing 25 changed files with 1,472 additions and 544 deletions.
2 changes: 1 addition & 1 deletion drivers/nfc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for nfc devices
#

obj-$(CONFIG_PN544_HCI_NFC) += pn544_hci.o
obj-$(CONFIG_PN544_HCI_NFC) += pn544/
obj-$(CONFIG_NFC_PN533) += pn533.o
obj-$(CONFIG_NFC_WILINK) += nfcwilink.o

Expand Down
18 changes: 10 additions & 8 deletions drivers/nfc/pn533.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ MODULE_DEVICE_TABLE(usb, pn533_table);
#define PN533_LISTEN_TIME 2

/* frame definitions */
#define PN533_NORMAL_FRAME_MAX_LEN 262 /* 6 (PREAMBLE, SOF, LEN, LCS, TFI)
254 (DATA)
2 (DCS, postamble) */

#define PN533_FRAME_TAIL_SIZE 2
#define PN533_FRAME_SIZE(f) (sizeof(struct pn533_frame) + f->datalen + \
PN533_FRAME_TAIL_SIZE)
Expand Down Expand Up @@ -1165,8 +1169,7 @@ static void pn533_poll_create_mod_list(struct pn533 *dev,
pn533_poll_add_mod(dev, PN533_LISTEN_MOD);
}

static int pn533_start_poll_complete(struct pn533 *dev, void *arg,
u8 *params, int params_len)
static int pn533_start_poll_complete(struct pn533 *dev, u8 *params, int params_len)
{
struct pn533_poll_response *resp;
int rc;
Expand Down Expand Up @@ -1304,8 +1307,7 @@ static void pn533_wq_tg_get_data(struct work_struct *work)
}

#define ATR_REQ_GB_OFFSET 17
static int pn533_init_target_complete(struct pn533 *dev, void *arg,
u8 *params, int params_len)
static int pn533_init_target_complete(struct pn533 *dev, u8 *params, int params_len)
{
struct pn533_cmd_init_target_response *resp;
u8 frame, comm_mode = NFC_COMM_PASSIVE, *gb;
Expand Down Expand Up @@ -1402,9 +1404,9 @@ static int pn533_poll_complete(struct pn533 *dev, void *arg,
if (cur_mod->len == 0) {
del_timer(&dev->listen_timer);

return pn533_init_target_complete(dev, arg, params, params_len);
return pn533_init_target_complete(dev, params, params_len);
} else {
rc = pn533_start_poll_complete(dev, arg, params, params_len);
rc = pn533_start_poll_complete(dev, params, params_len);
if (!rc)
return rc;
}
Expand Down Expand Up @@ -2373,9 +2375,9 @@ static int pn533_probe(struct usb_interface *interface,
goto error;
}

dev->in_frame = kmalloc(dev->in_maxlen, GFP_KERNEL);
dev->in_frame = kmalloc(PN533_NORMAL_FRAME_MAX_LEN, GFP_KERNEL);
dev->in_urb = usb_alloc_urb(0, GFP_KERNEL);
dev->out_frame = kmalloc(dev->out_maxlen, GFP_KERNEL);
dev->out_frame = kmalloc(PN533_NORMAL_FRAME_MAX_LEN, GFP_KERNEL);
dev->out_urb = usb_alloc_urb(0, GFP_KERNEL);

if (!dev->in_frame || !dev->out_frame ||
Expand Down
7 changes: 7 additions & 0 deletions drivers/nfc/pn544/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# Makefile for PN544 HCI based NFC driver
#

obj-$(CONFIG_PN544_HCI_NFC) += pn544_i2c.o

pn544_i2c-y := pn544.o i2c.o
Loading

0 comments on commit e298c79

Please sign in to comment.