diff options
author | Mike McCormack <mikem@ring3k.org> | 2010-09-24 18:39:41 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-29 23:15:18 -0700 |
commit | 1f1f19ff628ac3936f88465efb07efde0a4e5a5a (patch) | |
tree | 3d23ca9d929f55faea83f346fbf546de6dd3b7b6 | |
parent | 067ba6cf6c09b14057f6b8999933fd5780d68a25 (diff) | |
download | linux-1f1f19ff628ac3936f88465efb07efde0a4e5a5a.tar.bz2 |
Staging: rtl8192e: Clean up rtl8192_pci_initdescring()
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/rtl8192e/r8192E_core.c | 46 |
1 files changed, 18 insertions, 28 deletions
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index 8761adbda329..adbf41bc51a2 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c @@ -1598,41 +1598,31 @@ static int rtl8192_alloc_tx_desc_ring(struct net_device *dev, return 0; } - static short rtl8192_pci_initdescring(struct net_device *dev) { - u32 ret; - int i; - struct r8192_priv *priv = ieee80211_priv(dev); - - ret = rtl8192_alloc_rx_desc_ring(dev); - if (ret) { - return ret; - } - + u32 ret; + int i; + struct r8192_priv *priv = ieee80211_priv(dev); - /* general process for other queue */ - for (i = 0; i < MAX_TX_QUEUE_COUNT; i++) { - ret = rtl8192_alloc_tx_desc_ring(dev, i, priv->txringcount); - if (ret) - goto err_free_rings; - } + ret = rtl8192_alloc_rx_desc_ring(dev); + if (ret) + return ret; -#if 0 - /* specific process for hardware beacon process */ - ret = rtl8192_alloc_tx_desc_ring(dev, MAX_TX_QUEUE_COUNT - 1, 2); - if (ret) - goto err_free_rings; -#endif + /* general process for other queue */ + for (i = 0; i < MAX_TX_QUEUE_COUNT; i++) { + ret = rtl8192_alloc_tx_desc_ring(dev, i, priv->txringcount); + if (ret) + goto err_free_rings; + } - return 0; + return 0; err_free_rings: - rtl8192_free_rx_ring(dev); - for (i = 0; i < MAX_TX_QUEUE_COUNT; i++) - if (priv->tx_ring[i].desc) - rtl8192_free_tx_ring(dev, i); - return 1; + rtl8192_free_rx_ring(dev); + for (i = 0; i < MAX_TX_QUEUE_COUNT; i++) + if (priv->tx_ring[i].desc) + rtl8192_free_tx_ring(dev, i); + return 1; } static void rtl8192_pci_resetdescring(struct net_device *dev) |