Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121729
b: refs/heads/master
c: 5c7f033
h: refs/heads/master
i:
  121727: 6f314d0
v: v3
  • Loading branch information
Harvey Harrison authored and David S. Miller committed Nov 7, 2008
1 parent 2d36a49 commit 200fa96
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca62059b7ec7267d1d2cab0791d3ed6d033e0583
refs/heads/master: 5c7f0333584128c745fbda845abbe3a32c22d467
11 changes: 5 additions & 6 deletions trunk/net/phonet/af_phonet.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@

static struct net_proto_family phonet_proto_family;
static struct phonet_protocol *phonet_proto_get(int protocol);
static inline void phonet_proto_put(struct phonet_protocol *pp);

static inline void phonet_proto_put(struct phonet_protocol *pp)
{
module_put(pp->prot->owner);
}

/* protocol family functions */

Expand Down Expand Up @@ -428,11 +432,6 @@ static struct phonet_protocol *phonet_proto_get(int protocol)
return pp;
}

static inline void phonet_proto_put(struct phonet_protocol *pp)
{
module_put(pp->prot->owner);
}

/* Module registration */
static int __init phonet_init(void)
{
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/phonet/pep-gprs.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ struct gprs_dev {
unsigned tx_max;
};

static int gprs_type_trans(struct sk_buff *skb)
static __be16 gprs_type_trans(struct sk_buff *skb)
{
const u8 *pvfc;
u8 buf;

pvfc = skb_header_pointer(skb, 0, 1, &buf);
if (!pvfc)
return 0;
return htons(0);
/* Look at IP version field */
switch (*pvfc >> 4) {
case 4:
return htons(ETH_P_IP);
case 6:
return htons(ETH_P_IPV6);
}
return 0;
return htons(0);
}

/*
Expand All @@ -84,7 +84,7 @@ static void gprs_state_change(struct sock *sk)
static int gprs_recv(struct gprs_dev *dev, struct sk_buff *skb)
{
int err = 0;
u16 protocol = gprs_type_trans(skb);
__be16 protocol = gprs_type_trans(skb);

if (!protocol) {
err = -EINVAL;
Expand Down

0 comments on commit 200fa96

Please sign in to comment.