diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 21:46:43 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 21:46:43 -0400 |
| commit | 15f7176eb1cccec0a332541285ee752b935c1c85 (patch) | |
| tree | 9d33689be7415388ed57f437faaae883a4978a85 /drivers | |
| parent | d3d52d687a770973b459d8a92ec1adbba3f60c4b (diff) | |
| parent | 321dee6e8b235c496f0a068a72d8df9a4e13ceb9 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
wireless: remove duplicated .ndo_set_mac_address
netfilter: xtables: fix IPv6 dependency in the cluster match
tg3: Add GRO support.
niu: Add GRO support.
ucc_geth: Fix use-after-of_node_put() in ucc_geth_probe().
gianfar: Fix use-after-of_node_put() in gfar_of_init().
kernel: remove HIPQUAD()
netpoll: store local and remote ip in net-endian
netfilter: fix endian bug in conntrack printks
dmascc: fix incomplete conversion to network_device_ops
gso: Fix support for linear packets
skbuff.h: fix missing kernel-doc
ni5010: convert to net_device_ops
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/gianfar.c | 2 | ||||
| -rw-r--r-- | drivers/net/hamradio/dmascc.c | 2 | ||||
| -rw-r--r-- | drivers/net/netconsole.c | 10 | ||||
| -rw-r--r-- | drivers/net/ni5010.c | 18 | ||||
| -rw-r--r-- | drivers/net/niu.c | 12 | ||||
| -rw-r--r-- | drivers/net/tg3.c | 4 | ||||
| -rw-r--r-- | drivers/net/ucc_geth.c | 11 | ||||
| -rw-r--r-- | drivers/net/wireless/airo.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 1 | ||||
| -rw-r--r-- | drivers/net/wireless/prism54/islpci_dev.c | 1 | ||||
| -rw-r--r-- | drivers/net/wireless/zd1201.c | 1 |
11 files changed, 33 insertions, 31 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 6a38800be3f1..65f55877be95 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
| @@ -289,9 +289,9 @@ static int gfar_of_init(struct net_device *dev) | |||
| 289 | id = of_get_property(phy, "reg", NULL); | 289 | id = of_get_property(phy, "reg", NULL); |
| 290 | 290 | ||
| 291 | of_node_put(phy); | 291 | of_node_put(phy); |
| 292 | of_node_put(mdio); | ||
| 293 | 292 | ||
| 294 | fsl_pq_mdio_bus_name(bus_name, mdio); | 293 | fsl_pq_mdio_bus_name(bus_name, mdio); |
| 294 | of_node_put(mdio); | ||
| 295 | snprintf(priv->phy_bus_id, sizeof(priv->phy_bus_id), "%s:%02x", | 295 | snprintf(priv->phy_bus_id, sizeof(priv->phy_bus_id), "%s:%02x", |
| 296 | bus_name, *id); | 296 | bus_name, *id); |
| 297 | } | 297 | } |
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index 881bf818bb48..7459b3ac77a9 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c | |||
| @@ -445,6 +445,7 @@ static const struct net_device_ops scc_netdev_ops = { | |||
| 445 | .ndo_stop = scc_close, | 445 | .ndo_stop = scc_close, |
| 446 | .ndo_start_xmit = scc_send_packet, | 446 | .ndo_start_xmit = scc_send_packet, |
| 447 | .ndo_do_ioctl = scc_ioctl, | 447 | .ndo_do_ioctl = scc_ioctl, |
| 448 | .ndo_set_mac_address = scc_set_mac_address, | ||
| 448 | }; | 449 | }; |
| 449 | 450 | ||
| 450 | static int __init setup_adapter(int card_base, int type, int n) | 451 | static int __init setup_adapter(int card_base, int type, int n) |
| @@ -584,7 +585,6 @@ static int __init setup_adapter(int card_base, int type, int n) | |||
| 584 | dev->irq = irq; | 585 | dev->irq = irq; |
| 585 | dev->netdev_ops = &scc_netdev_ops; | 586 | dev->netdev_ops = &scc_netdev_ops; |
| 586 | dev->header_ops = &ax25_header_ops; | 587 | dev->header_ops = &ax25_header_ops; |
| 587 | dev->set_mac_address = scc_set_mac_address; | ||
| 588 | } | 588 | } |
| 589 | if (register_netdev(info->dev[0])) { | 589 | if (register_netdev(info->dev[0])) { |
| 590 | printk(KERN_ERR "dmascc: could not register %s\n", | 590 | printk(KERN_ERR "dmascc: could not register %s\n", |
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index d304d38cd5d1..eceadf787a67 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
| @@ -294,14 +294,12 @@ static ssize_t show_remote_port(struct netconsole_target *nt, char *buf) | |||
| 294 | 294 | ||
| 295 | static ssize_t show_local_ip(struct netconsole_target *nt, char *buf) | 295 | static ssize_t show_local_ip(struct netconsole_target *nt, char *buf) |
| 296 | { | 296 | { |
| 297 | return snprintf(buf, PAGE_SIZE, "%d.%d.%d.%d\n", | 297 | return snprintf(buf, PAGE_SIZE, "%pI4\n", &nt->np.local_ip); |
| 298 | HIPQUAD(nt->np.local_ip)); | ||
| 299 | } | 298 | } |
| 300 | 299 | ||
| 301 | static ssize_t show_remote_ip(struct netconsole_target *nt, char *buf) | 300 | static ssize_t show_remote_ip(struct netconsole_target *nt, char *buf) |
| 302 | { | 301 | { |
| 303 | return snprintf(buf, PAGE_SIZE, "%d.%d.%d.%d\n", | 302 | return snprintf(buf, PAGE_SIZE, "%pI4\n", &nt->np.remote_ip); |
| 304 | HIPQUAD(nt->np.remote_ip)); | ||
| 305 | } | 303 | } |
| 306 | 304 | ||
| 307 | static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) | 305 | static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) |
| @@ -438,7 +436,7 @@ static ssize_t store_local_ip(struct netconsole_target *nt, | |||
| 438 | return -EINVAL; | 436 | return -EINVAL; |
| 439 | } | 437 | } |
| 440 | 438 | ||
| 441 | nt->np.local_ip = ntohl(in_aton(buf)); | 439 | nt->np.local_ip = in_aton(buf); |
| 442 | 440 | ||
| 443 | return strnlen(buf, count); | 441 | return strnlen(buf, count); |
| 444 | } | 442 | } |
| @@ -454,7 +452,7 @@ static ssize_t store_remote_ip(struct netconsole_target *nt, | |||
| 454 | return -EINVAL; | 452 | return -EINVAL; |
| 455 | } | 453 | } |
| 456 | 454 | ||
| 457 | nt->np.remote_ip = ntohl(in_aton(buf)); | 455 | nt->np.remote_ip = in_aton(buf); |
| 458 | 456 | ||
| 459 | return strnlen(buf, count); | 457 | return strnlen(buf, count); |
| 460 | } | 458 | } |
diff --git a/drivers/net/ni5010.c b/drivers/net/ni5010.c index 539e18ab485c..2a8da476ab3d 100644 --- a/drivers/net/ni5010.c +++ b/drivers/net/ni5010.c | |||
| @@ -189,6 +189,17 @@ static void __init trigger_irq(int ioaddr) | |||
| 189 | outb(MM_EN_XMT|MM_MUX, IE_MMODE); /* Start transmission */ | 189 | outb(MM_EN_XMT|MM_MUX, IE_MMODE); /* Start transmission */ |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | static const struct net_device_ops ni5010_netdev_ops = { | ||
| 193 | .ndo_open = ni5010_open, | ||
| 194 | .ndo_stop = ni5010_close, | ||
| 195 | .ndo_start_xmit = ni5010_send_packet, | ||
| 196 | .ndo_set_multicast_list = ni5010_set_multicast_list, | ||
| 197 | .ndo_tx_timeout = ni5010_timeout, | ||
| 198 | .ndo_validate_addr = eth_validate_addr, | ||
| 199 | .ndo_set_mac_address = eth_mac_addr, | ||
| 200 | .ndo_change_mtu = eth_change_mtu, | ||
| 201 | }; | ||
| 202 | |||
| 192 | /* | 203 | /* |
| 193 | * This is the real probe routine. Linux has a history of friendly device | 204 | * This is the real probe routine. Linux has a history of friendly device |
| 194 | * probes on the ISA bus. A good device probes avoids doing writes, and | 205 | * probes on the ISA bus. A good device probes avoids doing writes, and |
| @@ -328,13 +339,8 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr) | |||
| 328 | outb(0, IE_RBUF); /* set buffer byte 0 to 0 again */ | 339 | outb(0, IE_RBUF); /* set buffer byte 0 to 0 again */ |
| 329 | } | 340 | } |
| 330 | printk("-> bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE); | 341 | printk("-> bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE); |
| 331 | memset(netdev_priv(dev), 0, sizeof(struct ni5010_local)); | ||
| 332 | 342 | ||
| 333 | dev->open = ni5010_open; | 343 | dev->netdev_ops = &ni5010_netdev_ops; |
| 334 | dev->stop = ni5010_close; | ||
| 335 | dev->hard_start_xmit = ni5010_send_packet; | ||
| 336 | dev->set_multicast_list = ni5010_set_multicast_list; | ||
| 337 | dev->tx_timeout = ni5010_timeout; | ||
| 338 | dev->watchdog_timeo = HZ/20; | 344 | dev->watchdog_timeo = HZ/20; |
| 339 | 345 | ||
| 340 | dev->flags &= ~IFF_MULTICAST; /* Multicast doesn't work */ | 346 | dev->flags &= ~IFF_MULTICAST; /* Multicast doesn't work */ |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 50c11126a3db..02c37e2f08a9 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
| @@ -3441,7 +3441,8 @@ static int niu_rx_pkt_ignore(struct niu *np, struct rx_ring_info *rp) | |||
| 3441 | return num_rcr; | 3441 | return num_rcr; |
| 3442 | } | 3442 | } |
| 3443 | 3443 | ||
| 3444 | static int niu_process_rx_pkt(struct niu *np, struct rx_ring_info *rp) | 3444 | static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np, |
| 3445 | struct rx_ring_info *rp) | ||
| 3445 | { | 3446 | { |
| 3446 | unsigned int index = rp->rcr_index; | 3447 | unsigned int index = rp->rcr_index; |
| 3447 | struct sk_buff *skb; | 3448 | struct sk_buff *skb; |
| @@ -3518,7 +3519,7 @@ static int niu_process_rx_pkt(struct niu *np, struct rx_ring_info *rp) | |||
| 3518 | 3519 | ||
| 3519 | skb->protocol = eth_type_trans(skb, np->dev); | 3520 | skb->protocol = eth_type_trans(skb, np->dev); |
| 3520 | skb_record_rx_queue(skb, rp->rx_channel); | 3521 | skb_record_rx_queue(skb, rp->rx_channel); |
| 3521 | netif_receive_skb(skb); | 3522 | napi_gro_receive(napi, skb); |
| 3522 | 3523 | ||
| 3523 | return num_rcr; | 3524 | return num_rcr; |
| 3524 | } | 3525 | } |
| @@ -3706,7 +3707,8 @@ static inline void niu_sync_rx_discard_stats(struct niu *np, | |||
| 3706 | } | 3707 | } |
| 3707 | } | 3708 | } |
| 3708 | 3709 | ||
| 3709 | static int niu_rx_work(struct niu *np, struct rx_ring_info *rp, int budget) | 3710 | static int niu_rx_work(struct napi_struct *napi, struct niu *np, |
| 3711 | struct rx_ring_info *rp, int budget) | ||
| 3710 | { | 3712 | { |
| 3711 | int qlen, rcr_done = 0, work_done = 0; | 3713 | int qlen, rcr_done = 0, work_done = 0; |
| 3712 | struct rxdma_mailbox *mbox = rp->mbox; | 3714 | struct rxdma_mailbox *mbox = rp->mbox; |
| @@ -3728,7 +3730,7 @@ static int niu_rx_work(struct niu *np, struct rx_ring_info *rp, int budget) | |||
| 3728 | rcr_done = work_done = 0; | 3730 | rcr_done = work_done = 0; |
| 3729 | qlen = min(qlen, budget); | 3731 | qlen = min(qlen, budget); |
| 3730 | while (work_done < qlen) { | 3732 | while (work_done < qlen) { |
| 3731 | rcr_done += niu_process_rx_pkt(np, rp); | 3733 | rcr_done += niu_process_rx_pkt(napi, np, rp); |
| 3732 | work_done++; | 3734 | work_done++; |
| 3733 | } | 3735 | } |
| 3734 | 3736 | ||
| @@ -3776,7 +3778,7 @@ static int niu_poll_core(struct niu *np, struct niu_ldg *lp, int budget) | |||
| 3776 | if (rx_vec & (1 << rp->rx_channel)) { | 3778 | if (rx_vec & (1 << rp->rx_channel)) { |
| 3777 | int this_work_done; | 3779 | int this_work_done; |
| 3778 | 3780 | ||
| 3779 | this_work_done = niu_rx_work(np, rp, | 3781 | this_work_done = niu_rx_work(&lp->napi, np, rp, |
| 3780 | budget); | 3782 | budget); |
| 3781 | 3783 | ||
| 3782 | budget -= this_work_done; | 3784 | budget -= this_work_done; |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index f7efcecc4108..1205c2a22657 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
| @@ -4392,7 +4392,7 @@ static void tg3_recycle_rx(struct tg3 *tp, u32 opaque_key, | |||
| 4392 | #if TG3_VLAN_TAG_USED | 4392 | #if TG3_VLAN_TAG_USED |
| 4393 | static int tg3_vlan_rx(struct tg3 *tp, struct sk_buff *skb, u16 vlan_tag) | 4393 | static int tg3_vlan_rx(struct tg3 *tp, struct sk_buff *skb, u16 vlan_tag) |
| 4394 | { | 4394 | { |
| 4395 | return vlan_hwaccel_receive_skb(skb, tp->vlgrp, vlan_tag); | 4395 | return vlan_gro_receive(&tp->napi, tp->vlgrp, vlan_tag, skb); |
| 4396 | } | 4396 | } |
| 4397 | #endif | 4397 | #endif |
| 4398 | 4398 | ||
| @@ -4539,7 +4539,7 @@ static int tg3_rx(struct tg3 *tp, int budget) | |||
| 4539 | desc->err_vlan & RXD_VLAN_MASK); | 4539 | desc->err_vlan & RXD_VLAN_MASK); |
| 4540 | } else | 4540 | } else |
| 4541 | #endif | 4541 | #endif |
| 4542 | netif_receive_skb(skb); | 4542 | napi_gro_receive(&tp->napi, skb); |
| 4543 | 4543 | ||
| 4544 | received++; | 4544 | received++; |
| 4545 | budget--; | 4545 | budget--; |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 86a479f61c0c..933fcfbf35e1 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
| @@ -3648,15 +3648,16 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
| 3648 | mdio = of_get_parent(phy); | 3648 | mdio = of_get_parent(phy); |
| 3649 | 3649 | ||
| 3650 | if (mdio == NULL) | 3650 | if (mdio == NULL) |
| 3651 | return -1; | 3651 | return -ENODEV; |
| 3652 | 3652 | ||
| 3653 | err = of_address_to_resource(mdio, 0, &res); | 3653 | err = of_address_to_resource(mdio, 0, &res); |
| 3654 | of_node_put(mdio); | ||
| 3655 | |||
| 3656 | if (err) | ||
| 3657 | return -1; | ||
| 3658 | 3654 | ||
| 3655 | if (err) { | ||
| 3656 | of_node_put(mdio); | ||
| 3657 | return err; | ||
| 3658 | } | ||
| 3659 | fsl_pq_mdio_bus_name(bus_name, mdio); | 3659 | fsl_pq_mdio_bus_name(bus_name, mdio); |
| 3660 | of_node_put(mdio); | ||
| 3660 | snprintf(ug_info->phy_bus_id, sizeof(ug_info->phy_bus_id), | 3661 | snprintf(ug_info->phy_bus_id, sizeof(ug_info->phy_bus_id), |
| 3661 | "%s:%02x", bus_name, *prop); | 3662 | "%s:%02x", bus_name, *prop); |
| 3662 | } | 3663 | } |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 31b1cc2b778a..f21a6171c691 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
| @@ -2752,7 +2752,6 @@ static const struct net_device_ops airo_netdev_ops = { | |||
| 2752 | .ndo_set_mac_address = airo_set_mac_address, | 2752 | .ndo_set_mac_address = airo_set_mac_address, |
| 2753 | .ndo_do_ioctl = airo_ioctl, | 2753 | .ndo_do_ioctl = airo_ioctl, |
| 2754 | .ndo_change_mtu = airo_change_mtu, | 2754 | .ndo_change_mtu = airo_change_mtu, |
| 2755 | .ndo_set_mac_address = eth_mac_addr, | ||
| 2756 | .ndo_validate_addr = eth_validate_addr, | 2755 | .ndo_validate_addr = eth_validate_addr, |
| 2757 | }; | 2756 | }; |
| 2758 | 2757 | ||
| @@ -2765,7 +2764,6 @@ static const struct net_device_ops mpi_netdev_ops = { | |||
| 2765 | .ndo_set_mac_address = airo_set_mac_address, | 2764 | .ndo_set_mac_address = airo_set_mac_address, |
| 2766 | .ndo_do_ioctl = airo_ioctl, | 2765 | .ndo_do_ioctl = airo_ioctl, |
| 2767 | .ndo_change_mtu = airo_change_mtu, | 2766 | .ndo_change_mtu = airo_change_mtu, |
| 2768 | .ndo_set_mac_address = eth_mac_addr, | ||
| 2769 | .ndo_validate_addr = eth_validate_addr, | 2767 | .ndo_validate_addr = eth_validate_addr, |
| 2770 | }; | 2768 | }; |
| 2771 | 2769 | ||
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index b3449948a25a..4a92af1d7877 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
| @@ -11593,7 +11593,6 @@ static const struct net_device_ops ipw_netdev_ops = { | |||
| 11593 | .ndo_set_mac_address = ipw_net_set_mac_address, | 11593 | .ndo_set_mac_address = ipw_net_set_mac_address, |
| 11594 | .ndo_start_xmit = ieee80211_xmit, | 11594 | .ndo_start_xmit = ieee80211_xmit, |
| 11595 | .ndo_change_mtu = ieee80211_change_mtu, | 11595 | .ndo_change_mtu = ieee80211_change_mtu, |
| 11596 | .ndo_set_mac_address = eth_mac_addr, | ||
| 11597 | .ndo_validate_addr = eth_validate_addr, | 11596 | .ndo_validate_addr = eth_validate_addr, |
| 11598 | }; | 11597 | }; |
| 11599 | 11598 | ||
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c index 166ed9584601..e26d7b3ceab5 100644 --- a/drivers/net/wireless/prism54/islpci_dev.c +++ b/drivers/net/wireless/prism54/islpci_dev.c | |||
| @@ -803,7 +803,6 @@ static const struct net_device_ops islpci_netdev_ops = { | |||
| 803 | .ndo_tx_timeout = islpci_eth_tx_timeout, | 803 | .ndo_tx_timeout = islpci_eth_tx_timeout, |
| 804 | .ndo_set_mac_address = prism54_set_mac_address, | 804 | .ndo_set_mac_address = prism54_set_mac_address, |
| 805 | .ndo_change_mtu = eth_change_mtu, | 805 | .ndo_change_mtu = eth_change_mtu, |
| 806 | .ndo_set_mac_address = eth_mac_addr, | ||
| 807 | .ndo_validate_addr = eth_validate_addr, | 806 | .ndo_validate_addr = eth_validate_addr, |
| 808 | }; | 807 | }; |
| 809 | 808 | ||
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index 9b244c96b221..5fabd9c0f07a 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c | |||
| @@ -1725,7 +1725,6 @@ static const struct net_device_ops zd1201_netdev_ops = { | |||
| 1725 | .ndo_set_multicast_list = zd1201_set_multicast, | 1725 | .ndo_set_multicast_list = zd1201_set_multicast, |
| 1726 | .ndo_set_mac_address = zd1201_set_mac_address, | 1726 | .ndo_set_mac_address = zd1201_set_mac_address, |
| 1727 | .ndo_change_mtu = eth_change_mtu, | 1727 | .ndo_change_mtu = eth_change_mtu, |
| 1728 | .ndo_set_mac_address = eth_mac_addr, | ||
| 1729 | .ndo_validate_addr = eth_validate_addr, | 1728 | .ndo_validate_addr = eth_validate_addr, |
| 1730 | }; | 1729 | }; |
| 1731 | 1730 | ||
