diff options
-rw-r--r-- | drivers/net/skfp/skfddi.c | 19 | ||||
-rw-r--r-- | include/linux/fddidevice.h | 1 | ||||
-rw-r--r-- | net/802/fddi.c | 8 |
3 files changed, 19 insertions, 9 deletions
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index 282bb47deccc..7fbd4f84f272 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c | |||
@@ -168,6 +168,17 @@ static int num_boards; /* total number of adapters configured */ | |||
168 | #define PRINTK(s, args...) | 168 | #define PRINTK(s, args...) |
169 | #endif // DRIVERDEBUG | 169 | #endif // DRIVERDEBUG |
170 | 170 | ||
171 | static const struct net_device_ops skfp_netdev_ops = { | ||
172 | .ndo_open = skfp_open, | ||
173 | .ndo_stop = skfp_close, | ||
174 | .ndo_start_xmit = skfp_send_pkt, | ||
175 | .ndo_get_stats = skfp_ctl_get_stats, | ||
176 | .ndo_change_mtu = fddi_change_mtu, | ||
177 | .ndo_set_multicast_list = skfp_ctl_set_multicast_list, | ||
178 | .ndo_set_mac_address = skfp_ctl_set_mac_address, | ||
179 | .ndo_do_ioctl = skfp_ioctl, | ||
180 | }; | ||
181 | |||
171 | /* | 182 | /* |
172 | * ================= | 183 | * ================= |
173 | * = skfp_init_one = | 184 | * = skfp_init_one = |
@@ -253,13 +264,7 @@ static int skfp_init_one(struct pci_dev *pdev, | |||
253 | } | 264 | } |
254 | 265 | ||
255 | dev->irq = pdev->irq; | 266 | dev->irq = pdev->irq; |
256 | dev->get_stats = &skfp_ctl_get_stats; | 267 | dev->netdev_ops = &skfp_netdev_ops; |
257 | dev->open = &skfp_open; | ||
258 | dev->stop = &skfp_close; | ||
259 | dev->hard_start_xmit = &skfp_send_pkt; | ||
260 | dev->set_multicast_list = &skfp_ctl_set_multicast_list; | ||
261 | dev->set_mac_address = &skfp_ctl_set_mac_address; | ||
262 | dev->do_ioctl = &skfp_ioctl; | ||
263 | 268 | ||
264 | SET_NETDEV_DEV(dev, &pdev->dev); | 269 | SET_NETDEV_DEV(dev, &pdev->dev); |
265 | 270 | ||
diff --git a/include/linux/fddidevice.h b/include/linux/fddidevice.h index e61e42dfd317..155bafd9e886 100644 --- a/include/linux/fddidevice.h +++ b/include/linux/fddidevice.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #ifdef __KERNEL__ | 27 | #ifdef __KERNEL__ |
28 | extern __be16 fddi_type_trans(struct sk_buff *skb, | 28 | extern __be16 fddi_type_trans(struct sk_buff *skb, |
29 | struct net_device *dev); | 29 | struct net_device *dev); |
30 | extern int fddi_change_mtu(struct net_device *dev, int new_mtu); | ||
30 | extern struct net_device *alloc_fddidev(int sizeof_priv); | 31 | extern struct net_device *alloc_fddidev(int sizeof_priv); |
31 | #endif | 32 | #endif |
32 | 33 | ||
diff --git a/net/802/fddi.c b/net/802/fddi.c index 0549317b9356..f1611a1e06a7 100644 --- a/net/802/fddi.c +++ b/net/802/fddi.c | |||
@@ -167,23 +167,27 @@ __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
167 | 167 | ||
168 | EXPORT_SYMBOL(fddi_type_trans); | 168 | EXPORT_SYMBOL(fddi_type_trans); |
169 | 169 | ||
170 | static int fddi_change_mtu(struct net_device *dev, int new_mtu) | 170 | int fddi_change_mtu(struct net_device *dev, int new_mtu) |
171 | { | 171 | { |
172 | if ((new_mtu < FDDI_K_SNAP_HLEN) || (new_mtu > FDDI_K_SNAP_DLEN)) | 172 | if ((new_mtu < FDDI_K_SNAP_HLEN) || (new_mtu > FDDI_K_SNAP_DLEN)) |
173 | return(-EINVAL); | 173 | return(-EINVAL); |
174 | dev->mtu = new_mtu; | 174 | dev->mtu = new_mtu; |
175 | return(0); | 175 | return(0); |
176 | } | 176 | } |
177 | EXPORT_SYMBOL(fddi_change_mtu); | ||
177 | 178 | ||
178 | static const struct header_ops fddi_header_ops = { | 179 | static const struct header_ops fddi_header_ops = { |
179 | .create = fddi_header, | 180 | .create = fddi_header, |
180 | .rebuild = fddi_rebuild_header, | 181 | .rebuild = fddi_rebuild_header, |
181 | }; | 182 | }; |
182 | 183 | ||
184 | |||
183 | static void fddi_setup(struct net_device *dev) | 185 | static void fddi_setup(struct net_device *dev) |
184 | { | 186 | { |
185 | dev->change_mtu = fddi_change_mtu; | ||
186 | dev->header_ops = &fddi_header_ops; | 187 | dev->header_ops = &fddi_header_ops; |
188 | #ifdef CONFIG_COMPAT_NET_DEV_OPS | ||
189 | dev->change_mtu = fddi_change_mtu, | ||
190 | #endif | ||
187 | 191 | ||
188 | dev->type = ARPHRD_FDDI; | 192 | dev->type = ARPHRD_FDDI; |
189 | dev->hard_header_len = FDDI_K_SNAP_HLEN+3; /* Assume 802.2 SNAP hdr len + 3 pad bytes */ | 193 | dev->hard_header_len = FDDI_K_SNAP_HLEN+3; /* Assume 802.2 SNAP hdr len + 3 pad bytes */ |