summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2015-10-26 00:54:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-09 22:34:23 +0300
commit7fc3efcbf181df8ba61753887654633389a1fb37 (patch)
tree940c9cdb0c066cdbee30a8cad5d31ad0231e05d8 /net
parent37e8081d25e7b4ea1dde6ff19e847ca880ae8442 (diff)
downloadlinux-7fc3efcbf181df8ba61753887654633389a1fb37.tar.xz
NFC: nci: extract pipe value using NCI_HCP_MSG_GET_PIPE
commit e65917b6d54f8b47d8293ea96adfa604fd46cf0d upstream. When receiving data in nci_hci_msg_rx_work, extract pipe value using NCI_HCP_MSG_GET_PIPE macro. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/nfc/nci/hci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c
index b07092f4111b..30b09f04c142 100644
--- a/net/nfc/nci/hci.c
+++ b/net/nfc/nci/hci.c
@@ -402,7 +402,7 @@ static void nci_hci_msg_rx_work(struct work_struct *work)
u8 pipe, type, instruction;
while ((skb = skb_dequeue(&hdev->msg_rx_queue)) != NULL) {
- pipe = skb->data[0];
+ pipe = NCI_HCP_MSG_GET_PIPE(skb->data[0]);
skb_pull(skb, NCI_HCI_HCP_PACKET_HEADER_LEN);
message = (struct nci_hcp_message *)skb->data;
type = NCI_HCP_MSG_GET_TYPE(message->header);
@@ -439,7 +439,7 @@ void nci_hci_data_received_cb(void *context,
/* it's the last fragment. Does it need re-aggregation? */
if (skb_queue_len(&ndev->hci_dev->rx_hcp_frags)) {
- pipe = packet->header & NCI_HCI_FRAGMENT;
+ pipe = NCI_HCP_MSG_GET_PIPE(packet->header);
skb_queue_tail(&ndev->hci_dev->rx_hcp_frags, skb);
msg_len = 0;