aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tehuti.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-07-20 00:54:26 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-21 16:47:55 -0400
commit312cd51353a4f5940eea963570b8b14b7d9290c4 (patch)
tree377e7709392953950dd2100cbc199d4255a71569 /drivers/net/tehuti.c
parent9c5d061429b0abc74bcd95d1896a848d1ab663b1 (diff)
tehuti: do vlan cleanup
- unify vlan and nonvlan rx path - kill priv->vlgrp and bdx_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/tehuti.c')
-rw-r--r--drivers/net/tehuti.c37
1 files changed, 7 insertions, 30 deletions
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index 80fbee0d40af..749bbf18dc6a 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -742,22 +742,6 @@ static void bdx_vlan_rx_kill_vid(struct net_device *ndev, unsigned short vid)
742 __bdx_vlan_rx_vid(ndev, vid, 0); 742 __bdx_vlan_rx_vid(ndev, vid, 0);
743} 743}
744 744
745/*
746 * bdx_vlan_rx_register - kernel hook for adding VLAN group
747 * @ndev network device
748 * @grp VLAN group
749 */
750static void
751bdx_vlan_rx_register(struct net_device *ndev, struct vlan_group *grp)
752{
753 struct bdx_priv *priv = netdev_priv(ndev);
754
755 ENTER;
756 DBG("device='%s', group='%p'\n", ndev->name, grp);
757 priv->vlgrp = grp;
758 RET();
759}
760
761/** 745/**
762 * bdx_change_mtu - Change the Maximum Transfer Unit 746 * bdx_change_mtu - Change the Maximum Transfer Unit
763 * @netdev: network interface device structure 747 * @netdev: network interface device structure
@@ -1146,21 +1130,15 @@ NETIF_RX_MUX(struct bdx_priv *priv, u32 rxd_val1, u16 rxd_vlan,
1146 struct sk_buff *skb) 1130 struct sk_buff *skb)
1147{ 1131{
1148 ENTER; 1132 ENTER;
1149 DBG("rxdd->flags.bits.vtag=%d vlgrp=%p\n", GET_RXD_VTAG(rxd_val1), 1133 DBG("rxdd->flags.bits.vtag=%d\n", GET_RXD_VTAG(rxd_val1));
1150 priv->vlgrp); 1134 if (GET_RXD_VTAG(rxd_val1)) {
1151 if (priv->vlgrp && GET_RXD_VTAG(rxd_val1)) { 1135 DBG("%s: vlan rcv vlan '%x' vtag '%x'\n",
1152 DBG("%s: vlan rcv vlan '%x' vtag '%x', device name '%s'\n",
1153 priv->ndev->name, 1136 priv->ndev->name,
1154 GET_RXD_VLAN_ID(rxd_vlan), 1137 GET_RXD_VLAN_ID(rxd_vlan),
1155 GET_RXD_VTAG(rxd_val1), 1138 GET_RXD_VTAG(rxd_val1));
1156 vlan_group_get_device(priv->vlgrp, 1139 __vlan_hwaccel_put_tag(skb, GET_RXD_VLAN_TCI(rxd_vlan));
1157 GET_RXD_VLAN_ID(rxd_vlan))->name);
1158 /* NAPI variant of receive functions */
1159 vlan_hwaccel_receive_skb(skb, priv->vlgrp,
1160 GET_RXD_VLAN_TCI(rxd_vlan));
1161 } else {
1162 netif_receive_skb(skb);
1163 } 1140 }
1141 netif_receive_skb(skb);
1164} 1142}
1165 1143
1166static void bdx_recycle_skb(struct bdx_priv *priv, struct rxd_desc *rxdd) 1144static void bdx_recycle_skb(struct bdx_priv *priv, struct rxd_desc *rxdd)
@@ -1877,7 +1855,7 @@ static void bdx_tx_push_desc_safe(struct bdx_priv *priv, void *data, int size)
1877} 1855}
1878 1856
1879static const struct net_device_ops bdx_netdev_ops = { 1857static const struct net_device_ops bdx_netdev_ops = {
1880 .ndo_open = bdx_open, 1858 .ndo_open = bdx_open,
1881 .ndo_stop = bdx_close, 1859 .ndo_stop = bdx_close,
1882 .ndo_start_xmit = bdx_tx_transmit, 1860 .ndo_start_xmit = bdx_tx_transmit,
1883 .ndo_validate_addr = eth_validate_addr, 1861 .ndo_validate_addr = eth_validate_addr,
@@ -1885,7 +1863,6 @@ static const struct net_device_ops bdx_netdev_ops = {
1885 .ndo_set_multicast_list = bdx_setmulti, 1863 .ndo_set_multicast_list = bdx_setmulti,
1886 .ndo_change_mtu = bdx_change_mtu, 1864 .ndo_change_mtu = bdx_change_mtu,
1887 .ndo_set_mac_address = bdx_set_mac, 1865 .ndo_set_mac_address = bdx_set_mac,
1888 .ndo_vlan_rx_register = bdx_vlan_rx_register,
1889 .ndo_vlan_rx_add_vid = bdx_vlan_rx_add_vid, 1866 .ndo_vlan_rx_add_vid = bdx_vlan_rx_add_vid,
1890 .ndo_vlan_rx_kill_vid = bdx_vlan_rx_kill_vid, 1867 .ndo_vlan_rx_kill_vid = bdx_vlan_rx_kill_vid,
1891}; 1868};