Commit d555b1f2 authored by Sean Wang's avatar Sean Wang Committed by Marcel Holtmann

Bluetooth: btmtksdio: drop the unnecessary variable created

Use the existent variable to drop the unnecessary variable created.
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent db57b625
...@@ -98,6 +98,7 @@ MODULE_DEVICE_TABLE(sdio, btmtksdio_table); ...@@ -98,6 +98,7 @@ MODULE_DEVICE_TABLE(sdio, btmtksdio_table);
#define MTK_SDIO_BLOCK_SIZE 256 #define MTK_SDIO_BLOCK_SIZE 256
#define BTMTKSDIO_TX_WAIT_VND_EVT 1 #define BTMTKSDIO_TX_WAIT_VND_EVT 1
#define BTMTKSDIO_HW_TX_READY 2
struct mtkbtsdio_hdr { struct mtkbtsdio_hdr {
__le16 len; __le16 len;
...@@ -113,7 +114,6 @@ struct btmtksdio_dev { ...@@ -113,7 +114,6 @@ struct btmtksdio_dev {
struct work_struct txrx_work; struct work_struct txrx_work;
unsigned long tx_state; unsigned long tx_state;
struct sk_buff_head txq; struct sk_buff_head txq;
bool hw_tx_ready;
struct sk_buff *evt_skb; struct sk_buff *evt_skb;
...@@ -254,7 +254,7 @@ static int btmtksdio_tx_packet(struct btmtksdio_dev *bdev, ...@@ -254,7 +254,7 @@ static int btmtksdio_tx_packet(struct btmtksdio_dev *bdev,
sdio_hdr->reserved = cpu_to_le16(0); sdio_hdr->reserved = cpu_to_le16(0);
sdio_hdr->bt_type = hci_skb_pkt_type(skb); sdio_hdr->bt_type = hci_skb_pkt_type(skb);
bdev->hw_tx_ready = false; clear_bit(BTMTKSDIO_HW_TX_READY, &bdev->tx_state);
err = sdio_writesb(bdev->func, MTK_REG_CTDR, skb->data, err = sdio_writesb(bdev->func, MTK_REG_CTDR, skb->data,
round_up(skb->len, MTK_SDIO_BLOCK_SIZE)); round_up(skb->len, MTK_SDIO_BLOCK_SIZE));
if (err < 0) if (err < 0)
...@@ -484,11 +484,12 @@ static void btmtksdio_txrx_work(struct work_struct *work) ...@@ -484,11 +484,12 @@ static void btmtksdio_txrx_work(struct work_struct *work)
bt_dev_dbg(bdev->hdev, "Get fw own back"); bt_dev_dbg(bdev->hdev, "Get fw own back");
if (int_status & TX_EMPTY) if (int_status & TX_EMPTY)
bdev->hw_tx_ready = true; set_bit(BTMTKSDIO_HW_TX_READY, &bdev->tx_state);
else if (unlikely(int_status & TX_FIFO_OVERFLOW)) else if (unlikely(int_status & TX_FIFO_OVERFLOW))
bt_dev_warn(bdev->hdev, "Tx fifo overflow"); bt_dev_warn(bdev->hdev, "Tx fifo overflow");
if (bdev->hw_tx_ready) { if (test_bit(BTMTKSDIO_HW_TX_READY, &bdev->tx_state)) {
skb = skb_dequeue(&bdev->txq); skb = skb_dequeue(&bdev->txq);
if (skb) { if (skb) {
err = btmtksdio_tx_packet(bdev, skb); err = btmtksdio_tx_packet(bdev, skb);
...@@ -832,7 +833,7 @@ static int btmtksdio_setup(struct hci_dev *hdev) ...@@ -832,7 +833,7 @@ static int btmtksdio_setup(struct hci_dev *hdev)
u32 fw_version = 0; u32 fw_version = 0;
calltime = ktime_get(); calltime = ktime_get();
bdev->hw_tx_ready = true; set_bit(BTMTKSDIO_HW_TX_READY, &bdev->tx_state);
switch (bdev->data->chipid) { switch (bdev->data->chipid) {
case 0x7921: case 0x7921:
......
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