Loading drivers/nfc/pn533.c +4 −4 Original line number Diff line number Diff line Loading @@ -1691,7 +1691,7 @@ static int pn533_data_exchange_complete(struct pn533 *dev, void *_arg, return 0; } static int pn533_data_exchange(struct nfc_dev *nfc_dev, static int pn533_transceive(struct nfc_dev *nfc_dev, struct nfc_target *target, struct sk_buff *skb, data_exchange_cb_t cb, void *cb_context) { Loading Loading @@ -1853,7 +1853,7 @@ struct nfc_ops pn533_nfc_ops = { .stop_poll = pn533_stop_poll, .activate_target = pn533_activate_target, .deactivate_target = pn533_deactivate_target, .data_exchange = pn533_data_exchange, .im_transceive = pn533_transceive, }; static int pn533_probe(struct usb_interface *interface, Loading include/net/nfc/nfc.h +2 −1 Original line number Diff line number Diff line Loading @@ -63,9 +63,10 @@ struct nfc_ops { u32 protocol); void (*deactivate_target)(struct nfc_dev *dev, struct nfc_target *target); int (*data_exchange)(struct nfc_dev *dev, struct nfc_target *target, int (*im_transceive)(struct nfc_dev *dev, struct nfc_target *target, struct sk_buff *skb, data_exchange_cb_t cb, void *cb_context); int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb); int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target); }; Loading net/nfc/core.c +20 −17 Original line number Diff line number Diff line Loading @@ -413,12 +413,7 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb, goto error; } if (dev->active_target == NULL) { rc = -ENOTCONN; kfree_skb(skb); goto error; } if (dev->rf_mode == NFC_RF_INITIATOR && dev->active_target != NULL) { if (dev->active_target->idx != target_idx) { rc = -EADDRNOTAVAIL; kfree_skb(skb); Loading @@ -428,12 +423,20 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb, if (dev->ops->check_presence) del_timer_sync(&dev->check_pres_timer); rc = dev->ops->data_exchange(dev, dev->active_target, skb, cb, rc = dev->ops->im_transceive(dev, dev->active_target, skb, cb, cb_context); if (!rc && dev->ops->check_presence) mod_timer(&dev->check_pres_timer, jiffies + msecs_to_jiffies(NFC_CHECK_PRES_FREQ_MS)); } else if (dev->rf_mode == NFC_RF_TARGET && dev->ops->tm_send != NULL) { rc = dev->ops->tm_send(dev, skb); } else { rc = -ENOTCONN; kfree_skb(skb); goto error; } error: device_unlock(&dev->dev); Loading Loading @@ -727,7 +730,7 @@ struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, struct nfc_dev *dev; if (!ops->start_poll || !ops->stop_poll || !ops->activate_target || !ops->deactivate_target || !ops->data_exchange) !ops->deactivate_target || !ops->im_transceive) return NULL; if (!supported_protocols) Loading net/nfc/hci/core.c +4 −4 Original line number Diff line number Diff line Loading @@ -512,7 +512,7 @@ static void hci_deactivate_target(struct nfc_dev *nfc_dev, { } static int hci_data_exchange(struct nfc_dev *nfc_dev, struct nfc_target *target, static int hci_transceive(struct nfc_dev *nfc_dev, struct nfc_target *target, struct sk_buff *skb, data_exchange_cb_t cb, void *cb_context) { Loading Loading @@ -580,7 +580,7 @@ static struct nfc_ops hci_nfc_ops = { .stop_poll = hci_stop_poll, .activate_target = hci_activate_target, .deactivate_target = hci_deactivate_target, .data_exchange = hci_data_exchange, .im_transceive = hci_transceive, .check_presence = hci_check_presence, }; Loading net/nfc/nci/core.c +4 −4 Original line number Diff line number Diff line Loading @@ -522,7 +522,7 @@ static void nci_deactivate_target(struct nfc_dev *nfc_dev, } } static int nci_data_exchange(struct nfc_dev *nfc_dev, struct nfc_target *target, static int nci_transceive(struct nfc_dev *nfc_dev, struct nfc_target *target, struct sk_buff *skb, data_exchange_cb_t cb, void *cb_context) { Loading Loading @@ -557,7 +557,7 @@ static struct nfc_ops nci_nfc_ops = { .stop_poll = nci_stop_poll, .activate_target = nci_activate_target, .deactivate_target = nci_deactivate_target, .data_exchange = nci_data_exchange, .im_transceive = nci_transceive, }; /* ---- Interface to NCI drivers ---- */ Loading Loading
drivers/nfc/pn533.c +4 −4 Original line number Diff line number Diff line Loading @@ -1691,7 +1691,7 @@ static int pn533_data_exchange_complete(struct pn533 *dev, void *_arg, return 0; } static int pn533_data_exchange(struct nfc_dev *nfc_dev, static int pn533_transceive(struct nfc_dev *nfc_dev, struct nfc_target *target, struct sk_buff *skb, data_exchange_cb_t cb, void *cb_context) { Loading Loading @@ -1853,7 +1853,7 @@ struct nfc_ops pn533_nfc_ops = { .stop_poll = pn533_stop_poll, .activate_target = pn533_activate_target, .deactivate_target = pn533_deactivate_target, .data_exchange = pn533_data_exchange, .im_transceive = pn533_transceive, }; static int pn533_probe(struct usb_interface *interface, Loading
include/net/nfc/nfc.h +2 −1 Original line number Diff line number Diff line Loading @@ -63,9 +63,10 @@ struct nfc_ops { u32 protocol); void (*deactivate_target)(struct nfc_dev *dev, struct nfc_target *target); int (*data_exchange)(struct nfc_dev *dev, struct nfc_target *target, int (*im_transceive)(struct nfc_dev *dev, struct nfc_target *target, struct sk_buff *skb, data_exchange_cb_t cb, void *cb_context); int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb); int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target); }; Loading
net/nfc/core.c +20 −17 Original line number Diff line number Diff line Loading @@ -413,12 +413,7 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb, goto error; } if (dev->active_target == NULL) { rc = -ENOTCONN; kfree_skb(skb); goto error; } if (dev->rf_mode == NFC_RF_INITIATOR && dev->active_target != NULL) { if (dev->active_target->idx != target_idx) { rc = -EADDRNOTAVAIL; kfree_skb(skb); Loading @@ -428,12 +423,20 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb, if (dev->ops->check_presence) del_timer_sync(&dev->check_pres_timer); rc = dev->ops->data_exchange(dev, dev->active_target, skb, cb, rc = dev->ops->im_transceive(dev, dev->active_target, skb, cb, cb_context); if (!rc && dev->ops->check_presence) mod_timer(&dev->check_pres_timer, jiffies + msecs_to_jiffies(NFC_CHECK_PRES_FREQ_MS)); } else if (dev->rf_mode == NFC_RF_TARGET && dev->ops->tm_send != NULL) { rc = dev->ops->tm_send(dev, skb); } else { rc = -ENOTCONN; kfree_skb(skb); goto error; } error: device_unlock(&dev->dev); Loading Loading @@ -727,7 +730,7 @@ struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, struct nfc_dev *dev; if (!ops->start_poll || !ops->stop_poll || !ops->activate_target || !ops->deactivate_target || !ops->data_exchange) !ops->deactivate_target || !ops->im_transceive) return NULL; if (!supported_protocols) Loading
net/nfc/hci/core.c +4 −4 Original line number Diff line number Diff line Loading @@ -512,7 +512,7 @@ static void hci_deactivate_target(struct nfc_dev *nfc_dev, { } static int hci_data_exchange(struct nfc_dev *nfc_dev, struct nfc_target *target, static int hci_transceive(struct nfc_dev *nfc_dev, struct nfc_target *target, struct sk_buff *skb, data_exchange_cb_t cb, void *cb_context) { Loading Loading @@ -580,7 +580,7 @@ static struct nfc_ops hci_nfc_ops = { .stop_poll = hci_stop_poll, .activate_target = hci_activate_target, .deactivate_target = hci_deactivate_target, .data_exchange = hci_data_exchange, .im_transceive = hci_transceive, .check_presence = hci_check_presence, }; Loading
net/nfc/nci/core.c +4 −4 Original line number Diff line number Diff line Loading @@ -522,7 +522,7 @@ static void nci_deactivate_target(struct nfc_dev *nfc_dev, } } static int nci_data_exchange(struct nfc_dev *nfc_dev, struct nfc_target *target, static int nci_transceive(struct nfc_dev *nfc_dev, struct nfc_target *target, struct sk_buff *skb, data_exchange_cb_t cb, void *cb_context) { Loading Loading @@ -557,7 +557,7 @@ static struct nfc_ops nci_nfc_ops = { .stop_poll = nci_stop_poll, .activate_target = nci_activate_target, .deactivate_target = nci_deactivate_target, .data_exchange = nci_data_exchange, .im_transceive = nci_transceive, }; /* ---- Interface to NCI drivers ---- */ Loading