]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
enic: do vlan cleanup
authorJiri Pirko <jpirko@redhat.com>
Wed, 20 Jul 2011 04:54:18 +0000 (04:54 +0000)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 7 Feb 2012 02:59:53 +0000 (18:59 -0800)
- unify vlan and nonvlan rx path
- kill enic->vlan_group and enic_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 6ede746b62627b6f03fe88afad1a07d38917b85d)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
drivers/net/enic/enic.h
drivers/net/enic/enic_main.c

index f0b062b4a2239cb24eaa64d4bbc5361e6169fd96..ce76d9a8ca6edaf8c113f97866cc22b9e5c51ea7 100644 (file)
@@ -94,7 +94,6 @@ struct enic {
        ____cacheline_aligned struct vnic_wq wq[ENIC_WQ_MAX];
        spinlock_t wq_lock[ENIC_WQ_MAX];
        unsigned int wq_count;
-       struct vlan_group *vlan_group;
        u16 loop_enable;
        u16 loop_tag;
 
index c72fd0450379a8a2f4b7313f0be09ac205bb2cc5..4c1d22159e130d67d6f6b0aaa78ba957f6db5ce2 100644 (file)
@@ -1028,14 +1028,6 @@ static void enic_set_rx_mode(struct net_device *netdev)
        }
 }
 
-/* rtnl lock is held */
-static void enic_vlan_rx_register(struct net_device *netdev,
-       struct vlan_group *vlan_group)
-{
-       struct enic *enic = netdev_priv(netdev);
-       enic->vlan_group = vlan_group;
-}
-
 /* netif_tx_lock held, BHs disabled */
 static void enic_tx_timeout(struct net_device *netdev)
 {
@@ -1263,23 +1255,13 @@ static void enic_rq_indicate_buf(struct vnic_rq *rq,
 
                skb->dev = netdev;
 
-               if (vlan_stripped) {
-
-                       if (netdev->features & NETIF_F_GRO)
-                               vlan_gro_receive(&enic->napi[q_number],
-                                       enic->vlan_group, vlan_tci, skb);
-                       else
-                               vlan_hwaccel_receive_skb(skb,
-                                       enic->vlan_group, vlan_tci);
+               if (vlan_stripped)
+                       __vlan_hwaccel_put_tag(skb, vlan_tci);
 
-               } else {
-
-                       if (netdev->features & NETIF_F_GRO)
-                               napi_gro_receive(&enic->napi[q_number], skb);
-                       else
-                               netif_receive_skb(skb);
-
-               }
+               if (netdev->features & NETIF_F_GRO)
+                       napi_gro_receive(&enic->napi[q_number], skb);
+               else
+                       netif_receive_skb(skb);
        } else {
 
                /* Buffer overflow
@@ -2123,7 +2105,6 @@ static const struct net_device_ops enic_netdev_dynamic_ops = {
        .ndo_set_multicast_list = enic_set_rx_mode,
        .ndo_set_mac_address    = enic_set_mac_address_dynamic,
        .ndo_change_mtu         = enic_change_mtu,
-       .ndo_vlan_rx_register   = enic_vlan_rx_register,
        .ndo_vlan_rx_add_vid    = enic_vlan_rx_add_vid,
        .ndo_vlan_rx_kill_vid   = enic_vlan_rx_kill_vid,
        .ndo_tx_timeout         = enic_tx_timeout,
@@ -2145,7 +2126,6 @@ static const struct net_device_ops enic_netdev_ops = {
        .ndo_set_rx_mode        = enic_set_rx_mode,
        .ndo_set_multicast_list = enic_set_rx_mode,
        .ndo_change_mtu         = enic_change_mtu,
-       .ndo_vlan_rx_register   = enic_vlan_rx_register,
        .ndo_vlan_rx_add_vid    = enic_vlan_rx_add_vid,
        .ndo_vlan_rx_kill_vid   = enic_vlan_rx_kill_vid,
        .ndo_tx_timeout         = enic_tx_timeout,