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

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
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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);
	}

exit_error:
	return ret;
+1 −1
Original line number Diff line number Diff line
@@ -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