vserver 1.9.5.x5
[linux-2.6.git] / drivers / net / pppoe.c
index 64b35cc..44e182e 100644 (file)
@@ -86,7 +86,7 @@ static int pppoe_xmit(struct ppp_channel *chan, struct sk_buff *skb);
 static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb);
 
 static struct proto_ops pppoe_ops;
-static rwlock_t pppoe_hash_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(pppoe_hash_lock);
 
 static struct ppp_channel_ops pppoe_chan_ops;
 
@@ -391,7 +391,7 @@ static int pppoe_rcv(struct sk_buff *skb,
 
        ph = (struct pppoe_hdr *) skb->nh.raw;
 
-       po = get_item((unsigned long) ph->sid, skb->mac.ethernet->h_source);
+       po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source);
        if (!po) 
                goto drop;
 
@@ -440,7 +440,7 @@ static int pppoe_disc_rcv(struct sk_buff *skb,
        if (ph->code != PADT_CODE)
                goto abort;
 
-       po = get_item((unsigned long) ph->sid, skb->mac.ethernet->h_source);
+       po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source);
        if (po) {
                struct sock *sk = po->sk;