Commit 2b5dbe08 authored by Christophe Ricard's avatar Christophe Ricard Committed by Samuel Ortiz

NFC: st-nci: Add error messages when an unexpected HCI event occurs

Potentially an unexpected HCI event may occur because of a
firmware bug. It could be transparent for the user but we need to
at least log it.
Signed-off-by: default avatarChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent b1fa4dc4
...@@ -280,6 +280,8 @@ static void st_nci_hci_admin_event_received(struct nci_dev *ndev, ...@@ -280,6 +280,8 @@ static void st_nci_hci_admin_event_received(struct nci_dev *ndev,
} }
} }
break; break;
default:
nfc_err(&ndev->nfc_dev->dev, "Unexpected event on admin gate\n");
} }
} }
...@@ -303,6 +305,9 @@ static int st_nci_hci_apdu_reader_event_received(struct nci_dev *ndev, ...@@ -303,6 +305,9 @@ static int st_nci_hci_apdu_reader_event_received(struct nci_dev *ndev,
mod_timer(&info->se_info.bwi_timer, jiffies + mod_timer(&info->se_info.bwi_timer, jiffies +
msecs_to_jiffies(info->se_info.wt_timeout)); msecs_to_jiffies(info->se_info.wt_timeout));
break; break;
default:
nfc_err(&ndev->nfc_dev->dev, "Unexpected event on apdu reader gate\n");
return 1;
} }
kfree_skb(skb); kfree_skb(skb);
...@@ -357,6 +362,7 @@ static int st_nci_hci_connectivity_event_received(struct nci_dev *ndev, ...@@ -357,6 +362,7 @@ static int st_nci_hci_connectivity_event_received(struct nci_dev *ndev,
r = nfc_se_transaction(ndev->nfc_dev, host, transaction); r = nfc_se_transaction(ndev->nfc_dev, host, transaction);
break; break;
default: default:
nfc_err(&ndev->nfc_dev->dev, "Unexpected event on connectivity gate\n");
return 1; return 1;
} }
kfree_skb(skb); kfree_skb(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment