Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15572
b: refs/heads/master
c: 17ba15f
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jan 3, 2006
1 parent 6bd822e commit 0ec3fb0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 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: 8639a11e23d9eb0a6ceac2feed27acdfbb158f95
refs/heads/master: 17ba15fb6264f27374bc87f4c3f8519b80289d85
9 changes: 4 additions & 5 deletions trunk/drivers/net/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
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 const struct proto_ops pppoe_ops;
static DEFINE_RWLOCK(pppoe_hash_lock);

static struct ppp_channel_ops pppoe_chan_ops;
Expand Down Expand Up @@ -1063,9 +1063,7 @@ static int __init pppoe_proc_init(void)
static inline int pppoe_proc_init(void) { return 0; }
#endif /* CONFIG_PROC_FS */

/* ->ioctl are set at pppox_create */

static struct proto_ops pppoe_ops = {
static const struct proto_ops pppoe_ops = {
.family = AF_PPPOX,
.owner = THIS_MODULE,
.release = pppoe_release,
Expand All @@ -1081,7 +1079,8 @@ static struct proto_ops pppoe_ops = {
.getsockopt = sock_no_getsockopt,
.sendmsg = pppoe_sendmsg,
.recvmsg = pppoe_recvmsg,
.mmap = sock_no_mmap
.mmap = sock_no_mmap,
.ioctl = pppox_ioctl,
};

static struct pppox_proto pppoe_proto = {
Expand Down
10 changes: 3 additions & 7 deletions trunk/drivers/net/pppox.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ EXPORT_SYMBOL(register_pppox_proto);
EXPORT_SYMBOL(unregister_pppox_proto);
EXPORT_SYMBOL(pppox_unbind_sock);

static int pppox_ioctl(struct socket* sock, unsigned int cmd,
unsigned long arg)
int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
struct sock *sk = sock->sk;
struct pppox_sock *po = pppox_sk(sk);
Expand Down Expand Up @@ -105,6 +104,7 @@ static int pppox_ioctl(struct socket* sock, unsigned int cmd,
return rc;
}

EXPORT_SYMBOL(pppox_ioctl);

static int pppox_create(struct socket *sock, int protocol)
{
Expand All @@ -119,11 +119,7 @@ static int pppox_create(struct socket *sock, int protocol)
goto out;

rc = pppox_protos[protocol]->create(sock);
if (!rc) {
/* We get to set the ioctl handler. */
/* For everything else, pppox is just a shell. */
sock->ops->ioctl = pppox_ioctl;
}

module_put(pppox_protos[protocol]->owner);
out:
return rc;
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/linux/if_pppox.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ struct pppox_proto {
extern int register_pppox_proto(int proto_num, struct pppox_proto *pp);
extern void unregister_pppox_proto(int proto_num);
extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */
extern int pppox_channel_ioctl(struct ppp_channel *pc, unsigned int cmd,
unsigned long arg);
extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);

/* PPPoX socket states */
enum {
Expand Down

0 comments on commit 0ec3fb0

Please sign in to comment.