NFC: Fix order of arguments to list_add_tail() when queueing HCP frames
authorMathias Jeppsson <mathias.jeppsson@sonymobile.com>
Fri, 6 Jul 2012 22:53:19 +0000 (00:53 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 10 Jul 2012 15:42:51 +0000 (11:42 -0400)
The HCP message should be added to transmit queue, not the other way around.

Signed-off-by: Mathias Jeppsson <mathias.jeppsson@sonymobile.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/nfc/hci/hcp.c

index 7212cf2c5785c9418ea98f9f6068a54428da764d..f4dad1a8974078864fd43f650e52598a6b46c566 100644 (file)
@@ -105,7 +105,7 @@ int nfc_hci_hcp_message_tx(struct nfc_hci_dev *hdev, u8 pipe,
        }
 
        mutex_lock(&hdev->msg_tx_mutex);
-       list_add_tail(&hdev->msg_tx_queue, &cmd->msg_l);
+       list_add_tail(&cmd->msg_l, &hdev->msg_tx_queue);
        mutex_unlock(&hdev->msg_tx_mutex);
 
        queue_work(hdev->msg_tx_wq, &hdev->msg_tx_work);