diff options
-rw-r--r-- | drivers/net/chelsio/cxgb2.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index 5fb0038b8549..482741797ebf 100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c | |||
@@ -1010,6 +1010,23 @@ void t1_fatal_err(struct adapter *adapter) | |||
1010 | adapter->name); | 1010 | adapter->name); |
1011 | } | 1011 | } |
1012 | 1012 | ||
1013 | static const struct net_device_ops cxgb_netdev_ops = { | ||
1014 | .ndo_open = cxgb_open, | ||
1015 | .ndo_stop = cxgb_close, | ||
1016 | .ndo_get_stats = t1_get_stats, | ||
1017 | .ndo_validate_addr = eth_validate_addr, | ||
1018 | .ndo_set_multicast_list = t1_set_rxmode, | ||
1019 | .ndo_do_ioctl = t1_ioctl, | ||
1020 | .ndo_change_mtu = t1_change_mtu, | ||
1021 | .ndo_set_mac_address = t1_set_mac_addr, | ||
1022 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) | ||
1023 | .ndo_vlan_rx_register = vlan_rx_register, | ||
1024 | #endif | ||
1025 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
1026 | .ndo_poll_controller = t1_netpoll, | ||
1027 | #endif | ||
1028 | }; | ||
1029 | |||
1013 | static int __devinit init_one(struct pci_dev *pdev, | 1030 | static int __devinit init_one(struct pci_dev *pdev, |
1014 | const struct pci_device_id *ent) | 1031 | const struct pci_device_id *ent) |
1015 | { | 1032 | { |
@@ -1130,7 +1147,6 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
1130 | adapter->flags |= VLAN_ACCEL_CAPABLE; | 1147 | adapter->flags |= VLAN_ACCEL_CAPABLE; |
1131 | netdev->features |= | 1148 | netdev->features |= |
1132 | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 1149 | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
1133 | netdev->vlan_rx_register = vlan_rx_register; | ||
1134 | #endif | 1150 | #endif |
1135 | 1151 | ||
1136 | /* T204: disable TSO */ | 1152 | /* T204: disable TSO */ |
@@ -1140,19 +1156,11 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
1140 | } | 1156 | } |
1141 | } | 1157 | } |
1142 | 1158 | ||
1143 | netdev->open = cxgb_open; | 1159 | netdev->netdev_ops = &cxgb_netdev_ops; |
1144 | netdev->stop = cxgb_close; | ||
1145 | netdev->hard_start_xmit = t1_start_xmit; | 1160 | netdev->hard_start_xmit = t1_start_xmit; |
1146 | netdev->hard_header_len += (adapter->flags & TSO_CAPABLE) ? | 1161 | netdev->hard_header_len += (adapter->flags & TSO_CAPABLE) ? |
1147 | sizeof(struct cpl_tx_pkt_lso) : sizeof(struct cpl_tx_pkt); | 1162 | sizeof(struct cpl_tx_pkt_lso) : sizeof(struct cpl_tx_pkt); |
1148 | netdev->get_stats = t1_get_stats; | 1163 | |
1149 | netdev->set_multicast_list = t1_set_rxmode; | ||
1150 | netdev->do_ioctl = t1_ioctl; | ||
1151 | netdev->change_mtu = t1_change_mtu; | ||
1152 | netdev->set_mac_address = t1_set_mac_addr; | ||
1153 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
1154 | netdev->poll_controller = t1_netpoll; | ||
1155 | #endif | ||
1156 | netif_napi_add(netdev, &adapter->napi, t1_poll, 64); | 1164 | netif_napi_add(netdev, &adapter->napi, t1_poll, 64); |
1157 | 1165 | ||
1158 | SET_ETHTOOL_OPS(netdev, &t1_ethtool_ops); | 1166 | SET_ETHTOOL_OPS(netdev, &t1_ethtool_ops); |