534 int retval;
535 struct mpoa_client *mpc;
536 struct ethhdr *eth;
537 int i = 0;
538
539 mpc = find_mpc_by_lec(dev);
540 if(mpc == NULL) {
541 printk("mpoa: (%s) mpc_send_packet: no MPC found\n", dev->name);
542 goto non_ip;
543 }
544
545 eth = (struct ethhdr *)skb->data;
546 if (eth->h_proto != htons(ETH_P_IP))
547 goto non_ip;
548
549
550 if (skb->len < ETH_HLEN + sizeof(struct iphdr))
551 goto non_ip;
552 skb_set_network_header(skb, ETH_HLEN);
553 if (skb->len < ETH_HLEN + ip_hdr(skb)->ihl * 4 || ip_hdr(skb)->ihl < 5)
554 goto non_ip;
555
556 while (i < mpc->number_of_mps_macs) {
557 if (!compare_ether_addr(eth->h_dest, (mpc->mps_macs + i*ETH_ALEN)))
558 if ( send_via_shortcut(skb, mpc) == 0 )
559 return 0;
560 i++;
561 }
562
563 non_ip:
564 retval = mpc->old_hard_start_xmit(skb,dev);
565
566 return retval;
567}
568
569static int atm_mpoa_vcc_attach(struct atm_vcc *vcc, void __user *arg)
570{
571 int bytes_left;
572 struct mpoa_client *mpc;
573 struct atmmpc_ioc ioc_data;
574 in_cache_entry *in_entry;