Skip to content

Commit

Permalink
Bluetooth: btintel_pcie: Refactor and code cleanup
Browse files Browse the repository at this point in the history
Minor refactor and s/TX_WAIT_TIMEOUT_MS/BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS/g.

Fixes: 6e65a09 ("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>
  • Loading branch information
Kiran K authored and Luiz Augusto von Dentz committed May 14, 2024
1 parent e5a43ef commit 6a486c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions drivers/bluetooth/btintel_pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/btintel_pcie.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6a486c1

Please sign in to comment.