diff options
author | Christophe Ricard <christophe.ricard@gmail.com> | 2015-10-25 17:54:22 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2015-10-26 01:53:12 -0400 |
commit | e65917b6d54f8b47d8293ea96adfa604fd46cf0d (patch) | |
tree | bc9bebf790b060576aa47509bc093942da48e492 /net/nfc | |
parent | d8cd37ed2fc871c66b4c79c59f651dc2cdf7091c (diff) |
NFC: nci: extract pipe value using NCI_HCP_MSG_GET_PIPE
When receiving data in nci_hci_msg_rx_work, extract pipe
value using NCI_HCP_MSG_GET_PIPE macro.
Cc: stable@vger.kernel.org
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/nci/hci.c | 4 |
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) | |||
402 | u8 pipe, type, instruction; | 402 | u8 pipe, type, instruction; |
403 | 403 | ||
404 | while ((skb = skb_dequeue(&hdev->msg_rx_queue)) != NULL) { | 404 | while ((skb = skb_dequeue(&hdev->msg_rx_queue)) != NULL) { |
405 | pipe = skb->data[0]; | 405 | pipe = NCI_HCP_MSG_GET_PIPE(skb->data[0]); |
406 | skb_pull(skb, NCI_HCI_HCP_PACKET_HEADER_LEN); | 406 | skb_pull(skb, NCI_HCI_HCP_PACKET_HEADER_LEN); |
407 | message = (struct nci_hcp_message *)skb->data; | 407 | message = (struct nci_hcp_message *)skb->data; |
408 | type = NCI_HCP_MSG_GET_TYPE(message->header); | 408 | type = NCI_HCP_MSG_GET_TYPE(message->header); |
@@ -439,7 +439,7 @@ void nci_hci_data_received_cb(void *context, | |||
439 | 439 | ||
440 | /* it's the last fragment. Does it need re-aggregation? */ | 440 | /* it's the last fragment. Does it need re-aggregation? */ |
441 | if (skb_queue_len(&ndev->hci_dev->rx_hcp_frags)) { | 441 | if (skb_queue_len(&ndev->hci_dev->rx_hcp_frags)) { |
442 | pipe = packet->header & NCI_HCI_FRAGMENT; | 442 | pipe = NCI_HCP_MSG_GET_PIPE(packet->header); |
443 | skb_queue_tail(&ndev->hci_dev->rx_hcp_frags, skb); | 443 | skb_queue_tail(&ndev->hci_dev->rx_hcp_frags, skb); |
444 | 444 | ||
445 | msg_len = 0; | 445 | msg_len = 0; |