aboutsummaryrefslogtreecommitdiffstats
path: root/net/802/hippi.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-20 23:32:15 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 23:32:15 -0500
commit748ff68fad9600593c6abe47856037602bd5d133 (patch)
tree96bc5e90ba9f66932562a7061f7403d17b316b61 /net/802/hippi.c
parentfd8f4997e35f2c9a8bfc4d797ec09a6ae7858e04 (diff)
hippi: convert driver to net_device_ops
Convert the HIPPI infrastructure for use with net_device_ops. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/802/hippi.c')
-rw-r--r--net/802/hippi.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/net/802/hippi.c b/net/802/hippi.c
index e35dc1e0915d..313b9ebf92ee 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