staging: wilc1000: use ENOBUFS error code instead of WILC_TX_ERR_NO_BUF macro
authorAjay Singh <ajay.kathat@microchip.com>
Mon, 12 Nov 2018 05:45:32 +0000 (05:45 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Nov 2018 22:46:51 +0000 (14:46 -0800)
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 <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c
drivers/staging/wilc1000/wilc_wlan.c
drivers/staging/wilc1000/wilc_wlan_if.h

index 96d883418046ff658ae779995a71f65f7cfc2fc1..66fb9880740470ac6a294254f6a5fd947487f589 100644 (file)
@@ -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;
 }
index 563ce628a9eb21ed1d250280517a060e4b7484f4..f0b10e275204f871d594b335c2727a5aa19488c0 100644 (file)
@@ -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;
        }
 
index f4f6ac628a91b4f56f46721d864c0606539bbceb..e2310d8602918e3dc8f2581351085aae14ddb3d6 100644 (file)
@@ -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