Skip to content

Commit 6a486c1

Browse files
kirankrishnappa-intelVudentz
authored andcommitted
Bluetooth: btintel_pcie: Refactor and code cleanup
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 <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent e5a43ef commit 6a486c1

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

drivers/bluetooth/btintel_pcie.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static int btintel_pcie_send_sync(struct btintel_pcie_data *data,
151151

152152
/* Wait for the complete interrupt - URBD0 */
153153
ret = wait_event_timeout(data->tx_wait_q, data->tx_wait_done,
154-
msecs_to_jiffies(TX_WAIT_TIMEOUT_MS));
154+
msecs_to_jiffies(BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS));
155155
if (!ret)
156156
return -ETIME;
157157

@@ -1096,10 +1096,9 @@ static int btintel_pcie_send_frame(struct hci_dev *hdev,
10961096
hdev->stat.err_tx++;
10971097
bt_dev_err(hdev, "Failed to send frame (%d)", ret);
10981098
goto exit_error;
1099-
} else {
1100-
hdev->stat.byte_tx += skb->len;
1101-
kfree_skb(skb);
11021099
}
1100+
hdev->stat.byte_tx += skb->len;
1101+
kfree_skb(skb);
11031102

11041103
exit_error:
11051104
return ret;

drivers/bluetooth/btintel_pcie.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ enum {
8787
/* DMA allocation alignment */
8888
#define BTINTEL_PCIE_DMA_POOL_ALIGNMENT 256
8989

90-
#define TX_WAIT_TIMEOUT_MS 500
90+
#define BTINTEL_PCIE_TX_WAIT_TIMEOUT_MS 500
9191

9292
/* Doorbell vector for TFD */
9393
#define BTINTEL_PCIE_TX_DB_VEC 0

0 commit comments

Comments
 (0)