From 47ecb8a85daff4f913d60eb33eedaf8333afa9d5 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Fri, 3 Jan 2014 17:49:42 -0800 Subject: Batch scan fixes on CLD Fix of following 2 issues: 1) Batch scan version command failure and 2) Proper handling of negative agruments passed from user space . Change-Id: Id530bc013addf96098c57cc6b1c44553292f854a CRs-Fixed: 594768 --- CORE/HDD/src/wlan_hdd_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 6039625b1ea9..2a89049c5cec 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -726,6 +726,11 @@ hdd_extract_assigned_int_from_str { return NULL; } + + if (tempInt < 0) + { + tempInt = 0; + } *pOutPtr = tempInt; pInPtr = strnchr(pInPtr, strlen(pInPtr), SPACE_ASCII_VALUE); @@ -3443,8 +3448,9 @@ int hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) goto exit; } - if ((WLAN_HDD_INFRA_STATION != pAdapter->device_mode) && - (WLAN_HDD_P2P_CLIENT != pAdapter->device_mode)) + if ((WLAN_HDD_INFRA_STATION != pAdapter->device_mode) && + (WLAN_HDD_P2P_CLIENT != pAdapter->device_mode) && + (WLAN_HDD_P2P_DEVICE != pAdapter->device_mode)) { VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, "Received WLS_BATCHING_VERSION command in invalid mode %d " -- cgit v1.2.3