--- zzzz-none-000/linux-2.4.17/net/atm/common.c 2001-11-09 22:11:15.000000000 +0000 +++ sangam-fb-401/linux-2.4.17/net/atm/common.c 2005-07-25 12:39:05.000000000 +0000 @@ -63,6 +63,11 @@ EXPORT_SYMBOL(pppoatm_ioctl_hook); #endif +#if defined(CONFIG_ATM_BR2684) || defined(CONFIG_ATM_BR2684_MODULE) +int (*br2684_ioctl_hook)(struct atm_vcc *, unsigned int, unsigned long); +EXPORT_SYMBOL(br2684_ioctl_hook); +#endif + #include "resources.h" /* atm_find_dev */ #include "common.h" /* prototypes */ #include "protocols.h" /* atm_init_ */ @@ -72,7 +77,6 @@ #endif #include "signaling.h" /* for WAITING and sigd_attach */ - #if 0 #define DPRINTK(format,args...) printk(KERN_DEBUG format,##args) #else @@ -492,6 +496,13 @@ mask = 0; if (skb_peek(&vcc->recvq) || skb_peek(&vcc->listenq)) mask |= POLLIN | POLLRDNORM; +#ifdef CONFIG_PACKET_MMAP + if (vcc->iovec) { + unsigned last = vcc->head ? vcc->head-1 : vcc->iovmax; + if (vcc->iovec[last]->tp_status) + mask |= POLLIN | POLLRDNORM; + } +#endif if (test_bit(ATM_VF_RELEASED,&vcc->flags) || test_bit(ATM_VF_CLOSE,&vcc->flags)) mask |= POLLHUP; @@ -785,6 +796,14 @@ goto done; } #endif +#if defined(CONFIG_ATM_BR2684) || defined(CONFIG_ATM_BR2684_MODULE) + if (br2684_ioctl_hook) { + ret_val = br2684_ioctl_hook(vcc, cmd, arg); + if (ret_val != -ENOIOCTLCMD) + goto done; + } +#endif + if (get_user(buf,&((struct atmif_sioc *) arg)->arg)) { ret_val = -EFAULT; goto done; @@ -1037,6 +1056,33 @@ if (value) vcc->atm_options |= ATM_ATMOPT_CLP; else vcc->atm_options &= ~ATM_ATMOPT_CLP; return 0; + +#ifdef CONFIG_PACKET_MMAP + case PACKET_RX_RING: + { + struct tpacket_req req; + + if (optlensk, &req, 0); + } +#if 0 /* not implemented yet */ + case PACKET_COPY_THRESH: + { + int val; + + if (optlen!=sizeof(val)) + return -EINVAL; + if (copy_from_user(&val,optval,sizeof(val))) + return -EFAULT; + + vcc->copy_thresh = val; + return 0; + } +#endif +#endif default: if (level == SOL_SOCKET) return -EINVAL; break;