From: Hari Prasath Gujulan Elango <hgujulan@xxxxxxxxxxx> This patch removes code that is unused for any functionality in the ioctl SIOCDEVPRIVATE + 1.But since it is mentioned in the TODO list that it needs to be replaced with generic API functions,the debug print alone is left as it is. Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@xxxxxxxxxxx> --- drivers/staging/wilc1000/linux_wlan.c | 53 ----------------------------------- 1 file changed, 53 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 173b958..fa768f8 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -2373,7 +2373,6 @@ int mac_close(struct net_device *ndev) int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) { - u8 *buff = NULL; WILC_Sint8 rssi; WILC_Uint32 size = 0, length = 0; @@ -2396,59 +2395,7 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) /* [[ added by tony for SIOCDEVPRIVATE */ case SIOCDEVPRIVATE + 1: { - android_wifi_priv_cmd priv_cmd; - PRINT_INFO(GENERIC_DBG, "in SIOCDEVPRIVATE+1\n"); - - if (copy_from_user(&priv_cmd, req->ifr_data, sizeof(android_wifi_priv_cmd))) { - s32Error = -EFAULT; - goto done; - } - - buff = kmalloc(priv_cmd.total_len, GFP_KERNEL); - if (!buff) { - s32Error = -ENOMEM; - goto done; - } - - if (copy_from_user(buff, priv_cmd.buf, priv_cmd.total_len)) { - s32Error = -EFAULT; - goto done; - } - - PRINT_INFO(GENERIC_DBG, "%s: Android private cmd \"%s\" on %s\n", __FUNCTION__, buff, req->ifr_name); - - if (strncasecmp(buff, "SCAN-ACTIVE", strlen("SCAN-ACTIVE")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, SCAN-ACTIVE command\n", __FUNCTION__); - } else if (strncasecmp(buff, "SCAN-PASSIVE", strlen("SCAN-PASSIVE")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, SCAN-PASSIVE command\n", __FUNCTION__); - } else if (strncasecmp(buff, "RXFILTER-START", strlen("RXFILTER-START")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, RXFILTER-START command\n", __FUNCTION__); - } else if (strncasecmp(buff, "RXFILTER-STOP", strlen("RXFILTER-STOP")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, RXFILTER-STOP command\n", __FUNCTION__); - } else if (strncasecmp(buff, "RXFILTER-ADD", strlen("RXFILTER-ADD")) == 0) { - int filter_num = *(buff + strlen("RXFILTER-ADD") + 1) - '0'; - PRINT_INFO(GENERIC_DBG, "%s, RXFILTER-ADD command, filter_num=%d\n", __FUNCTION__, filter_num); - } else if (strncasecmp(buff, "RXFILTER-REMOVE", strlen("RXFILTER-REMOVE")) == 0) { - int filter_num = *(buff + strlen("RXFILTER-REMOVE") + 1) - '0'; - PRINT_INFO(GENERIC_DBG, "%s, RXFILTER-REMOVE command, filter_num=%d\n", __FUNCTION__, filter_num); - } else if (strncasecmp(buff, "BTCOEXSCAN-START", strlen("BTCOEXSCAN-START")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, BTCOEXSCAN-START command\n", __FUNCTION__); - } else if (strncasecmp(buff, "BTCOEXSCAN-STOP", strlen("BTCOEXSCAN-STOP")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, BTCOEXSCAN-STOP command\n", __FUNCTION__); - } else if (strncasecmp(buff, "BTCOEXMODE", strlen("BTCOEXMODE")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, BTCOEXMODE command\n", __FUNCTION__); - } else if (strncasecmp(buff, "SETBAND", strlen("SETBAND")) == 0) { - uint band = *(buff + strlen("SETBAND") + 1) - '0'; - PRINT_INFO(GENERIC_DBG, "%s, SETBAND command, band=%d\n", __FUNCTION__, band); - } else if (strncasecmp(buff, "GETBAND", strlen("GETBAND")) == 0) { - PRINT_INFO(GENERIC_DBG, "%s, GETBAND command\n", __FUNCTION__); - } else if (strncasecmp(buff, "COUNTRY", strlen("COUNTRY")) == 0) { - char *country_code = buff + strlen("COUNTRY") + 1; - PRINT_INFO(GENERIC_DBG, "%s, COUNTRY command, country_code=%s\n", __FUNCTION__, country_code); - } else { - PRINT_INFO(GENERIC_DBG, "%s, Unknown command\n", __FUNCTION__); - } } break; /* ]] 2013-06-24 */ -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel