Commit 6a486c13 authored by Kiran K's avatar Kiran K Committed by Luiz Augusto von Dentz

Bluetooth: btintel_pcie: Refactor and code cleanup

Minor refactor and s/TX_WAIT_TIMEOUT_MS/BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS/g.

Fixes: 6e65a09f ("Bluetooth: btintel_pcie: Add *setup* function to download firmware")
Signed-off-by: default avatarKiran K <kiran.k@intel.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent e5a43efb
......@@ -151,7 +151,7 @@ static int btintel_pcie_send_sync(struct btintel_pcie_data *data,
/* Wait for the complete interrupt - URBD0 */
ret = wait_event_timeout(data->tx_wait_q, data->tx_wait_done,
msecs_to_jiffies(TX_WAIT_TIMEOUT_MS));
msecs_to_jiffies(BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS));
if (!ret)
return -ETIME;
......@@ -1096,10 +1096,9 @@ static int btintel_pcie_send_frame(struct hci_dev *hdev,
hdev->stat.err_tx++;
bt_dev_err(hdev, "Failed to send frame (%d)", ret);
goto exit_error;
} else {
hdev->stat.byte_tx += skb->len;
kfree_skb(skb);
}
hdev->stat.byte_tx += skb->len;
kfree_skb(skb);
exit_error:
return ret;
......
......@@ -87,7 +87,7 @@ enum {
/* DMA allocation alignment */
#define BTINTEL_PCIE_DMA_POOL_ALIGNMENT 256
#define TX_WAIT_TIMEOUT_MS 500
#define BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS 500
/* Doorbell vector for TFD */
#define BTINTEL_PCIE_TX_DB_VEC 0
......
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