aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/rrunner.c15
-rw-r--r--include/linux/hippidevice.h4
-rw-r--r--net/802/hippi.c14
3 files changed, 23 insertions, 10 deletions
diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c
index 6e4131f9a93..b4e3ddd0b59 100644
--- a/drivers/net/rrunner.c
+++ b/drivers/net/rrunner.c
@@ -63,6 +63,16 @@ MODULE_LICENSE("GPL");
63 63
64static char version[] __devinitdata = "rrunner.c: v0.50 11/11/2002 Jes Sorensen (jes@wildopensource.com)\n"; 64static char version[] __devinitdata = "rrunner.c: v0.50 11/11/2002 Jes Sorensen (jes@wildopensource.com)\n";
65 65
66
67static const struct net_device_ops rr_netdev_ops = {
68 .ndo_open = rr_open,
69 .ndo_stop = rr_close,
70 .ndo_do_ioctl = rr_ioctl,
71 .ndo_start_xmit = rr_start_xmit,
72 .ndo_change_mtu = hippi_change_mtu,
73 .ndo_set_mac_address = hippi_mac_addr,
74};
75
66/* 76/*
67 * Implementation notes: 77 * Implementation notes:
68 * 78 *
@@ -115,10 +125,7 @@ static int __devinit rr_init_one(struct pci_dev *pdev,
115 spin_lock_init(&rrpriv->lock); 125 spin_lock_init(&rrpriv->lock);
116 126
117 dev->irq = pdev->irq; 127 dev->irq = pdev->irq;
118 dev->open = &rr_open; 128 dev->netdev_ops = &rr_netdev_ops;
119 dev->hard_start_xmit = &rr_start_xmit;
120 dev->stop = &rr_close;
121 dev->do_ioctl = &rr_ioctl;
122 129
123 dev->base_addr = pci_resource_start(pdev, 0); 130 dev->base_addr = pci_resource_start(pdev, 0);
124 131
diff --git a/include/linux/hippidevice.h b/include/linux/hippidevice.h
index bab303dafd6..f148e490841 100644
--- a/include/linux/hippidevice.h
+++ b/include/linux/hippidevice.h
@@ -32,7 +32,9 @@ struct hippi_cb {
32}; 32};
33 33
34extern __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev); 34extern __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev);
35 35extern int hippi_change_mtu(struct net_device *dev, int new_mtu);
36extern int hippi_mac_addr(struct net_device *dev, void *p);
37extern int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p);
36extern struct net_device *alloc_hippi_dev(int sizeof_priv); 38extern struct net_device *alloc_hippi_dev(int sizeof_priv);
37#endif 39#endif
38 40
diff --git a/net/802/hippi.c b/net/802/hippi.c
index e35dc1e0915..313b9ebf92e 100644
--- a/net/802/hippi.c
+++ b/net/802/hippi.c
@@ -144,7 +144,7 @@ __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev)
144 144
145EXPORT_SYMBOL(hippi_type_trans); 145EXPORT_SYMBOL(hippi_type_trans);
146 146
147static int hippi_change_mtu(struct net_device *dev, int new_mtu) 147int hippi_change_mtu(struct net_device *dev, int new_mtu)
148{ 148{
149 /* 149 /*
150 * HIPPI's got these nice large MTUs. 150 * HIPPI's got these nice large MTUs.
@@ -154,12 +154,13 @@ static int hippi_change_mtu(struct net_device *dev, int new_mtu)
154 dev->mtu = new_mtu; 154 dev->mtu = new_mtu;
155 return(0); 155 return(0);
156} 156}
157EXPORT_SYMBOL(hippi_change_mtu);
157 158
158/* 159/*
159 * For HIPPI we will actually use the lower 4 bytes of the hardware 160 * For HIPPI we will actually use the lower 4 bytes of the hardware
160 * address as the I-FIELD rather than the actual hardware address. 161 * address as the I-FIELD rather than the actual hardware address.
161 */ 162 */
162static int hippi_mac_addr(struct net_device *dev, void *p) 163int hippi_mac_addr(struct net_device *dev, void *p)
163{ 164{
164 struct sockaddr *addr = p; 165 struct sockaddr *addr = p;
165 if (netif_running(dev)) 166 if (netif_running(dev))
@@ -167,8 +168,9 @@ static int hippi_mac_addr(struct net_device *dev, void *p)
167 memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); 168 memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
168 return 0; 169 return 0;
169} 170}
171EXPORT_SYMBOL(hippi_mac_addr);
170 172
171static int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p) 173int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p)
172{ 174{
173 /* Never send broadcast/multicast ARP messages */ 175 /* Never send broadcast/multicast ARP messages */
174 p->mcast_probes = 0; 176 p->mcast_probes = 0;
@@ -181,6 +183,7 @@ static int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p)
181 p->ucast_probes = 0; 183 p->ucast_probes = 0;
182 return 0; 184 return 0;
183} 185}
186EXPORT_SYMBOL(hippi_neigh_setup_dev);
184 187
185static const struct header_ops hippi_header_ops = { 188static const struct header_ops hippi_header_ops = {
186 .create = hippi_header, 189 .create = hippi_header,
@@ -190,11 +193,12 @@ static const struct header_ops hippi_header_ops = {
190 193
191static void hippi_setup(struct net_device *dev) 194static void hippi_setup(struct net_device *dev)
192{ 195{
193 dev->set_multicast_list = NULL; 196#ifdef CONFIG_COMPAT_NET_DEV_OPS
194 dev->change_mtu = hippi_change_mtu; 197 dev->change_mtu = hippi_change_mtu;
195 dev->header_ops = &hippi_header_ops;
196 dev->set_mac_address = hippi_mac_addr; 198 dev->set_mac_address = hippi_mac_addr;
197 dev->neigh_setup = hippi_neigh_setup_dev; 199 dev->neigh_setup = hippi_neigh_setup_dev;
200#endif
201 dev->header_ops = &hippi_header_ops;
198 202
199 /* 203 /*
200 * We don't support HIPPI `ARP' for the time being, and probably 204 * We don't support HIPPI `ARP' for the time being, and probably