diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
commit | 2ed0e21b30b53d3a94e204196e523e6c8f732b56 (patch) | |
tree | de2635426477d86338a9469ce09ba0626052288f /drivers/net/irda/au1k_ir.c | |
parent | 0fa213310cd8fa7a51071cdcf130e26fa56e9549 (diff) | |
parent | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1244 commits)
pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US
ipv4: Fix fib_trie rebalancing
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
Bluetooth: Fix Kconfig issue with RFKILL integration
PIM-SM: namespace changes
ipv4: update ARPD help text
net: use a deferred timer in rt_check_expire
ieee802154: fix kconfig bool/tristate muckup
bonding: initialization rework
bonding: use is_zero_ether_addr
bonding: network device names are case sensative
bonding: elminate bad refcount code
bonding: fix style issues
bonding: fix destructor
bonding: remove bonding read/write semaphore
bonding: initialize before registration
bonding: bond_create always called with default parameters
x_tables: Convert printk to pr_err
netfilter: conntrack: optional reliable conntrack event delivery
list_nulls: add hlist_nulls_add_head and hlist_nulls_del
...
Diffstat (limited to 'drivers/net/irda/au1k_ir.c')
-rw-r--r-- | drivers/net/irda/au1k_ir.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c index 941164076a2b..c4361d466597 100644 --- a/drivers/net/irda/au1k_ir.c +++ b/drivers/net/irda/au1k_ir.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
26 | #include <linux/etherdevice.h> | ||
26 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
27 | #include <linux/rtnetlink.h> | 28 | #include <linux/rtnetlink.h> |
28 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
@@ -198,6 +199,17 @@ static int au1k_irda_init_iobuf(iobuff_t *io, int size) | |||
198 | return io->head ? 0 : -ENOMEM; | 199 | return io->head ? 0 : -ENOMEM; |
199 | } | 200 | } |
200 | 201 | ||
202 | static const struct net_device_ops au1k_irda_netdev_ops = { | ||
203 | .ndo_open = au1k_irda_start, | ||
204 | .ndo_stop = au1k_irda_stop, | ||
205 | .ndo_start_xmit = au1k_irda_hard_xmit, | ||
206 | .ndo_tx_timeout = au1k_tx_timeout, | ||
207 | .ndo_do_ioctl = au1k_irda_ioctl, | ||
208 | .ndo_change_mtu = eth_change_mtu, | ||
209 | .ndo_validate_addr = eth_validate_addr, | ||
210 | .ndo_set_mac_address = eth_mac_addr, | ||
211 | }; | ||
212 | |||
201 | static int au1k_irda_net_init(struct net_device *dev) | 213 | static int au1k_irda_net_init(struct net_device *dev) |
202 | { | 214 | { |
203 | struct au1k_private *aup = netdev_priv(dev); | 215 | struct au1k_private *aup = netdev_priv(dev); |
@@ -209,11 +221,7 @@ static int au1k_irda_net_init(struct net_device *dev) | |||
209 | if (err) | 221 | if (err) |
210 | goto out1; | 222 | goto out1; |
211 | 223 | ||
212 | dev->open = au1k_irda_start; | 224 | dev->netdev_ops = &au1k_irda_netdev_ops; |
213 | dev->hard_start_xmit = au1k_irda_hard_xmit; | ||
214 | dev->stop = au1k_irda_stop; | ||
215 | dev->do_ioctl = au1k_irda_ioctl; | ||
216 | dev->tx_timeout = au1k_tx_timeout; | ||
217 | 225 | ||
218 | irda_init_max_qos_capabilies(&aup->qos); | 226 | irda_init_max_qos_capabilies(&aup->qos); |
219 | 227 | ||
@@ -504,13 +512,13 @@ static int au1k_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev) | |||
504 | printk(KERN_DEBUG "%s: tx_full\n", dev->name); | 512 | printk(KERN_DEBUG "%s: tx_full\n", dev->name); |
505 | netif_stop_queue(dev); | 513 | netif_stop_queue(dev); |
506 | aup->tx_full = 1; | 514 | aup->tx_full = 1; |
507 | return 1; | 515 | return NETDEV_TX_BUSY; |
508 | } | 516 | } |
509 | else if (((aup->tx_head + 1) & (NUM_IR_DESC - 1)) == aup->tx_tail) { | 517 | else if (((aup->tx_head + 1) & (NUM_IR_DESC - 1)) == aup->tx_tail) { |
510 | printk(KERN_DEBUG "%s: tx_full\n", dev->name); | 518 | printk(KERN_DEBUG "%s: tx_full\n", dev->name); |
511 | netif_stop_queue(dev); | 519 | netif_stop_queue(dev); |
512 | aup->tx_full = 1; | 520 | aup->tx_full = 1; |
513 | return 1; | 521 | return NETDEV_TX_BUSY; |
514 | } | 522 | } |
515 | 523 | ||
516 | pDB = aup->tx_db_inuse[aup->tx_head]; | 524 | pDB = aup->tx_db_inuse[aup->tx_head]; |