don't try to create mtd partitions on bcm947xx when the trx header is not found ...
[openwrt.git] / target / linux / generic-2.4 / patches / 226-atm_br2684.patch
1 diff -urN linux-2.4.32/net/atm/br2684.c linux-2.4.32.new/net/atm/br2684.c
2 --- linux-2.4.32/net/atm/br2684.c 2004-08-08 01:26:06.000000000 +0200
3 +++ linux-2.4.32.new/net/atm/br2684.c 2006-02-06 18:59:40.000000000 +0100
4 @@ -55,36 +55,55 @@
5 #define skb_debug(skb) do {} while (0)
6 #endif
7
8 +#define BR2684_LLC_LEN 3
9 +#define BR2684_SNAP_LEN 3
10 +#define BR2684_ETHERTYPE_LEN 2
11 +#define BR2684_PID_LEN 2
12 +#define BR2684_PAD_LEN 2
13 +
14 +static unsigned char llc_common[] = { 0xaa, 0xaa, 0x03 };
15 +static unsigned char snap_bridged[] = { 0x00, 0x80, 0xc2 };
16 +static unsigned char snap_routed[] = { 0x00, 0x00, 0x00 };
17 +static unsigned char pid_ipv4[] = { 0x00, 0x07 };
18 +static unsigned char ethertype_ipv4[] = { 0x08, 0x00 };
19 +static unsigned char ethertype_ipv6[] = { 0x86, 0xdd };
20 +static unsigned char pad_bridged[] = { 0x00, 0x00 };
21 +
22 static unsigned char llc_oui_pid_pad[] =
23 { 0xAA, 0xAA, 0x03, 0x00, 0x80, 0xC2, 0x00, 0x07, 0x00, 0x00 };
24 +static unsigned char llc_oui_ipv6[] =
25 + { 0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00, 0x86, 0xdd };
26 +static unsigned char llc_oui_ipv4[] =
27 + { 0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00 };
28 #define PADLEN (2)
29
30 enum br2684_encaps {
31 - e_vc = BR2684_ENCAPS_VC,
32 + e_vc = BR2684_ENCAPS_VC,
33 e_llc = BR2684_ENCAPS_LLC,
34 };
35
36 struct br2684_vcc {
37 - struct atm_vcc *atmvcc;
38 + struct atm_vcc *atmvcc;
39 struct br2684_dev *brdev;
40 /* keep old push,pop functions for chaining */
41 - void (*old_push)(struct atm_vcc *vcc,struct sk_buff *skb);
42 + void (*old_push) (struct atm_vcc * vcc, struct sk_buff * skb);
43 /* void (*old_pop)(struct atm_vcc *vcc,struct sk_buff *skb); */
44 enum br2684_encaps encaps;
45 + enum br2684_payload payload;
46 struct list_head brvccs;
47 #ifdef CONFIG_ATM_BR2684_IPFILTER
48 struct br2684_filter filter;
49 -#endif /* CONFIG_ATM_BR2684_IPFILTER */
50 +#endif /* CONFIG_ATM_BR2684_IPFILTER */
51 #ifndef FASTER_VERSION
52 unsigned copies_needed, copies_failed;
53 -#endif /* FASTER_VERSION */
54 +#endif /* FASTER_VERSION */
55 };
56
57 struct br2684_dev {
58 struct net_device net_dev;
59 struct list_head br2684_devs;
60 int number;
61 - struct list_head brvccs; /* one device <=> one vcc (before xmas) */
62 + struct list_head brvccs; /* one device <=> one vcc (before xmas) */
63 struct net_device_stats stats;
64 int mac_was_set;
65 };
66 @@ -173,24 +192,84 @@
67 }
68 skb = skb2;
69 }
70 - skb_push(skb, minheadroom);
71 - if (brvcc->encaps == e_llc)
72 - memcpy(skb->data, llc_oui_pid_pad, 10);
73 - else
74 - memset(skb->data, 0, 2);
75 -#endif /* FASTER_VERSION */
76 +
77 + /* This skb_push is a problem: routed packets need less headroom than
78 + * bridged packets.
79 + */
80 +
81 +/* skb_push(skb, minheadroom); */
82 + if (brvcc->encaps == e_llc) {
83 + int offset = 0;
84 + int actual_headroom;
85 +
86 + actual_headroom =
87 + BR2684_LLC_LEN +
88 + BR2684_SNAP_LEN +
89 + ((brvcc->payload == p_bridged) ?
90 + (BR2684_PID_LEN + BR2684_PAD_LEN) :
91 + BR2684_ETHERTYPE_LEN);
92 +
93 + skb_push(skb, actual_headroom);
94 + memcpy(skb->data, llc_common, BR2684_LLC_LEN);
95 + offset += BR2684_LLC_LEN;
96 +
97 + if (brvcc->payload == p_bridged) {
98 + memcpy(skb->data + offset, snap_bridged,
99 + BR2684_SNAP_LEN);
100 + offset += BR2684_SNAP_LEN;
101 + /* pid_ipv4 is poorly named. should probably be
102 + * pid_ethernet
103 + */
104 + memcpy(skb->data + offset, pid_ipv4,
105 + BR2684_PID_LEN);
106 + offset += BR2684_PID_LEN;
107 + memcpy(skb->data + offset, pad_bridged,
108 + BR2684_PAD_LEN);
109 + offset += BR2684_PAD_LEN;
110 + } else if (brvcc->payload == p_routed) {
111 + unsigned short prot =
112 + __constant_ntohs(skb->protocol);
113 + memcpy(skb->data + offset, snap_routed,
114 + BR2684_SNAP_LEN);
115 + offset += BR2684_SNAP_LEN;
116 +
117 + switch (prot) {
118 + case ETH_P_IP:
119 + memcpy(skb->data + offset,
120 + ethertype_ipv4,
121 + BR2684_ETHERTYPE_LEN);
122 + break;
123 + case ETH_P_IPV6:
124 + memcpy(skb->data + offset,
125 + ethertype_ipv6,
126 + BR2684_ETHERTYPE_LEN);
127 + break;
128 + default:
129 + dev_kfree_skb(skb);
130 + return 0;
131 + }
132 + offset += BR2684_ETHERTYPE_LEN;
133 +
134 + }
135 + } else {
136 + skb_push(skb, 2);
137 + if (brvcc->payload == p_bridged)
138 + memset(skb->data, 0, 2);
139 + }
140 +#endif /* FASTER_VERSION */
141 skb_debug(skb);
142
143 ATM_SKB(skb)->vcc = atmvcc = brvcc->atmvcc;
144 - DPRINTK("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, atmvcc, atmvcc->dev);
145 + DPRINTK("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, atmvcc,
146 + atmvcc->dev);
147 if (!atm_may_send(atmvcc, skb->truesize)) {
148 /* we free this here for now, because we cannot know in a higher
149 - layer whether the skb point it supplied wasn't freed yet.
150 - now, it always is.
151 - */
152 + layer whether the skb point it supplied wasn't freed yet.
153 + now, it always is.
154 + */
155 dev_kfree_skb(skb);
156 return 0;
157 - }
158 + }
159 atomic_add(skb->truesize, &atmvcc->sk->wmem_alloc);
160 ATM_SKB(skb)->atm_options = atmvcc->atm_options;
161 brdev->stats.tx_packets++;
162 @@ -428,18 +507,39 @@
163 atm_return(atmvcc, skb->truesize);
164 DPRINTK("skb from brdev %p\n", brdev);
165 if (brvcc->encaps == e_llc) {
166 + /* accept packets that have "ipv[46]" in the snap header */
167 + /* 8 - 2 == sizeof(llc_oui_ipv6) - BR2684_ETHERTYPE_LEN */
168 + if (memcmp(skb->data, llc_oui_ipv6, 8 - 2) == 0) {
169 + plen = sizeof(llc_oui_ipv6);
170 +
171 + if (memcmp(skb->data + 6, ethertype_ipv6, 2) == 0)
172 + skb->protocol =
173 + __constant_htons(ETH_P_IPV6);
174 + else if (memcmp(skb->data + 6, ethertype_ipv4, 2)
175 + == 0)
176 + skb->protocol = __constant_htons(ETH_P_IP);
177 + else {
178 + brdev->stats.rx_errors++;
179 + dev_kfree_skb(skb);
180 + return;
181 + }
182 + skb_pull(skb, plen);
183 + skb->nh.raw = skb->data;
184 + skb->pkt_type = PACKET_HOST;
185 + }
186 +
187 /* let us waste some time for checking the encapsulation.
188 Note, that only 7 char is checked so frames with a valid FCS
189 are also accepted (but FCS is not checked of course) */
190 - if (memcmp(skb->data, llc_oui_pid_pad, 7)) {
191 + else if (memcmp(skb->data, llc_oui_pid_pad, 7) == 0) {
192 + skb_pull(skb, plen - ETH_HLEN);
193 + skb->protocol =
194 + eth_type_trans(skb, &brdev->net_dev);
195 + } else {
196 brdev->stats.rx_errors++;
197 dev_kfree_skb(skb);
198 return;
199 }
200 -
201 - /* Strip FCS if present */
202 - if (skb->len > 7 && skb->data[7] == 0x01)
203 - __skb_trim(skb, skb->len - 4);
204 } else {
205 plen = PADLEN + ETH_HLEN; /* pad, dstmac,srcmac, ethtype */
206 /* first 2 chars should be 0 */
207 @@ -448,13 +548,14 @@
208 dev_kfree_skb(skb);
209 return;
210 }
211 + skb_pull(skb, plen - ETH_HLEN);
212 + skb->protocol = eth_type_trans(skb, &brdev->net_dev);
213 }
214 if (skb->len < plen) {
215 brdev->stats.rx_errors++;
216 dev_kfree_skb(skb); /* dev_ not needed? */
217 return;
218 }
219 -
220 #ifdef FASTER_VERSION
221 /* FIXME: tcpdump shows that pointer to mac header is 2 bytes earlier,
222 than should be. What else should I set? */
223 @@ -465,30 +566,29 @@
224 skb->protocol = ((u16 *) skb->data)[-1];
225 #else /* some protocols might require this: */
226 skb->protocol = br_type_trans(skb, &brdev->net_dev);
227 -#endif /* CONFIG_BR2684_FAST_TRANS */
228 +#endif /* CONFIG_BR2684_FAST_TRANS */
229 #else
230 - skb_pull(skb, plen - ETH_HLEN);
231 - skb->protocol = eth_type_trans(skb, &brdev->net_dev);
232 -#endif /* FASTER_VERSION */
233 + /* skb_pull(skb, plen - ETH_HLEN); */
234 + /* skb->protocol = eth_type_trans(skb, &brdev->net_dev); */
235 +#endif /* FASTER_VERSION */
236 #ifdef CONFIG_ATM_BR2684_IPFILTER
237 if (packet_fails_filter(skb->protocol, brvcc, skb)) {
238 brdev->stats.rx_dropped++;
239 dev_kfree_skb(skb);
240 return;
241 }
242 -#endif /* CONFIG_ATM_BR2684_IPFILTER */
243 +#endif /* CONFIG_ATM_BR2684_IPFILTER */
244 skb->dev = &brdev->net_dev;
245 - ATM_SKB(skb)->vcc = atmvcc; /* needed ? */
246 + /* ATM_SKB(skb)->vcc = atmvcc; *//* needed ? */
247 DPRINTK("received packet's protocol: %x\n", ntohs(skb->protocol));
248 skb_debug(skb);
249 - if (!(brdev->net_dev.flags & IFF_UP)) { /* sigh, interface is down */
250 + if (!(brdev->net_dev.flags & IFF_UP)) { /* sigh, interface is down */
251 brdev->stats.rx_dropped++;
252 dev_kfree_skb(skb);
253 return;
254 }
255 brdev->stats.rx_packets++;
256 brdev->stats.rx_bytes += skb->len;
257 - memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data));
258 netif_rx(skb);
259 }
260
261 @@ -525,10 +625,10 @@
262 err = -EEXIST;
263 goto error;
264 }
265 - if (be.fcs_in != BR2684_FCSIN_NO || be.fcs_out != BR2684_FCSOUT_NO ||
266 - be.fcs_auto || be.has_vpiid || be.send_padding || (be.encaps !=
267 - BR2684_ENCAPS_VC && be.encaps != BR2684_ENCAPS_LLC) ||
268 - be.min_size != 0) {
269 + if (be.fcs_in != BR2684_FCSIN_NO || be.fcs_out != BR2684_FCSOUT_NO
270 + || be.fcs_auto || be.has_vpiid || be.send_padding
271 + || (be.encaps != BR2684_ENCAPS_VC
272 + && be.encaps != BR2684_ENCAPS_LLC) || be.min_size != 0) {
273 err = -EINVAL;
274 goto error;
275 }
276 @@ -554,18 +654,21 @@
277 brvcc->atmvcc = atmvcc;
278 atmvcc->user_back = brvcc;
279 brvcc->encaps = (enum br2684_encaps) be.encaps;
280 + brvcc->payload = (enum br2684_payload) be.payload;
281 brvcc->old_push = atmvcc->push;
282 barrier();
283 atmvcc->push = br2684_push;
284 skb_queue_head_init(&copy);
285 skb_migrate(&atmvcc->sk->receive_queue, &copy);
286 while ((skb = skb_dequeue(&copy))) {
287 +#ifdef notdef
288 BRPRIV(skb->dev)->stats.rx_bytes -= skb->len;
289 BRPRIV(skb->dev)->stats.rx_packets--;
290 +#endif
291 br2684_push(atmvcc, skb);
292 }
293 return 0;
294 - error:
295 + error:
296 write_unlock_irq(&devs_lock);
297 MOD_DEC_USE_COUNT;
298 return err;
299 @@ -608,12 +711,25 @@
300
301 if (ni.ifname[0] != '\0') {
302 memcpy(brdev->net_dev.name, ni.ifname,
303 - sizeof(brdev->net_dev.name));
304 - brdev->net_dev.name[sizeof(brdev->net_dev.name) - 1] = '\0';
305 + sizeof(brdev->net_dev.name));
306 + brdev->net_dev.name[sizeof(brdev->net_dev.name) - 1] =
307 + '\0';
308 } else
309 sprintf(brdev->net_dev.name, "nas%d", brdev->number);
310 DPRINTK("registered netdev %s\n", brdev->net_dev.name);
311 - ether_setup(&brdev->net_dev);
312 + if (ni.payload == p_routed) {
313 + brdev->net_dev.hard_header_len = 0;
314 + brdev->net_dev.addr_len = 0;
315 + brdev->net_dev.mtu = 1500;
316 +
317 + /* Type PPP seems most suitable */
318 + brdev->net_dev.type = ARPHRD_PPP;
319 + brdev->net_dev.flags =
320 + IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
321 + brdev->net_dev.tx_queue_len = 100;
322 + } else {
323 + ether_setup(&brdev->net_dev);
324 + }
325 brdev->mac_was_set = 0;
326 #ifdef FASTER_VERSION
327 my_eth_header = brdev->net_dev.hard_header;
328 @@ -677,12 +793,11 @@
329 err = br2684_setfilt(atmvcc, arg);
330 MOD_DEC_USE_COUNT;
331 return err;
332 -#endif /* CONFIG_ATM_BR2684_IPFILTER */
333 +#endif /* CONFIG_ATM_BR2684_IPFILTER */
334 }
335 return -ENOIOCTLCMD;
336 }
337
338 -#ifdef CONFIG_PROC_FS
339 /* Never put more than 256 bytes in at once */
340 static int br2684_proc_engine(loff_t pos, char *buf)
341 {
342 @@ -692,52 +807,62 @@
343 list_for_each(lhd, &br2684_devs) {
344 brdev = list_entry_brdev(lhd);
345 if (pos-- == 0)
346 - return sprintf(buf, "dev %.16s: num=%d, mac=%02X:%02X:"
347 - "%02X:%02X:%02X:%02X (%s)\n", brdev->net_dev.name,
348 - brdev->number,
349 - brdev->net_dev.dev_addr[0],
350 - brdev->net_dev.dev_addr[1],
351 - brdev->net_dev.dev_addr[2],
352 - brdev->net_dev.dev_addr[3],
353 - brdev->net_dev.dev_addr[4],
354 - brdev->net_dev.dev_addr[5],
355 - brdev->mac_was_set ? "set" : "auto");
356 + return sprintf(buf,
357 + "dev %.16s: num=%d, mac=%02X:%02X:"
358 + "%02X:%02X:%02X:%02X (%s)\n",
359 + brdev->net_dev.name, brdev->number,
360 + brdev->net_dev.dev_addr[0],
361 + brdev->net_dev.dev_addr[1],
362 + brdev->net_dev.dev_addr[2],
363 + brdev->net_dev.dev_addr[3],
364 + brdev->net_dev.dev_addr[4],
365 + brdev->net_dev.dev_addr[5],
366 + brdev->
367 + mac_was_set ? "set" : "auto");
368 list_for_each(lhc, &brdev->brvccs) {
369 brvcc = list_entry_brvcc(lhc);
370 if (pos-- == 0)
371 - return sprintf(buf, " vcc %d.%d.%d: encaps=%s"
372 + return sprintf(buf,
373 + " vcc %d.%d.%d: encaps=%s"
374 + ", payload=%s"
375 #ifndef FASTER_VERSION
376 - ", failed copies %u/%u"
377 -#endif /* FASTER_VERSION */
378 - "\n", brvcc->atmvcc->dev->number,
379 - brvcc->atmvcc->vpi, brvcc->atmvcc->vci,
380 - (brvcc->encaps == e_llc) ? "LLC" : "VC"
381 + ", failed copies %u/%u"
382 +#endif /* FASTER_VERSION */
383 + "\n",
384 + brvcc->atmvcc->dev->number,
385 + brvcc->atmvcc->vpi,
386 + brvcc->atmvcc->vci,
387 + (brvcc->encaps ==
388 + e_llc) ? "LLC" : "VC",
389 + (brvcc->payload ==
390 + p_bridged) ? "bridged" :
391 + "routed"
392 #ifndef FASTER_VERSION
393 - , brvcc->copies_failed
394 - , brvcc->copies_needed
395 -#endif /* FASTER_VERSION */
396 + , brvcc->copies_failed,
397 + brvcc->copies_needed
398 +#endif /* FASTER_VERSION */
399 );
400 #ifdef CONFIG_ATM_BR2684_IPFILTER
401 #define b1(var, byte) ((u8 *) &brvcc->filter.var)[byte]
402 #define bs(var) b1(var, 0), b1(var, 1), b1(var, 2), b1(var, 3)
403 if (brvcc->filter.netmask != 0 && pos-- == 0)
404 - return sprintf(buf, " filter=%d.%d.%d.%d/"
405 - "%d.%d.%d.%d\n", bs(prefix), bs(netmask));
406 + return sprintf(buf,
407 + " filter=%d.%d.%d.%d/"
408 + "%d.%d.%d.%d\n", bs(prefix),
409 + bs(netmask));
410 #undef bs
411 #undef b1
412 -#endif /* CONFIG_ATM_BR2684_IPFILTER */
413 +#endif /* CONFIG_ATM_BR2684_IPFILTER */
414 }
415 }
416 return 0;
417 }
418
419 static ssize_t br2684_proc_read(struct file *file, char *buf, size_t count,
420 - loff_t *pos)
421 + loff_t * pos)
422 {
423 unsigned long page;
424 int len = 0, x, left;
425 - loff_t n = *pos;
426 -
427 page = get_free_page(GFP_KERNEL);
428 if (!page)
429 return -ENOMEM;
430 @@ -746,7 +871,7 @@
431 left = count;
432 read_lock(&devs_lock);
433 for (;;) {
434 - x = br2684_proc_engine(n, &((char *) page)[len]);
435 + x = br2684_proc_engine(*pos, &((char *) page)[len]);
436 if (x == 0)
437 break;
438 if (x > left)
439 @@ -761,12 +886,11 @@
440 }
441 len += x;
442 left -= x;
443 - n++;
444 + (*pos)++;
445 if (left < 256)
446 break;
447 }
448 read_unlock(&devs_lock);
449 - *pos = n;
450 if (len > 0 && copy_to_user(buf, (char *) page, len))
451 len = -EFAULT;
452 free_page(page);
453 @@ -774,23 +898,20 @@
454 }
455
456 static struct file_operations br2684_proc_operations = {
457 - read: br2684_proc_read,
458 + read:br2684_proc_read,
459 };
460
461 extern struct proc_dir_entry *atm_proc_root; /* from proc.c */
462 -#endif /* CONFIG_PROC_FS */
463
464 /* the following avoids some spurious warnings from the compiler */
465 #define UNUSED __attribute__((unused))
466
467 static int __init UNUSED br2684_init(void)
468 {
469 -#ifdef CONFIG_PROC_FS
470 struct proc_dir_entry *p;
471 if ((p = create_proc_entry("br2684", 0, atm_proc_root)) == NULL)
472 return -ENOMEM;
473 p->proc_fops = &br2684_proc_operations;
474 -#endif /* CONFIG_PROC_FS */
475 br2684_ioctl_set(br2684_ioctl);
476 return 0;
477 }
478 @@ -799,9 +920,7 @@
479 {
480 struct br2684_dev *brdev;
481 br2684_ioctl_set(NULL);
482 -#ifdef CONFIG_PROC_FS
483 remove_proc_entry("br2684", atm_proc_root);
484 -#endif /* CONFIG_PROC_FS */
485 while (!list_empty(&br2684_devs)) {
486 brdev = list_entry_brdev(br2684_devs.next);
487 unregister_netdev(&brdev->net_dev);
488 diff -urN linux-2.4.32/net/atm/common.c linux-2.4.32.new/net/atm/common.c
489 --- linux-2.4.32/net/atm/common.c 2004-02-18 14:36:32.000000000 +0100
490 +++ linux-2.4.32.new/net/atm/common.c 2006-02-06 17:26:52.000000000 +0100
491 @@ -158,6 +158,7 @@
492 }
493 #ifdef CONFIG_ATM_BR2684_MODULE
494 EXPORT_SYMBOL(br2684_ioctl_set);
495 +EXPORT_SYMBOL(br2684_ioctl_hook);
496 #endif
497 #endif
498
499 --- linux-2.4.32/include/linux/atmbr2684.h 2002-08-03 02:39:45.000000000 +0200
500 +++ linux-2.4.32.new/include/linux/atmbr2684.h 2006-02-06 19:01:24.000000000 +0100
501 @@ -3,6 +3,7 @@
502
503 #include <linux/atm.h>
504 #include <linux/if.h> /* For IFNAMSIZ */
505 +#include <linux/if_ether.h> /* ETH_P_* */
506
507 /*
508 * Type of media we're bridging (ethernet, token ring, etc) Currently only
509 @@ -36,15 +37,24 @@
510 #define BR2684_ENCAPS_AUTODETECT (2) /* Unsuported */
511
512 /*
513 + * Is this VC bridged or routed?
514 + */
515 +
516 +#define BR2684_PAYLOAD_ROUTED (0)
517 +#define BR2684_PAYLOAD_BRIDGED (1)
518 +
519 +
520 +/*
521 * This is for the ATM_NEWBACKENDIF call - these are like socket families:
522 * the first element of the structure is the backend number and the rest
523 * is per-backend specific
524 */
525 struct atm_newif_br2684 {
526 - atm_backend_t backend_num; /* ATM_BACKEND_BR2684 */
527 - int media; /* BR2684_MEDIA_* */
528 - char ifname[IFNAMSIZ];
529 - int mtu;
530 + atm_backend_t backend_num; /* ATM_BACKEND_BR2684 */
531 + int media; /* BR2684_MEDIA_* */
532 + char ifname[IFNAMSIZ];
533 + int mtu;
534 + int payload; /* bridged or routed */
535 };
536
537 /*
538 @@ -68,16 +78,17 @@
539 * is per-backend specific
540 */
541 struct atm_backend_br2684 {
542 - atm_backend_t backend_num; /* ATM_BACKEND_BR2684 */
543 + atm_backend_t backend_num; /* ATM_BACKEND_BR2684 */
544 struct br2684_if_spec ifspec;
545 - int fcs_in; /* BR2684_FCSIN_* */
546 - int fcs_out; /* BR2684_FCSOUT_* */
547 - int fcs_auto; /* 1: fcs_{in,out} disabled if no FCS rx'ed */
548 - int encaps; /* BR2684_ENCAPS_* */
549 - int has_vpiid; /* 1: use vpn_id - Unsupported */
550 - __u8 vpn_id[7];
551 - int send_padding; /* unsupported */
552 - int min_size; /* we will pad smaller packets than this */
553 + int fcs_in; /* BR2684_FCSIN_* */
554 + int fcs_out; /* BR2684_FCSOUT_* */
555 + int fcs_auto; /* 1: fcs_{in,out} disabled if no FCS rx'ed */
556 + int encaps; /* BR2684_ENCAPS_* */
557 + int payload; /* BR2684_PAYLOAD_* */
558 + int has_vpiid; /* 1: use vpn_id - Unsupported */
559 + __u8 vpn_id[7];
560 + int send_padding; /* unsupported */
561 + int min_size; /* we will pad smaller packets than this */
562 };
563
564 /*
565 @@ -95,7 +106,12 @@
566 struct br2684_filter filter;
567 };
568
569 +enum br2684_payload {
570 + p_routed = BR2684_PAYLOAD_ROUTED,
571 + p_bridged = BR2684_PAYLOAD_BRIDGED,
572 +};
573 +
574 #define BR2684_SETFILT _IOW( 'a', ATMIOC_BACKEND + 0, \
575 struct br2684_filter_set)
576
577 -#endif /* _LINUX_ATMBR2684_H */
578 +#endif /* _LINUX_ATMBR2684_H */
This page took 0.073311 seconds and 5 git commands to generate.