diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-01-11 03:41:39 +0100 | 
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-01-11 03:41:39 +0100 | 
| commit | abede81c4fb2e3b85d8760f25e3da39d2c69a134 (patch) | |
| tree | 26c893ec108d837eb9171d678c55a1cea7b22af4 /drivers/net/starfire.c | |
| parent | c9d557c19f94df42db78d4a5de4d25feee694bad (diff) | |
| parent | c59765042f53a79a7a65585042ff463b69cb248c (diff) | |
Merge commit 'v2.6.29-rc1' into core/urgent
Diffstat (limited to 'drivers/net/starfire.c')
| -rw-r--r-- | drivers/net/starfire.c | 34 | 
1 files changed, 22 insertions, 12 deletions
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index 57fb1f71c47b..da3a76b18eff 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c @@ -648,6 +648,24 @@ static void netdev_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)  #endif /* VLAN_SUPPORT */ +static const struct net_device_ops netdev_ops = { +	.ndo_open		= netdev_open, +	.ndo_stop		= netdev_close, +	.ndo_start_xmit		= start_tx, +	.ndo_tx_timeout 	= tx_timeout, +	.ndo_get_stats 		= get_stats, +	.ndo_set_multicast_list = &set_rx_mode, +	.ndo_do_ioctl 		= netdev_ioctl, +	.ndo_change_mtu		= eth_change_mtu, +	.ndo_set_mac_address 	= eth_mac_addr, +	.ndo_validate_addr	= eth_validate_addr, +#ifdef VLAN_SUPPORT +	.ndo_vlan_rx_register	= netdev_vlan_rx_register, +	.ndo_vlan_rx_add_vid	= netdev_vlan_rx_add_vid, +	.ndo_vlan_rx_kill_vid	= netdev_vlan_rx_kill_vid, +#endif +}; +  static int __devinit starfire_init_one(struct pci_dev *pdev,  				       const struct pci_device_id *ent)  { @@ -710,11 +728,9 @@ static int __devinit starfire_init_one(struct pci_dev *pdev,  	if (enable_hw_cksum)  		dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;  #endif /* ZEROCOPY */ +  #ifdef VLAN_SUPPORT  	dev->features |= NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER; -	dev->vlan_rx_register = netdev_vlan_rx_register; -	dev->vlan_rx_add_vid = netdev_vlan_rx_add_vid; -	dev->vlan_rx_kill_vid = netdev_vlan_rx_kill_vid;  #endif /* VLAN_RX_KILL_VID */  #ifdef ADDR_64BITS  	dev->features |= NETIF_F_HIGHDMA; @@ -810,18 +826,12 @@ static int __devinit starfire_init_one(struct pci_dev *pdev,  		}  	} -	/* The chip-specific entries in the device structure. */ -	dev->open = &netdev_open; -	dev->hard_start_xmit = &start_tx; -	dev->tx_timeout = tx_timeout; +	dev->netdev_ops = &netdev_ops;  	dev->watchdog_timeo = TX_TIMEOUT; -	netif_napi_add(dev, &np->napi, netdev_poll, max_interrupt_work); -	dev->stop = &netdev_close; -	dev->get_stats = &get_stats; -	dev->set_multicast_list = &set_rx_mode; -	dev->do_ioctl = &netdev_ioctl;  	SET_ETHTOOL_OPS(dev, ðtool_ops); +	netif_napi_add(dev, &np->napi, netdev_poll, max_interrupt_work); +  	if (mtu)  		dev->mtu = mtu;  | 
