mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
Bluetooth: btintel_pcie: Refactor and code cleanup
Minor refactor and s/TX_WAIT_TIMEOUT_MS/BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS/g.
Fixes: 6e65a09f92
("Bluetooth: btintel_pcie: Add *setup* function to download firmware")
Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
e5a43efba2
commit
6a486c1361
@ -151,7 +151,7 @@ static int btintel_pcie_send_sync(struct btintel_pcie_data *data,
|
|||||||
|
|
||||||
/* Wait for the complete interrupt - URBD0 */
|
/* Wait for the complete interrupt - URBD0 */
|
||||||
ret = wait_event_timeout(data->tx_wait_q, data->tx_wait_done,
|
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)
|
if (!ret)
|
||||||
return -ETIME;
|
return -ETIME;
|
||||||
|
|
||||||
@ -1096,10 +1096,9 @@ static int btintel_pcie_send_frame(struct hci_dev *hdev,
|
|||||||
hdev->stat.err_tx++;
|
hdev->stat.err_tx++;
|
||||||
bt_dev_err(hdev, "Failed to send frame (%d)", ret);
|
bt_dev_err(hdev, "Failed to send frame (%d)", ret);
|
||||||
goto exit_error;
|
goto exit_error;
|
||||||
} else {
|
|
||||||
hdev->stat.byte_tx += skb->len;
|
|
||||||
kfree_skb(skb);
|
|
||||||
}
|
}
|
||||||
|
hdev->stat.byte_tx += skb->len;
|
||||||
|
kfree_skb(skb);
|
||||||
|
|
||||||
exit_error:
|
exit_error:
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -87,7 +87,7 @@ enum {
|
|||||||
/* DMA allocation alignment */
|
/* DMA allocation alignment */
|
||||||
#define BTINTEL_PCIE_DMA_POOL_ALIGNMENT 256
|
#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 */
|
/* Doorbell vector for TFD */
|
||||||
#define BTINTEL_PCIE_TX_DB_VEC 0
|
#define BTINTEL_PCIE_TX_DB_VEC 0
|
||||||
|
Loading…
Reference in New Issue
Block a user