Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306700
b: refs/heads/master
c: 03bed29
h: refs/heads/master
v: v3
  • Loading branch information
Eric Lapuyade authored and John W. Linville committed May 15, 2012
1 parent 2adc7f0 commit 4053a12
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4333459fb71461b93d911cf5fbc5de4eb0ae3714
refs/heads/master: 03bed29e0501b5757ce62ebdb01829f7bd8d9819
2 changes: 0 additions & 2 deletions trunk/include/net/nfc/hci.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ struct nfc_hci_dev {

u8 gate2pipe[NFC_HCI_MAX_GATES];

bool poll_started;

u8 sw_romlib;
u8 sw_patch;
u8 sw_flashlib_major;
Expand Down
21 changes: 4 additions & 17 deletions trunk/net/nfc/hci/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,6 @@ void nfc_hci_event_received(struct nfc_hci_dev *hdev, u8 pipe, u8 event,

switch (event) {
case NFC_HCI_EVT_TARGET_DISCOVERED:
if (hdev->poll_started == false) {
r = -EPROTO;
goto exit;
}

if (skb->len < 1) { /* no status data? */
r = -EPROTO;
goto exit;
Expand Down Expand Up @@ -489,28 +484,20 @@ static int hci_dev_down(struct nfc_dev *nfc_dev)
static int hci_start_poll(struct nfc_dev *nfc_dev, u32 protocols)
{
struct nfc_hci_dev *hdev = nfc_get_drvdata(nfc_dev);
int r;

if (hdev->ops->start_poll)
r = hdev->ops->start_poll(hdev, protocols);
return hdev->ops->start_poll(hdev, protocols);
else
r = nfc_hci_send_event(hdev, NFC_HCI_RF_READER_A_GATE,
return nfc_hci_send_event(hdev, NFC_HCI_RF_READER_A_GATE,
NFC_HCI_EVT_READER_REQUESTED, NULL, 0);
if (r == 0)
hdev->poll_started = true;

return r;
}

static void hci_stop_poll(struct nfc_dev *nfc_dev)
{
struct nfc_hci_dev *hdev = nfc_get_drvdata(nfc_dev);

if (hdev->poll_started) {
nfc_hci_send_event(hdev, NFC_HCI_RF_READER_A_GATE,
NFC_HCI_EVT_END_OPERATION, NULL, 0);
hdev->poll_started = false;
}
nfc_hci_send_event(hdev, NFC_HCI_RF_READER_A_GATE,
NFC_HCI_EVT_END_OPERATION, NULL, 0);
}

static int hci_activate_target(struct nfc_dev *nfc_dev,
Expand Down

0 comments on commit 4053a12

Please sign in to comment.