Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103131
b: refs/heads/master
c: a67fa76
h: refs/heads/master
i:
  103129: 9a5a70e
  103127: 9e564af
v: v3
  • Loading branch information
David S. Miller committed Jun 17, 2008
1 parent 3e0bdd3 commit 05e3cd2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 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: d2911255590d9ca561a481b9dbebcfcbbf38fa4e
refs/heads/master: a67fa76d8be4e24e2d61cd76438a893d4c2886f7
26 changes: 20 additions & 6 deletions trunk/net/wireless/wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,8 +1079,10 @@ static int wext_permission_check(unsigned int cmd)
}

/* entry point from dev ioctl */
int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
void __user *arg)
static int wext_ioctl_dispatch(struct net *net, struct ifreq *ifr,
unsigned int cmd,
wext_ioctl_func standard,
wext_ioctl_func private)
{
int ret = wext_permission_check(cmd);

Expand All @@ -1089,12 +1091,24 @@ int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,

dev_load(net, ifr->ifr_name);
rtnl_lock();
ret = wireless_process_ioctl(net, ifr, cmd,
ioctl_standard_call,
ioctl_private_call);
ret = wireless_process_ioctl(net, ifr, cmd, standard, private);
rtnl_unlock();
if (IW_IS_GET(cmd) && copy_to_user(arg, ifr, sizeof(struct iwreq)))

return ret;
}

int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
void __user *arg)
{
int ret = wext_ioctl_dispatch(net, ifr, cmd,
ioctl_standard_call,
ioctl_private_call);

if (ret >= 0 &&
IW_IS_GET(cmd) &&
copy_to_user(arg, ifr, sizeof(struct iwreq)))
return -EFAULT;

return ret;
}

Expand Down

0 comments on commit 05e3cd2

Please sign in to comment.