1 diff -Nur linux-2.6.24.2/include/linux/atmbr2684.h linux-2.6.24.2-copy/include/linux/atmbr2684.h
2 --- linux-2.6.24.2/include/linux/atmbr2684.h 2008-02-11 05:51:11.000000000 +0000
3 +++ linux-2.6.24.2-copy/include/linux/atmbr2684.h 2008-03-27 01:08:42.000000000 +0000
5 #define BR2684_MEDIA_FDDI (3)
6 #define BR2684_MEDIA_802_6 (4) /* 802.6 */
8 + /* used only at device creation: */
9 +#define BR2684_FLAG_ROUTED (1<<16) /* payload is routed, not bridged */
12 * Is there FCS inbound on this VC? This currently isn't supported.
15 #define BR2684_ENCAPS_AUTODETECT (2) /* Unsuported */
18 + * Is this VC bridged or routed?
21 +#define BR2684_PAYLOAD_ROUTED (0)
22 +#define BR2684_PAYLOAD_BRIDGED (1)
25 * This is for the ATM_NEWBACKENDIF call - these are like socket families:
26 * the first element of the structure is the backend number and the rest
27 * is per-backend specific
29 struct atm_newif_br2684 {
30 - atm_backend_t backend_num; /* ATM_BACKEND_BR2684 */
31 - int media; /* BR2684_MEDIA_* */
32 - char ifname[IFNAMSIZ];
34 + atm_backend_t backend_num; /* ATM_BACKEND_BR2684 */
35 + int media; /* BR2684_MEDIA_*, flags in upper bits */
36 + char ifname[IFNAMSIZ];
42 #define BR2684_FIND_BYNUM (1)
43 #define BR2684_FIND_BYIFNAME (2)
44 struct br2684_if_spec {
45 - int method; /* BR2684_FIND_* */
46 + int method; /* BR2684_FIND_* */
48 - char ifname[IFNAMSIZ];
50 + char ifname[IFNAMSIZ];
56 * is per-backend specific
58 struct atm_backend_br2684 {
59 - atm_backend_t backend_num; /* ATM_BACKEND_BR2684 */
60 + atm_backend_t backend_num; /* ATM_BACKEND_BR2684 */
61 struct br2684_if_spec ifspec;
62 - int fcs_in; /* BR2684_FCSIN_* */
63 - int fcs_out; /* BR2684_FCSOUT_* */
64 - int fcs_auto; /* 1: fcs_{in,out} disabled if no FCS rx'ed */
65 - int encaps; /* BR2684_ENCAPS_* */
66 - int has_vpiid; /* 1: use vpn_id - Unsupported */
68 - int send_padding; /* unsupported */
69 - int min_size; /* we will pad smaller packets than this */
70 + int fcs_in; /* BR2684_FCSIN_* */
71 + int fcs_out; /* BR2684_FCSOUT_* */
72 + int fcs_auto; /* 1: fcs_{in,out} disabled if no FCS rx'ed */
73 + int encaps; /* BR2684_ENCAPS_* */
74 + int has_vpiid; /* 1: use vpn_id - Unsupported */
76 + int send_padding; /* unsupported */
77 + int min_size; /* we will pad smaller packets than this */
82 * efficient per-if in/out filters, this support will be removed
84 struct br2684_filter {
85 - __be32 prefix; /* network byte order */
86 - __be32 netmask; /* 0 = disable filter */
87 + __be32 prefix; /* network byte order */
88 + __be32 netmask; /* 0 = disable filter */
91 struct br2684_filter_set {
93 struct br2684_filter filter;
96 +enum br2684_payload {
97 + p_routed = BR2684_PAYLOAD_ROUTED,
98 + p_bridged = BR2684_PAYLOAD_BRIDGED,
101 #define BR2684_SETFILT _IOW( 'a', ATMIOC_BACKEND + 0, \
102 struct br2684_filter_set)
104 #endif /* _LINUX_ATMBR2684_H */
106 diff -Nur linux-2.6.24.2/net/atm/br2684.c linux-2.6.24.2-copy/net/atm/br2684.c
107 --- linux-2.6.24.2/net/atm/br2684.c 2008-02-11 05:51:11.000000000 +0000
108 +++ linux-2.6.24.2-copy/net/atm/br2684.c 2008-03-27 03:24:17.000000000 +0000
111 -Experimental ethernet netdevice using ATM AAL5 as underlying carrier
112 -(RFC1483 obsoleted by RFC2684) for Linux 2.4
113 -Author: Marcell GAL, 2000, XDSL Ltd, Hungary
115 + * Ethernet netdevice using ATM AAL5 as underlying carrier
116 + * (RFC1483 obsoleted by RFC2684) for Linux
118 + * Authors: Marcell GAL, 2000, XDSL Ltd, Hungary
119 + * Eric Kinzie, 2006-2007, US Naval Research Laboratory
122 #include <linux/module.h>
123 #include <linux/init.h>
125 #define skb_debug(skb) do {} while (0)
128 +#define BR2684_ETHERTYPE_LEN 2
129 +#define BR2684_PAD_LEN 2
131 +#define LLC 0xaa, 0xaa, 0x03
132 +#define SNAP_BRIDGED 0x00, 0x80, 0xc2
133 +#define SNAP_ROUTED 0x00, 0x00, 0x00
134 +#define PID_ETHERNET 0x00, 0x07
135 +#define ETHERTYPE_IPV4 0x08, 0x00
136 +#define ETHERTYPE_IPV6 0x86, 0xdd
137 +#define PAD_BRIDGED 0x00, 0x00
139 +static unsigned char ethertype_ipv4[] = { ETHERTYPE_IPV4 };
140 +static unsigned char ethertype_ipv6[] = { ETHERTYPE_IPV6 };
141 static unsigned char llc_oui_pid_pad[] =
142 - { 0xAA, 0xAA, 0x03, 0x00, 0x80, 0xC2, 0x00, 0x07, 0x00, 0x00 };
144 + { LLC, SNAP_BRIDGED, PID_ETHERNET, PAD_BRIDGED };
145 +static unsigned char llc_oui_ipv4[] = { LLC, SNAP_ROUTED, ETHERTYPE_IPV4 };
146 +static unsigned char llc_oui_ipv6[] = { LLC, SNAP_ROUTED, ETHERTYPE_IPV6 };
149 - e_vc = BR2684_ENCAPS_VC,
150 + e_vc = BR2684_ENCAPS_VC,
151 e_llc = BR2684_ENCAPS_LLC,
155 - struct atm_vcc *atmvcc;
156 + struct atm_vcc *atmvcc;
157 struct net_device *device;
158 - /* keep old push,pop functions for chaining */
159 - void (*old_push)(struct atm_vcc *vcc,struct sk_buff *skb);
160 - /* void (*old_pop)(struct atm_vcc *vcc,struct sk_buff *skb); */
161 + /* keep old push, pop functions for chaining */
162 + void (*old_push) (struct atm_vcc * vcc, struct sk_buff * skb);
163 + /* void (*old_pop)(struct atm_vcc *vcc, struct sk_buff *skb); */
164 enum br2684_encaps encaps;
165 struct list_head brvccs;
166 #ifdef CONFIG_ATM_BR2684_IPFILTER
168 struct net_device *net_dev;
169 struct list_head br2684_devs;
171 - struct list_head brvccs; /* one device <=> one vcc (before xmas) */
172 + struct list_head brvccs; /* one device <=> one vcc (before xmas) */
173 struct net_device_stats stats;
175 + enum br2684_payload payload;
181 static inline struct br2684_dev *BRPRIV(const struct net_device *net_dev)
183 - return (struct br2684_dev *) net_dev->priv;
184 + return (struct br2684_dev *)net_dev->priv;
187 static inline struct net_device *list_entry_brdev(const struct list_head *le)
190 static inline struct br2684_vcc *BR2684_VCC(const struct atm_vcc *atmvcc)
192 - return (struct br2684_vcc *) (atmvcc->user_back);
193 + return (struct br2684_vcc *)(atmvcc->user_back);
196 static inline struct br2684_vcc *list_entry_brvcc(const struct list_head *le)
197 @@ -132,10 +149,11 @@
200 static int br2684_xmit_vcc(struct sk_buff *skb, struct br2684_dev *brdev,
201 - struct br2684_vcc *brvcc)
202 + struct br2684_vcc *brvcc)
204 struct atm_vcc *atmvcc;
205 int minheadroom = (brvcc->encaps == e_llc) ? 10 : 2;
207 if (skb_headroom(skb) < minheadroom) {
208 struct sk_buff *skb2 = skb_realloc_headroom(skb, minheadroom);
209 brvcc->copies_needed++;
210 @@ -146,23 +164,48 @@
214 - skb_push(skb, minheadroom);
215 - if (brvcc->encaps == e_llc)
216 - skb_copy_to_linear_data(skb, llc_oui_pid_pad, 10);
218 - memset(skb->data, 0, 2);
220 + if (brvcc->encaps == e_llc) {
221 + if (brdev->payload == p_bridged) {
222 + skb_push(skb, sizeof(llc_oui_pid_pad));
223 + skb_copy_to_linear_data(skb, llc_oui_pid_pad,
224 + sizeof(llc_oui_pid_pad));
225 + } else if (brdev->payload == p_routed) {
226 + unsigned short prot = ntohs(skb->protocol);
228 + skb_push(skb, sizeof(llc_oui_ipv4));
231 + skb_copy_to_linear_data(skb, llc_oui_ipv4,
232 + sizeof(llc_oui_ipv4));
235 + skb_copy_to_linear_data(skb, llc_oui_ipv6,
236 + sizeof(llc_oui_ipv6));
239 + dev_kfree_skb(skb);
245 + if (brdev->payload == p_bridged)
246 + memset(skb->data, 0, 2);
250 ATM_SKB(skb)->vcc = atmvcc = brvcc->atmvcc;
251 pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, atmvcc, atmvcc->dev);
252 if (!atm_may_send(atmvcc, skb->truesize)) {
253 - /* we free this here for now, because we cannot know in a higher
254 - layer whether the skb point it supplied wasn't freed yet.
258 + * We free this here for now, because we cannot know in a higher
259 + * layer whether the skb pointer it supplied wasn't freed yet.
260 + * Now, it always is.
266 atomic_add(skb->truesize, &sk_atm(atmvcc)->sk_wmem_alloc);
267 ATM_SKB(skb)->atm_options = atmvcc->atm_options;
268 brdev->stats.tx_packets++;
272 static inline struct br2684_vcc *pick_outgoing_vcc(struct sk_buff *skb,
273 - struct br2684_dev *brdev)
274 + struct br2684_dev *brdev)
276 - return list_empty(&brdev->brvccs) ? NULL :
277 - list_entry_brvcc(brdev->brvccs.next); /* 1 vcc/dev right now */
278 + return list_empty(&brdev->brvccs) ? NULL : list_entry_brvcc(brdev->brvccs.next); /* 1 vcc/dev right now */
281 static int br2684_start_xmit(struct sk_buff *skb, struct net_device *dev)
282 @@ -199,11 +241,10 @@
284 * We should probably use netif_*_queue() here, but that
285 * involves added complication. We need to walk before
289 + * Don't free here! this pointer might be no longer valid!
291 - /* don't free here! this pointer might be no longer valid!
292 - dev_kfree_skb(skb);
294 brdev->stats.tx_errors++;
295 brdev->stats.tx_fifo_errors++;
297 @@ -217,12 +258,11 @@
298 return &BRPRIV(dev)->stats;
303 * We remember when the MAC gets set, so we don't override it later with
304 * the ESI of the ATM card of the first VC
306 -static int (*my_eth_mac_addr)(struct net_device *, void *);
307 +static int (*my_eth_mac_addr) (struct net_device *, void *);
308 static int br2684_mac_addr(struct net_device *dev, void *p)
310 int err = my_eth_mac_addr(dev, p);
313 #ifdef CONFIG_ATM_BR2684_IPFILTER
314 /* this IOCTL is experimental. */
315 -static int br2684_setfilt(struct atm_vcc *atmvcc, void __user *arg)
316 +static int br2684_setfilt(struct atm_vcc *atmvcc, void __user * arg)
318 struct br2684_vcc *brvcc;
319 struct br2684_filter_set fs;
320 @@ -243,13 +283,12 @@
321 if (fs.ifspec.method != BR2684_FIND_BYNOTHING) {
323 * This is really a per-vcc thing, but we can also search
327 struct br2684_dev *brdev;
328 read_lock(&devs_lock);
329 brdev = BRPRIV(br2684_find_dev(&fs.ifspec));
330 - if (brdev == NULL || list_empty(&brdev->brvccs) ||
331 - brdev->brvccs.next != brdev->brvccs.prev) /* >1 VCC */
332 + if (brdev == NULL || list_empty(&brdev->brvccs) || brdev->brvccs.next != brdev->brvccs.prev) /* >1 VCC */
335 brvcc = list_entry_brvcc(brdev->brvccs.next);
336 @@ -267,15 +306,16 @@
337 packet_fails_filter(__be16 type, struct br2684_vcc *brvcc, struct sk_buff *skb)
339 if (brvcc->filter.netmask == 0)
340 - return 0; /* no filter in place */
341 + return 0; /* no filter in place */
342 if (type == htons(ETH_P_IP) &&
343 - (((struct iphdr *) (skb->data))->daddr & brvcc->filter.
344 + (((struct iphdr *)(skb->data))->daddr & brvcc->filter.
345 netmask) == brvcc->filter.prefix)
347 if (type == htons(ETH_P_ARP))
349 - /* TODO: we should probably filter ARPs too.. don't want to have
350 - * them returning values that don't make sense, or is that ok?
352 + * TODO: we should probably filter ARPs too.. don't want to have
353 + * them returning values that don't make sense, or is that ok?
358 struct br2684_vcc *brvcc = BR2684_VCC(atmvcc);
359 struct net_device *net_dev = brvcc->device;
360 struct br2684_dev *brdev = BRPRIV(net_dev);
361 - int plen = sizeof(llc_oui_pid_pad) + ETH_HLEN;
363 pr_debug("br2684_push\n");
365 @@ -320,35 +359,58 @@
366 atm_return(atmvcc, skb->truesize);
367 pr_debug("skb from brdev %p\n", brdev);
368 if (brvcc->encaps == e_llc) {
369 - /* let us waste some time for checking the encapsulation.
370 - Note, that only 7 char is checked so frames with a valid FCS
371 - are also accepted (but FCS is not checked of course) */
372 - if (memcmp(skb->data, llc_oui_pid_pad, 7)) {
374 + if (skb->len > 7 && skb->data[7] == 0x01)
375 + __skb_trim(skb, skb->len - 4);
377 + /* accept packets that have "ipv[46]" in the snap header */
378 + if ((skb->len >= (sizeof(llc_oui_ipv4)))
381 + (skb->data, llc_oui_ipv4,
382 + sizeof(llc_oui_ipv4) - BR2684_ETHERTYPE_LEN) == 0)) {
384 + (skb->data + 6, ethertype_ipv6,
385 + sizeof(ethertype_ipv6)) == 0)
386 + skb->protocol = __constant_htons(ETH_P_IPV6);
388 + (skb->data + 6, ethertype_ipv4,
389 + sizeof(ethertype_ipv4)) == 0)
390 + skb->protocol = __constant_htons(ETH_P_IP);
392 + brdev->stats.rx_errors++;
393 + dev_kfree_skb(skb);
396 + skb_pull(skb, sizeof(llc_oui_ipv4));
397 + skb_reset_network_header(skb);
398 + skb->pkt_type = PACKET_HOST;
400 + * Let us waste some time for checking the encapsulation.
401 + * Note, that only 7 char is checked so frames with a valid FCS
402 + * are also accepted (but FCS is not checked of course).
404 + } else if ((skb->len >= sizeof(llc_oui_pid_pad)) &&
405 + (memcmp(skb->data, llc_oui_pid_pad, 7) == 0)) {
406 + skb_pull(skb, sizeof(llc_oui_pid_pad));
407 + skb->protocol = eth_type_trans(skb, net_dev);
409 brdev->stats.rx_errors++;
414 - /* Strip FCS if present */
415 - if (skb->len > 7 && skb->data[7] == 0x01)
416 - __skb_trim(skb, skb->len - 4);
418 - plen = PADLEN + ETH_HLEN; /* pad, dstmac,srcmac, ethtype */
419 /* first 2 chars should be 0 */
420 if (*((u16 *) (skb->data)) != 0) {
421 brdev->stats.rx_errors++;
426 - if (skb->len < plen) {
427 - brdev->stats.rx_errors++;
428 - dev_kfree_skb(skb); /* dev_ not needed? */
430 + skb_pull(skb, BR2684_PAD_LEN + ETH_HLEN); /* pad, dstmac, srcmac, ethtype */
431 + skb->protocol = eth_type_trans(skb, net_dev);
434 - skb_pull(skb, plen - ETH_HLEN);
435 - skb->protocol = eth_type_trans(skb, net_dev);
436 #ifdef CONFIG_ATM_BR2684_IPFILTER
437 if (unlikely(packet_fails_filter(skb->protocol, brvcc, skb))) {
438 brdev->stats.rx_dropped++;
439 @@ -372,11 +434,12 @@
443 -static int br2684_regvcc(struct atm_vcc *atmvcc, void __user *arg)
445 + * Assign a vcc to a dev
446 + * Note: we do not have explicit unassign, but look at _push()
448 +static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg)
450 -/* assign a vcc to a dev
451 -Note: we do not have explicit unassign, but look at _push()
454 struct br2684_vcc *brvcc;
457 net_dev = br2684_find_dev(&be.ifspec);
458 if (net_dev == NULL) {
460 - "br2684: tried to attach to non-existant device\n");
461 + "br2684: tried to attach to non-existant device\n");
465 @@ -411,13 +474,15 @@
467 if (be.fcs_in != BR2684_FCSIN_NO || be.fcs_out != BR2684_FCSOUT_NO ||
468 be.fcs_auto || be.has_vpiid || be.send_padding || (be.encaps !=
469 - BR2684_ENCAPS_VC && be.encaps != BR2684_ENCAPS_LLC) ||
470 - be.min_size != 0) {
474 + || be.min_size != 0) {
478 - pr_debug("br2684_regvcc vcc=%p, encaps=%d, brvcc=%p\n", atmvcc, be.encaps,
480 + pr_debug("br2684_regvcc vcc=%p, encaps=%d, brvcc=%p\n", atmvcc,
482 if (list_empty(&brdev->brvccs) && !brdev->mac_was_set) {
483 unsigned char *esi = atmvcc->dev->esi;
484 if (esi[0] | esi[1] | esi[2] | esi[3] | esi[4] | esi[5])
486 brvcc->device = net_dev;
487 brvcc->atmvcc = atmvcc;
488 atmvcc->user_back = brvcc;
489 - brvcc->encaps = (enum br2684_encaps) be.encaps;
490 + brvcc->encaps = (enum br2684_encaps)be.encaps;
491 brvcc->old_push = atmvcc->push;
493 atmvcc->push = br2684_push;
496 __module_get(THIS_MODULE);
500 write_unlock_irq(&devs_lock);
503 @@ -482,25 +547,52 @@
504 INIT_LIST_HEAD(&brdev->brvccs);
507 -static int br2684_create(void __user *arg)
508 +static void br2684_setup_routed(struct net_device *netdev)
510 + struct br2684_dev *brdev = BRPRIV(netdev);
511 + brdev->net_dev = netdev;
513 + netdev->hard_header_len = 0;
514 + my_eth_mac_addr = netdev->set_mac_address;
515 + netdev->set_mac_address = br2684_mac_addr;
516 + netdev->hard_start_xmit = br2684_start_xmit;
517 + netdev->get_stats = br2684_get_stats;
518 + netdev->addr_len = 0;
519 + netdev->mtu = 1500;
520 + netdev->type = ARPHRD_PPP;
521 + netdev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
522 + netdev->tx_queue_len = 100;
523 + INIT_LIST_HEAD(&brdev->brvccs);
526 +static int br2684_create(void __user * arg)
529 struct net_device *netdev;
530 struct br2684_dev *brdev;
531 struct atm_newif_br2684 ni;
532 + enum br2684_payload payload;
534 pr_debug("br2684_create\n");
536 if (copy_from_user(&ni, arg, sizeof ni)) {
540 + if (ni.media & BR2684_FLAG_ROUTED)
541 + payload = p_routed;
543 + payload = p_bridged;
544 + ni.media &= 0xffff; /* strip flags */
546 if (ni.media != BR2684_MEDIA_ETHERNET || ni.mtu != 1500) {
550 netdev = alloc_netdev(sizeof(struct br2684_dev),
551 ni.ifname[0] ? ni.ifname : "nas%d",
553 + (payload == p_routed) ?
554 + br2684_setup_routed : br2684_setup);
561 write_lock_irq(&devs_lock);
562 + brdev->payload = payload;
563 brdev->number = list_empty(&br2684_devs) ? 1 :
564 BRPRIV(list_entry_brdev(br2684_devs.prev))->number + 1;
565 list_add_tail(&brdev->br2684_devs, &br2684_devs);
566 @@ -528,16 +621,16 @@
567 * -ENOIOCTLCMD for any unrecognized ioctl
569 static int br2684_ioctl(struct socket *sock, unsigned int cmd,
573 struct atm_vcc *atmvcc = ATM_SD(sock);
574 void __user *argp = (void __user *)arg;
581 - case ATM_NEWBACKENDIF: {
583 + case ATM_NEWBACKENDIF:
584 err = get_user(b, (atm_backend_t __user *) argp);
588 return br2684_regvcc(atmvcc, argp);
590 return br2684_create(argp);
592 #ifdef CONFIG_ATM_BR2684_IPFILTER
594 if (atmvcc->push != br2684_push)
596 if (!capable(CAP_NET_ADMIN))
598 err = br2684_setfilt(atmvcc, argp);
601 #endif /* CONFIG_ATM_BR2684_IPFILTER */
603 @@ -564,24 +657,25 @@
606 static struct atm_ioctl br2684_ioctl_ops = {
607 - .owner = THIS_MODULE,
608 - .ioctl = br2684_ioctl,
609 + .owner = THIS_MODULE,
610 + .ioctl = br2684_ioctl,
614 #ifdef CONFIG_PROC_FS
615 -static void *br2684_seq_start(struct seq_file *seq, loff_t *pos)
616 +static void *br2684_seq_start(struct seq_file *seq, loff_t * pos)
617 + __acquires(devs_lock)
619 read_lock(&devs_lock);
620 return seq_list_start(&br2684_devs, *pos);
623 -static void *br2684_seq_next(struct seq_file *seq, void *v, loff_t *pos)
624 +static void *br2684_seq_next(struct seq_file *seq, void *v, loff_t * pos)
626 return seq_list_next(v, &br2684_devs, pos);
629 static void br2684_seq_stop(struct seq_file *seq, void *v)
630 + __releases(devs_lock)
632 read_unlock(&devs_lock);
635 static int br2684_seq_show(struct seq_file *seq, void *v)
637 const struct br2684_dev *brdev = list_entry(v, struct br2684_dev,
640 const struct net_device *net_dev = brdev->net_dev;
641 const struct br2684_vcc *brvcc;
642 DECLARE_MAC_BUF(mac);
643 @@ -601,21 +695,19 @@
644 brdev->mac_was_set ? "set" : "auto");
646 list_for_each_entry(brvcc, &brdev->brvccs, brvccs) {
647 - seq_printf(seq, " vcc %d.%d.%d: encaps=%s"
648 - ", failed copies %u/%u"
649 - "\n", brvcc->atmvcc->dev->number,
650 - brvcc->atmvcc->vpi, brvcc->atmvcc->vci,
651 - (brvcc->encaps == e_llc) ? "LLC" : "VC"
652 - , brvcc->copies_failed
653 - , brvcc->copies_needed
655 + seq_printf(seq, " vcc %d.%d.%d: encaps=%s payload=%s"
656 + ", failed copies %u/%u"
657 + "\n", brvcc->atmvcc->dev->number,
658 + brvcc->atmvcc->vpi, brvcc->atmvcc->vci,
659 + (brvcc->encaps == e_llc) ? "LLC" : "VC",
660 + (brdev->payload == p_bridged) ? "bridged" : "routed",
661 + brvcc->copies_failed, brvcc->copies_needed);
662 #ifdef CONFIG_ATM_BR2684_IPFILTER
663 #define b1(var, byte) ((u8 *) &brvcc->filter.var)[byte]
664 #define bs(var) b1(var, 0), b1(var, 1), b1(var, 2), b1(var, 3)
665 - if (brvcc->filter.netmask != 0)
666 - seq_printf(seq, " filter=%d.%d.%d.%d/"
668 - bs(prefix), bs(netmask));
669 + if (brvcc->filter.netmask != 0)
670 + seq_printf(seq, " filter=%d.%d.%d.%d/"
671 + "%d.%d.%d.%d\n", bs(prefix), bs(netmask));
674 #endif /* CONFIG_ATM_BR2684_IPFILTER */
677 static const struct seq_operations br2684_seq_ops = {
678 .start = br2684_seq_start,
679 - .next = br2684_seq_next,
680 - .stop = br2684_seq_stop,
681 - .show = br2684_seq_show,
682 + .next = br2684_seq_next,
683 + .stop = br2684_seq_stop,
684 + .show = br2684_seq_show,
687 static int br2684_proc_open(struct inode *inode, struct file *file)
688 @@ -636,26 +728,28 @@
691 static const struct file_operations br2684_proc_ops = {
692 - .owner = THIS_MODULE,
693 - .open = br2684_proc_open,
695 - .llseek = seq_lseek,
696 + .owner = THIS_MODULE,
697 + .open = br2684_proc_open,
699 + .llseek = seq_lseek,
700 .release = seq_release,
703 extern struct proc_dir_entry *atm_proc_root; /* from proc.c */
705 +#endif /* CONFIG_PROC_FS */
707 static int __init br2684_init(void)
709 #ifdef CONFIG_PROC_FS
710 struct proc_dir_entry *p;
712 if ((p = create_proc_entry("br2684", 0, atm_proc_root)) == NULL)
714 - p->proc_fops = &br2684_proc_ops;
716 + p->proc_fops = &br2684_proc_ops;
718 - register_atm_ioctl(&br2684_ioctl_ops);
720 + register_atm_ioctl(&br2684_ioctl_ops);
725 static void __exit br2684_exit(void)
727 MODULE_AUTHOR("Marcell GAL");
728 MODULE_DESCRIPTION("RFC2684 bridged protocols over ATM/AAL5");
729 MODULE_LICENSE("GPL");