On Jan 26, 2008 8:20 PM, chas williams - CONTRACTOR <[EMAIL PROTECTED]> wrote: > In message <[EMAIL PROTECTED]>,"Chung- > Chi Lo" writes: > >By the way, this routed mode patch doesn't include encaps=VCMUX and > >RFC2684 routed > >protocol decapsulation? > > yep. eric believes the following should fix both problems: > > commit 43e4b025ffe130cd6a292fa9ff909e39a88f849c > Author: Chas Williams - CONTRACTOR <[EMAIL PROTECTED]> > Date: Sat Jan 26 07:18:26 2008 -0500 > > [ATM]: [br2864] fix vcmux support > > From: Eric Kinzie <[EMAIL PROTECTED]> > Signed-off-by: Chas Williams <[EMAIL PROTECTED]> > > diff --git a/net/atm/br2684.c b/net/atm/br2684.c > index 31347cb..97b422c 100644 > --- a/net/atm/br2684.c > +++ b/net/atm/br2684.c > @@ -400,15 +400,20 @@ static void br2684_push(struct atm_vcc *atmvcc, struct > sk_buff *skb) > return; > } > > - } else { > - /* first 2 chars should be 0 */ > - if (*((u16 *) (skb->data)) != 0) { > - brdev->stats.rx_errors++; > - dev_kfree_skb(skb); > - return; > + } else { /* vc-mux */ > + if (brdev->payload == p_routed) {
add line skb->protocol = __constant_htons(ETH_P_IP); here just like LLC did? > + skb_reset_network_header(skb); > + skb->pkt_type = PACKET_HOST; > + } else { /* p_bridged */ > + /* first 2 chars should be 0 */ > + if (*((u16 *) (skb->data)) != 0) { > + brdev->stats.rx_errors++; > + dev_kfree_skb(skb); > + return; > + } > + skb_pull(skb, BR2684_PAD_LEN); > + skb->protocol = eth_type_trans(skb, net_dev); > } > - skb_pull(skb, BR2684_PAD_LEN + ETH_HLEN); /* pad, > dstmac, srcmac, ethtype */ > - skb->protocol = eth_type_trans(skb, net_dev); > } > Also have a problem when encapsulation is VCMUX and routed mode, in /* @@ -136,6 +156,7 @@ static int br2684_xmit_vcc(struct sk_buff *skb, struct br2684_dev *brdev, { .. .. + if (brvcc->encaps == e_llc) { .. + } else { + skb_push(skb, 2); + if (brdev->payload == p_bridged) + memset(skb->data, 0, 2); + } Here should be } else { if (brdev->payload == p_bridged) { skb_push(skb, 2); memset(skb->data, 0, 2); } } Because VCMUX and routed mode doesn't need two bytes in header. -- Lino, Chung-Chi Lo -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html