diff options
| author | Rajeev Kumar <rajekuma@qca.qualcomm.com> | 2014-01-03 17:49:42 -0800 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@codeaurora.org> | 2014-01-17 21:45:53 -0800 |
| commit | 47ecb8a85daff4f913d60eb33eedaf8333afa9d5 (patch) | |
| tree | e69a789c4ebdec2e106ea0355f62806fb4c5cbdb | |
| parent | 92ac62d1b23b3a003a0925bcc6637a04574cb179 (diff) | |
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
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_main.c | 10 |
1 files 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 " |
