Commit f48a6c06 authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: remove registering of ndo_do_ioctl callback

Remove registering of ndo_do_ioctl in wilc_netdev_ops structure.
As RSSI information is already avaliable through cfg80211, so remove
the IOCTL call use to fetch the same information. Wext support is not
present in the driver. Its also done to address the TODO list item
mentioned below:

"use wext-core handling instead of private SIOCSIWPRIV implementation"
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Reviewed-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ac39f0be
...@@ -37,7 +37,6 @@ static void wlan_deinitialize_threads(struct net_device *dev); ...@@ -37,7 +37,6 @@ static void wlan_deinitialize_threads(struct net_device *dev);
static void linux_wlan_tx_complete(void *priv, int status); static void linux_wlan_tx_complete(void *priv, int status);
static int mac_init_fn(struct net_device *ndev); static int mac_init_fn(struct net_device *ndev);
static struct net_device_stats *mac_stats(struct net_device *dev); static struct net_device_stats *mac_stats(struct net_device *dev);
static int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd);
static int wilc_mac_open(struct net_device *ndev); static int wilc_mac_open(struct net_device *ndev);
static int wilc_mac_close(struct net_device *ndev); static int wilc_mac_close(struct net_device *ndev);
static void wilc_set_multicast_list(struct net_device *dev); static void wilc_set_multicast_list(struct net_device *dev);
...@@ -49,7 +48,6 @@ static const struct net_device_ops wilc_netdev_ops = { ...@@ -49,7 +48,6 @@ static const struct net_device_ops wilc_netdev_ops = {
.ndo_open = wilc_mac_open, .ndo_open = wilc_mac_open,
.ndo_stop = wilc_mac_close, .ndo_stop = wilc_mac_close,
.ndo_start_xmit = wilc_mac_xmit, .ndo_start_xmit = wilc_mac_xmit,
.ndo_do_ioctl = mac_ioctl,
.ndo_get_stats = mac_stats, .ndo_get_stats = mac_stats,
.ndo_set_rx_mode = wilc_set_multicast_list, .ndo_set_rx_mode = wilc_set_multicast_list,
...@@ -1049,67 +1047,6 @@ static int wilc_mac_close(struct net_device *ndev) ...@@ -1049,67 +1047,6 @@ static int wilc_mac_close(struct net_device *ndev)
return 0; return 0;
} }
static int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd)
{
u8 *buff = NULL;
s8 rssi;
u32 size = 0;
struct wilc_vif *vif;
s32 ret = 0;
struct wilc *wilc;
vif = netdev_priv(ndev);
wilc = vif->wilc;
if (!wilc->initialized)
return 0;
switch (cmd) {
case SIOCSIWPRIV:
{
struct iwreq *wrq = (struct iwreq *)req;
size = wrq->u.data.length;
if (size && wrq->u.data.pointer) {
buff = memdup_user(wrq->u.data.pointer,
wrq->u.data.length);
if (IS_ERR(buff))
return PTR_ERR(buff);
if (strncasecmp(buff, "RSSI", size) == 0) {
ret = wilc_get_rssi(vif, &rssi);
netdev_info(ndev, "RSSI :%d\n", rssi);
rssi += 5;
snprintf(buff, size, "rssi %d", rssi);
if (copy_to_user(wrq->u.data.pointer, buff, size)) {
netdev_err(ndev, "failed to copy\n");
ret = -EFAULT;
goto done;
}
}
}
}
break;
default:
{
netdev_info(ndev, "Command - %d - has been received\n", cmd);
ret = -EOPNOTSUPP;
goto done;
}
}
done:
kfree(buff);
return ret;
}
void wilc_frmw_to_linux(struct wilc *wilc, u8 *buff, u32 size, u32 pkt_offset) void wilc_frmw_to_linux(struct wilc *wilc, u8 *buff, u32 size, u32 pkt_offset)
{ {
unsigned int frame_len = 0; unsigned int frame_len = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment