From: Malcolm Priestley <tvboxspy@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 06/10] staging: vt6656: cleanup of device_ioctl/net_device_stats
Date: Sat, 24 Nov 2012 14:44:29 +0000 [thread overview]
Message-ID: <1353768269.2318.9.camel@user64-MCP7A> (raw)
Also remove IOCTL_CMD_TEST.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
drivers/staging/vt6656/main_usb.c | 55 ++++++++-----------------------------
1 file changed, 12 insertions(+), 43 deletions(-)
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index a667e39..4a0f9dc 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -1502,66 +1502,35 @@ static void device_set_multi(struct net_device *dev) {
}
-
-static struct net_device_stats *device_get_stats(struct net_device *dev) {
+static struct net_device_stats *device_get_stats(struct net_device *dev)
+{
PSDevice pDevice=(PSDevice) netdev_priv(dev);
return &pDevice->stats;
}
-
-static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
+static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+{
PSDevice pDevice = (PSDevice)netdev_priv(dev);
- PSMgmtObject pMgmt = &pDevice->sMgmtObj;
- PSCmdRequest pReq;
struct iwreq *wrq = (struct iwreq *) rq;
int rc = 0;
- if (pMgmt == NULL) {
- rc = -EFAULT;
- return rc;
- }
-
- switch(cmd) {
-
+ switch (cmd) {
- case IOCTL_CMD_TEST:
+ case IOCTL_CMD_HOSTAPD:
- if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) {
- rc = -EFAULT;
- break;
- } else {
- rc = 0;
- }
- pReq = (PSCmdRequest)rq;
-
- //20080130-01,<Remark> by Mike Liu
- // if(pDevice->bLinkPass==TRUE)
- pReq->wResult = MAGIC_CODE; //Linking status:0x3142
- //20080130-02,<Remark> by Mike Liu
- // else
- // pReq->wResult = MAGIC_CODE+1; //disconnect status:0x3143
- break;
-
- case IOCTL_CMD_HOSTAPD:
-
- if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) {
- rc = -EFAULT;
- break;
- } else {
- rc = 0;
- }
+ if (!(pDevice->flags & DEVICE_FLAGS_OPENED))
+ rc = -EFAULT;
rc = vt6656_hostap_ioctl(pDevice, &wrq->u.data);
- break;
+ break;
case SIOCETHTOOL:
- return ethtool_ioctl(dev, (void *) rq->ifr_data);
-
- }
+ return ethtool_ioctl(dev, (void *) rq->ifr_data);
+ }
- return rc;
+ return rc;
}
--
1.7.10.4
reply other threads:[~2012-11-24 14:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353768269.2318.9.camel@user64-MCP7A \
--to=tvboxspy@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox