提交 7aed48d9 编写于 作者: M Mike McCormack 提交者: Greg Kroah-Hartman

staging: rtl8192e: Fix indent of some functions

Signed-off-by: NMike McCormack <mikem@ring3k.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 61d0e67a
...@@ -850,8 +850,9 @@ void rtl8192_set_chan(struct net_device *dev,short ch) ...@@ -850,8 +850,9 @@ void rtl8192_set_chan(struct net_device *dev,short ch)
void rtl8192_rx_enable(struct net_device *dev) void rtl8192_rx_enable(struct net_device *dev)
{ {
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
write_nic_dword(dev, RDQDA,priv->rx_ring_dma);
write_nic_dword(dev, RDQDA,priv->rx_ring_dma);
} }
/* the TX_DESC_BASE setting is according to the following queue index /* the TX_DESC_BASE setting is according to the following queue index
...@@ -868,54 +869,55 @@ void rtl8192_rx_enable(struct net_device *dev) ...@@ -868,54 +869,55 @@ void rtl8192_rx_enable(struct net_device *dev)
static const u32 TX_DESC_BASE[] = {BKQDA, BEQDA, VIQDA, VOQDA, HCCAQDA, CQDA, MQDA, HQDA, BQDA}; static const u32 TX_DESC_BASE[] = {BKQDA, BEQDA, VIQDA, VOQDA, HCCAQDA, CQDA, MQDA, HQDA, BQDA};
void rtl8192_tx_enable(struct net_device *dev) void rtl8192_tx_enable(struct net_device *dev)
{ {
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
u32 i; u32 i;
for (i = 0; i < MAX_TX_QUEUE_COUNT; i++)
write_nic_dword(dev, TX_DESC_BASE[i], priv->tx_ring[i].dma);
ieee80211_reset_queue(priv->ieee80211); for (i = 0; i < MAX_TX_QUEUE_COUNT; i++)
write_nic_dword(dev, TX_DESC_BASE[i], priv->tx_ring[i].dma);
ieee80211_reset_queue(priv->ieee80211);
} }
static void rtl8192_free_rx_ring(struct net_device *dev) static void rtl8192_free_rx_ring(struct net_device *dev)
{ {
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
int i; int i;
for (i = 0; i < priv->rxringcount; i++) { for (i = 0; i < priv->rxringcount; i++) {
struct sk_buff *skb = priv->rx_buf[i]; struct sk_buff *skb = priv->rx_buf[i];
if (!skb) if (!skb)
continue; continue;
pci_unmap_single(priv->pdev, pci_unmap_single(priv->pdev,
*((dma_addr_t *)skb->cb), *((dma_addr_t *)skb->cb),
priv->rxbuffersize, PCI_DMA_FROMDEVICE); priv->rxbuffersize, PCI_DMA_FROMDEVICE);
kfree_skb(skb); kfree_skb(skb);
} }
pci_free_consistent(priv->pdev, sizeof(*priv->rx_ring) * priv->rxringcount, pci_free_consistent(priv->pdev, sizeof(*priv->rx_ring) * priv->rxringcount,
priv->rx_ring, priv->rx_ring_dma); priv->rx_ring, priv->rx_ring_dma);
priv->rx_ring = NULL; priv->rx_ring = NULL;
} }
static void rtl8192_free_tx_ring(struct net_device *dev, unsigned int prio) static void rtl8192_free_tx_ring(struct net_device *dev, unsigned int prio)
{ {
struct r8192_priv *priv = ieee80211_priv(dev); struct r8192_priv *priv = ieee80211_priv(dev);
struct rtl8192_tx_ring *ring = &priv->tx_ring[prio]; struct rtl8192_tx_ring *ring = &priv->tx_ring[prio];
while (skb_queue_len(&ring->queue)) { while (skb_queue_len(&ring->queue)) {
tx_desc_819x_pci *entry = &ring->desc[ring->idx]; tx_desc_819x_pci *entry = &ring->desc[ring->idx];
struct sk_buff *skb = __skb_dequeue(&ring->queue); struct sk_buff *skb = __skb_dequeue(&ring->queue);
pci_unmap_single(priv->pdev, le32_to_cpu(entry->TxBuffAddr), pci_unmap_single(priv->pdev, le32_to_cpu(entry->TxBuffAddr),
skb->len, PCI_DMA_TODEVICE); skb->len, PCI_DMA_TODEVICE);
kfree_skb(skb); kfree_skb(skb);
ring->idx = (ring->idx + 1) % ring->entries; ring->idx = (ring->idx + 1) % ring->entries;
} }
pci_free_consistent(priv->pdev, sizeof(*ring->desc)*ring->entries, pci_free_consistent(priv->pdev, sizeof(*ring->desc)*ring->entries,
ring->desc, ring->dma); ring->desc, ring->dma);
ring->desc = NULL; ring->desc = NULL;
} }
void PHY_SetRtl8192eRfOff(struct net_device* dev) void PHY_SetRtl8192eRfOff(struct net_device* dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册