diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-07-20 06:54:07 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-21 22:47:53 +0200 |
commit | b49500957a2c90a559dd91f0dcfeb83d84458664 (patch) | |
tree | b776fdec11b66f39fbf4412241af993fb1b385da /drivers/net/ehea | |
parent | nes: do vlan cleanup (diff) | |
download | linux-b49500957a2c90a559dd91f0dcfeb83d84458664.tar.xz linux-b49500957a2c90a559dd91f0dcfeb83d84458664.zip |
ehea: do vlan cleanup
- unify vlan and nonvlan rx path
- kill port->vgrp and ehea_vlan_rx_register
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ehea')
-rw-r--r-- | drivers/net/ehea/ehea.h | 1 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 54 |
2 files changed, 7 insertions, 48 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 6c7257bd73fc..7dd5e6a0d998 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h @@ -457,7 +457,6 @@ struct ehea_port { struct ehea_port_res port_res[EHEA_MAX_PORT_RES]; struct platform_device ofdev; /* Open Firmware Device */ struct ehea_mc_list *mc_list; /* Multicast MAC addresses */ - struct vlan_group *vgrp; struct ehea_eq *qp_eq; struct work_struct reset_task; struct mutex port_lock; diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 3fd5a2400348..be2cb4ab8b4f 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -683,24 +683,13 @@ static int get_skb_hdr(struct sk_buff *skb, void **iphdr, static void ehea_proc_skb(struct ehea_port_res *pr, struct ehea_cqe *cqe, struct sk_buff *skb) { - int vlan_extracted = ((cqe->status & EHEA_CQE_VLAN_TAG_XTRACT) && - pr->port->vgrp); - - if (skb->dev->features & NETIF_F_LRO) { - if (vlan_extracted) - lro_vlan_hwaccel_receive_skb(&pr->lro_mgr, skb, - pr->port->vgrp, - cqe->vlan_tag, - cqe); - else - lro_receive_skb(&pr->lro_mgr, skb, cqe); - } else { - if (vlan_extracted) - vlan_hwaccel_receive_skb(skb, pr->port->vgrp, - cqe->vlan_tag); - else - netif_receive_skb(skb); - } + if (cqe->status & EHEA_CQE_VLAN_TAG_XTRACT) + __vlan_hwaccel_put_tag(skb, cqe->vlan_tag); + + if (skb->dev->features & NETIF_F_LRO) + lro_receive_skb(&pr->lro_mgr, skb, cqe); + else + netif_receive_skb(skb); } static int ehea_proc_rwqes(struct net_device *dev, @@ -2339,32 +2328,6 @@ static int ehea_start_xmit(struct sk_buff *skb, struct net_device *dev) return NETDEV_TX_OK; } -static void ehea_vlan_rx_register(struct net_device *dev, - struct vlan_group *grp) -{ - struct ehea_port *port = netdev_priv(dev); - struct ehea_adapter *adapter = port->adapter; - struct hcp_ehea_port_cb1 *cb1; - u64 hret; - - port->vgrp = grp; - - cb1 = (void *)get_zeroed_page(GFP_KERNEL); - if (!cb1) { - pr_err("no mem for cb1\n"); - goto out; - } - - hret = ehea_h_modify_ehea_port(adapter->handle, port->logical_port_id, - H_PORT_CB1, H_PORT_CB1_ALL, cb1); - if (hret != H_SUCCESS) - pr_err("modify_ehea_port failed\n"); - - free_page((unsigned long)cb1); -out: - return; -} - static void ehea_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) { struct ehea_port *port = netdev_priv(dev); @@ -2406,8 +2369,6 @@ static void ehea_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) int index; u64 hret; - vlan_group_set_device(port->vgrp, vid, NULL); - cb1 = (void *)get_zeroed_page(GFP_KERNEL); if (!cb1) { pr_err("no mem for cb1\n"); @@ -3202,7 +3163,6 @@ static const struct net_device_ops ehea_netdev_ops = { .ndo_validate_addr = eth_validate_addr, .ndo_set_multicast_list = ehea_set_multicast_list, .ndo_change_mtu = ehea_change_mtu, - .ndo_vlan_rx_register = ehea_vlan_rx_register, .ndo_vlan_rx_add_vid = ehea_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = ehea_vlan_rx_kill_vid, .ndo_tx_timeout = ehea_tx_watchdog, |