aboutsummaryrefslogtreecommitdiffstats
path: root/net/802
diff options
context:
space:
mode:
Diffstat (limited to 'net/802')
-rw-r--r--net/802/fddi.c8
-rw-r--r--net/802/hippi.c14
-rw-r--r--net/802/tr.c24
3 files changed, 23 insertions, 23 deletions
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
168EXPORT_SYMBOL(fddi_type_trans); 168EXPORT_SYMBOL(fddi_type_trans);
169 169
170static int fddi_change_mtu(struct net_device *dev, int new_mtu) 170int 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}
177EXPORT_SYMBOL(fddi_change_mtu);
177 178
178static const struct header_ops fddi_header_ops = { 179static 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
183static void fddi_setup(struct net_device *dev) 185static 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 */
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
diff --git a/net/802/tr.c b/net/802/tr.c
index 18c66475d8c3..158150fee462 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -285,10 +285,7 @@ void tr_source_route(struct sk_buff *skb,struct trh_hdr *trh,
285 if(entry) 285 if(entry)
286 { 286 {
287#if TR_SR_DEBUG 287#if TR_SR_DEBUG
288{ 288printk("source routing for %pM\n", trh->daddr);
289DECLARE_MAC_BUF(mac);
290printk("source routing for %s\n",print_mac(mac, trh->daddr));
291}
292#endif 289#endif
293 if(!entry->local_ring && (ntohs(entry->rcf) & TR_RCF_LEN_MASK) >> 8) 290 if(!entry->local_ring && (ntohs(entry->rcf) & TR_RCF_LEN_MASK) >> 8)
294 { 291 {
@@ -370,9 +367,8 @@ static void tr_add_rif_info(struct trh_hdr *trh, struct net_device *dev)
370 if(entry==NULL) 367 if(entry==NULL)
371 { 368 {
372#if TR_SR_DEBUG 369#if TR_SR_DEBUG
373 DECLARE_MAC_BUF(mac); 370 printk("adding rif_entry: addr:%pM rcf:%04X\n",
374 printk("adding rif_entry: addr:%s rcf:%04X\n", 371 trh->saddr, ntohs(trh->rcf));
375 print_mac(mac, trh->saddr), ntohs(trh->rcf));
376#endif 372#endif
377 /* 373 /*
378 * Allocate our new entry. A failure to allocate loses 374 * Allocate our new entry. A failure to allocate loses
@@ -417,11 +413,8 @@ static void tr_add_rif_info(struct trh_hdr *trh, struct net_device *dev)
417 !(trh->rcf & htons(TR_RCF_BROADCAST_MASK))) 413 !(trh->rcf & htons(TR_RCF_BROADCAST_MASK)))
418 { 414 {
419#if TR_SR_DEBUG 415#if TR_SR_DEBUG
420{ 416printk("updating rif_entry: addr:%pM rcf:%04X\n",
421DECLARE_MAC_BUF(mac); 417 trh->saddr, ntohs(trh->rcf));
422printk("updating rif_entry: addr:%s rcf:%04X\n",
423 print_mac(mac, trh->saddr), ntohs(trh->rcf));
424}
425#endif 418#endif
426 entry->rcf = trh->rcf & htons((unsigned short)~TR_RCF_BROADCAST_MASK); 419 entry->rcf = trh->rcf & htons((unsigned short)~TR_RCF_BROADCAST_MASK);
427 memcpy(&(entry->rseg[0]),&(trh->rseg[0]),8*sizeof(unsigned short)); 420 memcpy(&(entry->rseg[0]),&(trh->rseg[0]),8*sizeof(unsigned short));
@@ -532,7 +525,6 @@ static int rif_seq_show(struct seq_file *seq, void *v)
532{ 525{
533 int j, rcf_len, segment, brdgnmb; 526 int j, rcf_len, segment, brdgnmb;
534 struct rif_cache *entry = v; 527 struct rif_cache *entry = v;
535 DECLARE_MAC_BUF(mac);
536 528
537 if (v == SEQ_START_TOKEN) 529 if (v == SEQ_START_TOKEN)
538 seq_puts(seq, 530 seq_puts(seq,
@@ -542,9 +534,9 @@ static int rif_seq_show(struct seq_file *seq, void *v)
542 long ttl = (long) (entry->last_used + sysctl_tr_rif_timeout) 534 long ttl = (long) (entry->last_used + sysctl_tr_rif_timeout)
543 - (long) jiffies; 535 - (long) jiffies;
544 536
545 seq_printf(seq, "%s %s %7li ", 537 seq_printf(seq, "%s %pM %7li ",
546 dev?dev->name:"?", 538 dev?dev->name:"?",
547 print_mac(mac, entry->addr), 539 entry->addr,
548 ttl/HZ); 540 ttl/HZ);
549 541
550 if (entry->local_ring) 542 if (entry->local_ring)
@@ -643,7 +635,7 @@ static struct ctl_table tr_table[] = {
643 .data = &sysctl_tr_rif_timeout, 635 .data = &sysctl_tr_rif_timeout,
644 .maxlen = sizeof(int), 636 .maxlen = sizeof(int),
645 .mode = 0644, 637 .mode = 0644,
646 .proc_handler = &proc_dointvec 638 .proc_handler = proc_dointvec
647 }, 639 },
648 { 0 }, 640 { 0 },
649}; 641};