aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-25 09:37:21 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-25 09:37:21 -0700
commit8e24a32ed15759640516ecd92668197e2f4d686d (patch)
tree27243a6c6e333b78595cb4af499daac2282e2486 /drivers/staging
parentfc2db2c84e33c4f6c3f0a85540728045eb678dfb (diff)
staging: gdm724x: remove ioctl call
This isn't needed, userspace can trigger off of the device id if they need to do something "special" for different devices in special modes depending on the device's endian issues. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Won Kang <wonkang@gctsemi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/gdm724x/gdm_lte.c38
-rw-r--r--drivers/staging/gdm724x/lte_ioctl.h58
2 files changed, 0 insertions, 96 deletions
diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c
index 0c336345f946..557822fdc966 100644
--- a/drivers/staging/gdm724x/gdm_lte.c
+++ b/drivers/staging/gdm724x/gdm_lte.c
@@ -36,7 +36,6 @@
#include "hci.h"
#include "hci_packet.h"
#include "gdm_endian.h"
-#include "lte_ioctl.h"
/*
* Netlink protocol number
@@ -498,42 +497,6 @@ static struct net_device_stats *gdm_lte_stats(struct net_device *dev)
return &nic->stats;
}
-static void get_dev_endian(struct data_t *data, struct net_device *dev)
-{
- struct nic *nic = netdev_priv(dev);
- unsigned long ret;
-
- ret = copy_to_user(data->buf, gdm_dev_endian(nic), sizeof(struct dev_endian_t));
- if (ret)
- netdev_info(dev, "state - failed to copy\n");
-}
-
-static int gdm_lte_ioctl_get_data(struct wm_req_t *req, struct net_device *dev)
-{
- u16 id = req->data_id;
-
- switch (id) {
- case GET_ENDIAN_INFO:
- /* required for the user space application to find out device endian */
- get_dev_endian(&req->data, dev);
- break;
- default:
- netdev_err(dev, "ioctl - unknown type %d\n", id);
- break;
- }
- return 0;
-}
-
-static int gdm_lte_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-{
- struct wm_req_t *req = (struct wm_req_t *)ifr;
-
- if (cmd != SIOCLTEIOCTL || req->cmd != SIOCG_DATA || req->data_id >= 100)
- return -EOPNOTSUPP;
-
- return gdm_lte_ioctl_get_data(req, dev);
-}
-
static int gdm_lte_event_send(struct net_device *dev, char *buf, int len)
{
struct nic *nic = netdev_priv(dev);
@@ -811,7 +774,6 @@ static struct net_device_ops gdm_netdev_ops = {
.ndo_set_config = gdm_lte_set_config,
.ndo_start_xmit = gdm_lte_tx,
.ndo_get_stats = gdm_lte_stats,
- .ndo_do_ioctl = gdm_lte_ioctl,
};
static u8 gdm_lte_macaddr[ETH_ALEN] = {0x00, 0x0a, 0x3b, 0x00, 0x00, 0x00};
diff --git a/drivers/staging/gdm724x/lte_ioctl.h b/drivers/staging/gdm724x/lte_ioctl.h
deleted file mode 100644
index 4f890e50add9..000000000000
--- a/drivers/staging/gdm724x/lte_ioctl.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2012 GCT Semiconductor, Inc. All rights reserved.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef _LTE_IOCTL_H_
-#define _LTE_IOCTL_H_
-
-#define SIOCLTEIOCTL SIOCDEVPRIVATE
-#define SIOCG_DATA 0x8D10
-#define SIOCS_DATA 0x8D11
-
-/*
- * For historical reason, ioctl number and structure must be maintained
- */
-enum {
- LINK_ON,
- LINK_OFF,
- GET_NETWORK_STATICS,
- RX_STOP,
- RX_RESUME,
- GET_DRV_VER,
- GET_SDIO_DEVICE_STATUS,
- GET_ENDIAN_INFO,
-};
-
-struct dev_endian_t {
- unsigned char dev_endian;
- unsigned char host_endian;
-} __packed;
-
-struct data_t {
- long len;
- void *buf;
-} __packed;
-
-struct wm_req_t {
- union {
- char ifrn_name[IFNAMSIZ];
- } ifr_ifrn;
- unsigned short cmd;
- unsigned short data_id;
- struct data_t data;
-} __packed;
-
-#ifndef ifr_name
-#define ifr_name (ifr_ifrn.ifrm_name)
-#endif
-
-#endif /* _LTE_IOCTL_H_ */

Privacy Policy