Commit 89125618 authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: remove unnecessary while(0) in wilc_wlan_handle_txq()

Refactor wilc_wlan_handle_txq() by removing unnecessary while(0)
loop. "Line over 80 char" issues in wilc_wlan_handle_txq() are fix by
reducing extra leading tab.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c8d4e2e1
......@@ -583,9 +583,9 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
txb = wilc->tx_buffer;
wilc->txq_exit = 0;
do {
if (wilc->quit)
break;
goto out;
mutex_lock(&wilc->txq_add_to_head_cs);
wilc_wlan_txq_filter_dup_tcp_ack(dev);
......@@ -625,7 +625,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
} while (1);
if (i == 0)
break;
goto out;
vmm_table[i] = 0x0;
acquire_bus(wilc, ACQUIRE_AND_WAKEUP);
......@@ -642,8 +642,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
counter++;
if (counter > 200) {
counter = 0;
ret = func->hif_write_reg(wilc,
WILC_HOST_TX_CTRL, 0);
ret = func->hif_write_reg(wilc, WILC_HOST_TX_CTRL, 0);
break;
}
} while (!wilc->quit);
......@@ -665,9 +664,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
break;
do {
ret = func->hif_read_reg(wilc,
WILC_HOST_VMM_CTL,
&reg);
ret = func->hif_read_reg(wilc, WILC_HOST_VMM_CTL, &reg);
if (!ret)
break;
if ((reg >> 2) & 0x1) {
......@@ -677,9 +674,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
release_bus(wilc, RELEASE_ALLOW_SLEEP);
} while (--timeout);
if (timeout <= 0) {
ret = func->hif_write_reg(wilc,
WILC_HOST_VMM_CTL,
0x0);
ret = func->hif_write_reg(wilc, WILC_HOST_VMM_CTL, 0x0);
break;
}
......@@ -687,15 +682,11 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
break;
if (entries == 0) {
ret = func->hif_read_reg(wilc,
WILC_HOST_TX_CTRL,
&reg);
ret = func->hif_read_reg(wilc, WILC_HOST_TX_CTRL, &reg);
if (!ret)
break;
reg &= ~BIT(0);
ret = func->hif_write_reg(wilc,
WILC_HOST_TX_CTRL,
reg);
ret = func->hif_write_reg(wilc, WILC_HOST_TX_CTRL, reg);
if (!ret)
break;
break;
......@@ -768,15 +759,11 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
goto _end_;
ret = func->hif_block_tx_ext(wilc, 0, txb, offset);
if (!ret)
goto _end_;
_end_:
release_bus(wilc, RELEASE_ALLOW_SLEEP);
if (ret != 1)
break;
} while (0);
out:
mutex_unlock(&wilc->txq_add_to_head_cs);
wilc->txq_exit = 1;
......
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