From: Ajay Singh Date: Mon, 12 Nov 2018 05:45:32 +0000 (+0000) Subject: staging: wilc1000: use ENOBUFS error code instead of WILC_TX_ERR_NO_BUF macro X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=68b4f745cf19633568ea459f7a741aef370ea0da;p=openwrt%2Fstaging%2Fblogic.git staging: wilc1000: use ENOBUFS error code instead of WILC_TX_ERR_NO_BUF macro Make use of 'ENOBUFS' instead of WILC_TX_ERR_NO_BUF macro. The value of WILC_TX_ERR_NO_BUF is -2, which is confusing with ENOENT error code. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 96d883418046..66fb98807404 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -242,7 +242,7 @@ static int linux_wlan_txq_task(void *vp) if (netif_queue_stopped(wl->vif[1]->ndev)) netif_wake_queue(wl->vif[1]->ndev); } - } while (ret == WILC_TX_ERR_NO_BUF && !wl->close); + } while (ret == -ENOBUFS && !wl->close); } return 0; } diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 563ce628a9eb..f0b10e275204 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -611,7 +611,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count) goto out_release_bus; if (entries == 0) { - ret = WILC_TX_ERR_NO_BUF; + ret = -ENOBUFS; goto out_release_bus; } diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index f4f6ac628a91..e2310d860291 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -41,8 +41,6 @@ struct tx_complete_data { typedef void (*wilc_tx_complete_func_t)(void *, int); -#define WILC_TX_ERR_NO_BUF (-2) - /******************************************** * * Wlan Configuration ID