diff options
Diffstat (limited to 'drivers/net/ixp2000/enp2611.c')
-rw-r--r-- | drivers/net/ixp2000/enp2611.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/net/ixp2000/enp2611.c b/drivers/net/ixp2000/enp2611.c index b02a981c87a8..34a6cfd17930 100644 --- a/drivers/net/ixp2000/enp2611.c +++ b/drivers/net/ixp2000/enp2611.c | |||
@@ -119,24 +119,9 @@ static struct ixp2400_msf_parameters enp2611_msf_parameters = | |||
119 | } | 119 | } |
120 | }; | 120 | }; |
121 | 121 | ||
122 | struct enp2611_ixpdev_priv | ||
123 | { | ||
124 | struct ixpdev_priv ixpdev_priv; | ||
125 | struct net_device_stats stats; | ||
126 | }; | ||
127 | |||
128 | static struct net_device *nds[3]; | 122 | static struct net_device *nds[3]; |
129 | static struct timer_list link_check_timer; | 123 | static struct timer_list link_check_timer; |
130 | 124 | ||
131 | static struct net_device_stats *enp2611_get_stats(struct net_device *dev) | ||
132 | { | ||
133 | struct enp2611_ixpdev_priv *ip = netdev_priv(dev); | ||
134 | |||
135 | pm3386_get_stats(ip->ixpdev_priv.channel, &(ip->stats)); | ||
136 | |||
137 | return &(ip->stats); | ||
138 | } | ||
139 | |||
140 | /* @@@ Poll the SFP moddef0 line too. */ | 125 | /* @@@ Poll the SFP moddef0 line too. */ |
141 | /* @@@ Try to use the pm3386 DOOL interrupt as well. */ | 126 | /* @@@ Try to use the pm3386 DOOL interrupt as well. */ |
142 | static void enp2611_check_link_status(unsigned long __dummy) | 127 | static void enp2611_check_link_status(unsigned long __dummy) |
@@ -203,14 +188,13 @@ static int __init enp2611_init_module(void) | |||
203 | 188 | ||
204 | ports = pm3386_port_count(); | 189 | ports = pm3386_port_count(); |
205 | for (i = 0; i < ports; i++) { | 190 | for (i = 0; i < ports; i++) { |
206 | nds[i] = ixpdev_alloc(i, sizeof(struct enp2611_ixpdev_priv)); | 191 | nds[i] = ixpdev_alloc(i, sizeof(struct ixpdev_priv)); |
207 | if (nds[i] == NULL) { | 192 | if (nds[i] == NULL) { |
208 | while (--i >= 0) | 193 | while (--i >= 0) |
209 | free_netdev(nds[i]); | 194 | free_netdev(nds[i]); |
210 | return -ENOMEM; | 195 | return -ENOMEM; |
211 | } | 196 | } |
212 | 197 | ||
213 | nds[i]->get_stats = enp2611_get_stats; | ||
214 | pm3386_init_port(i); | 198 | pm3386_init_port(i); |
215 | pm3386_get_mac(i, nds[i]->dev_addr); | 199 | pm3386_get_mac(i, nds[i]->dev_addr); |
216 | } | 200 | } |