Commit 261795f4 authored by Peng Li's avatar Peng Li Committed by David S. Miller

net: wan: code indent use tabs where possible

Code indent should use tabs where possible.
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f0328a19
...@@ -54,7 +54,7 @@ struct port { ...@@ -54,7 +54,7 @@ struct port {
struct net_device *dev; struct net_device *dev;
struct card *card; struct card *card;
spinlock_t lock; /* for wanxl_xmit */ spinlock_t lock; /* for wanxl_xmit */
int node; /* physical port #0 - 3 */ int node; /* physical port #0 - 3 */
unsigned int clock_type; unsigned int clock_type;
int tx_in, tx_out; int tx_in, tx_out;
struct sk_buff *tx_skbs[TX_BUFFERS]; struct sk_buff *tx_skbs[TX_BUFFERS];
...@@ -153,7 +153,7 @@ static inline void wanxl_tx_intr(struct port *port) ...@@ -153,7 +153,7 @@ static inline void wanxl_tx_intr(struct port *port)
struct net_device *dev = port->dev; struct net_device *dev = port->dev;
while (1) { while (1) {
desc_t *desc = &get_status(port)->tx_descs[port->tx_in]; desc_t *desc = &get_status(port)->tx_descs[port->tx_in];
struct sk_buff *skb = port->tx_skbs[port->tx_in]; struct sk_buff *skb = port->tx_skbs[port->tx_in];
switch (desc->stat) { switch (desc->stat) {
...@@ -171,12 +171,12 @@ static inline void wanxl_tx_intr(struct port *port) ...@@ -171,12 +171,12 @@ static inline void wanxl_tx_intr(struct port *port)
dev->stats.tx_packets++; dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len; dev->stats.tx_bytes += skb->len;
} }
desc->stat = PACKET_EMPTY; /* Free descriptor */ desc->stat = PACKET_EMPTY; /* Free descriptor */
dma_unmap_single(&port->card->pdev->dev, desc->address, dma_unmap_single(&port->card->pdev->dev, desc->address,
skb->len, DMA_TO_DEVICE); skb->len, DMA_TO_DEVICE);
dev_consume_skb_irq(skb); dev_consume_skb_irq(skb);
port->tx_in = (port->tx_in + 1) % TX_BUFFERS; port->tx_in = (port->tx_in + 1) % TX_BUFFERS;
} }
} }
/* Receive complete interrupt service */ /* Receive complete interrupt service */
...@@ -233,15 +233,15 @@ static inline void wanxl_rx_intr(struct card *card) ...@@ -233,15 +233,15 @@ static inline void wanxl_rx_intr(struct card *card)
static irqreturn_t wanxl_intr(int irq, void *dev_id) static irqreturn_t wanxl_intr(int irq, void *dev_id)
{ {
struct card *card = dev_id; struct card *card = dev_id;
int i; int i;
u32 stat; u32 stat;
int handled = 0; int handled = 0;
while((stat = readl(card->plx + PLX_DOORBELL_FROM_CARD)) != 0) { while ((stat = readl(card->plx + PLX_DOORBELL_FROM_CARD)) != 0) {
handled = 1; handled = 1;
writel(stat, card->plx + PLX_DOORBELL_FROM_CARD); writel(stat, card->plx + PLX_DOORBELL_FROM_CARD);
for (i = 0; i < card->n_ports; i++) { for (i = 0; i < card->n_ports; i++) {
if (stat & (1 << (DOORBELL_FROM_CARD_TX_0 + i))) if (stat & (1 << (DOORBELL_FROM_CARD_TX_0 + i)))
wanxl_tx_intr(&card->ports[i]); wanxl_tx_intr(&card->ports[i]);
if (stat & (1 << (DOORBELL_FROM_CARD_CABLE_0 + i))) if (stat & (1 << (DOORBELL_FROM_CARD_CABLE_0 + i)))
...@@ -249,9 +249,9 @@ static irqreturn_t wanxl_intr(int irq, void *dev_id) ...@@ -249,9 +249,9 @@ static irqreturn_t wanxl_intr(int irq, void *dev_id)
} }
if (stat & (1 << DOORBELL_FROM_CARD_RX)) if (stat & (1 << DOORBELL_FROM_CARD_RX))
wanxl_rx_intr(card); wanxl_rx_intr(card);
} }
return IRQ_RETVAL(handled); return IRQ_RETVAL(handled);
} }
static netdev_tx_t wanxl_xmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t wanxl_xmit(struct sk_buff *skb, struct net_device *dev)
...@@ -259,11 +259,11 @@ static netdev_tx_t wanxl_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -259,11 +259,11 @@ static netdev_tx_t wanxl_xmit(struct sk_buff *skb, struct net_device *dev)
struct port *port = dev_to_port(dev); struct port *port = dev_to_port(dev);
desc_t *desc; desc_t *desc;
spin_lock(&port->lock); spin_lock(&port->lock);
desc = &get_status(port)->tx_descs[port->tx_out]; desc = &get_status(port)->tx_descs[port->tx_out];
if (desc->stat != PACKET_EMPTY) { if (desc->stat != PACKET_EMPTY) {
/* should never happen - previous xmit should stop queue */ /* should never happen - previous xmit should stop queue */
#ifdef DEBUG_PKT #ifdef DEBUG_PKT
printk(KERN_DEBUG "%s: transmitter buffer full\n", dev->name); printk(KERN_DEBUG "%s: transmitter buffer full\n", dev->name);
#endif #endif
...@@ -366,7 +366,7 @@ static int wanxl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ...@@ -366,7 +366,7 @@ static int wanxl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
default: default:
return hdlc_ioctl(dev, ifr, cmd); return hdlc_ioctl(dev, ifr, cmd);
} }
} }
static int wanxl_open(struct net_device *dev) static int wanxl_open(struct net_device *dev)
......
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